Skip to content

Commit bd195ae

Browse files
authored
Resolve VCSWP-19258 (Introduce application ID filtering on list call method for java sdk) (#35)
* Introduce application ID filtering on list call method for java sdk * Edit README file so that git diff is not too large * Edit changelog entry for correct date * Remove hasApplication boolean value from listCalls
1 parent faff595 commit bd195ae

27 files changed

+167
-56
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,4 @@ src/main/java/com/github/freeclimbapi/auth/ApiKeyAuth.java
286286
src/main/java/com/github/freeclimbapi/auth/Authentication.java
287287
src/main/java/com/github/freeclimbapi/auth/HttpBasicAuth.java
288288
src/main/java/com/github/freeclimbapi/auth/HttpBearerAuth.java
289+
src/test/java/com/github/freeclimbapi/DefaultApiTest.java

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
99

1010
None
1111

12+
<a name="5.3.0"></a>
13+
14+
## [5.3.0] 2023-04-27
15+
16+
### Changed
17+
18+
- Introduce application ID filtering for list calls method
19+
1220
<a name="5.2.0"></a>
1321

1422
## [5.2.0] 2023-04-03

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Add this dependency to your project's POM:
4040
<dependency>
4141
<groupId>com.github.freeclimbapi</groupId>
4242
<artifactId>freeclimb-java-client</artifactId>
43-
<version>5.2.0</version>
43+
<version>5.3.0</version>
4444
<scope>compile</scope>
4545
</dependency>
4646
```
@@ -56,7 +56,7 @@ Add this dependency to your project's build file:
5656
}
5757
5858
dependencies {
59-
implementation "com.github.freeclimbapi:freeclimb-java-client:5.2.0"
59+
implementation "com.github.freeclimbapi:freeclimb-java-client:5.3.0"
6060
}
6161
```
6262

@@ -70,7 +70,7 @@ mvn clean package
7070

7171
Then manually install the following JARs:
7272

73-
* `target/freeclimb-java-client-5.2.0.jar`
73+
* `target/freeclimb-java-client-5.3.0.jar`
7474
* `target/lib/*.jar`
7575

7676
## Getting Started
@@ -328,6 +328,7 @@ Authentication schemes defined for the API:
328328
329329
- **Type**: HTTP basic authentication
330330
331+
331332
<a name="documentation-for-verify-request-signature"></a>
332333
333334
## Documentation for verifying request signature
@@ -359,11 +360,12 @@ Authentication schemes defined for the API:
359360
}
360361
}
361362
```
362-
363+
363364
## Recommendation
364365
365366
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
366367
367368
## Author
368369
369370
371+

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'java'
44
apply plugin: 'com.diffplug.spotless'
55

66
group = 'com.github.freeclimbapi'
7-
version = '5.2.0'
7+
version = '5.3.0'
88

99
buildscript {
1010
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.github.freeclimbapi",
44
name := "freeclimb-java-client",
5-
version := "5.2.0",
5+
version := "5.3.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

docs/DefaultApi.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ Name | Type | Description | Notes
20122012

20132013
<a name="listCalls"></a>
20142014
# **listCalls**
2015-
> CallList listCalls(active, to, from, status, startTime, endTime, parentCallId)
2015+
> CallList listCalls(active, to, from, status, startTime, endTime, parentCallId, applicationId)
20162016
20172017
List Calls
20182018

@@ -2052,8 +2052,10 @@ public class Example {
20522052

20532053
String parentCallId = "parentCallId_example"; // String | Only show Calls spawned by the call with this ID.
20542054

2055+
List<String> applicationId = Arrays.asList(); // List<String> | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications.
2056+
20552057
try {
2056-
CallList result = apiInstance.listCalls(active, to, from, status, startTime, endTime, parentCallId);
2058+
CallList result = apiInstance.listCalls(active, to, from, status, startTime, endTime, parentCallId, applicationId);
20572059
System.out.println(result);
20582060
} catch (ApiException e) {
20592061
System.err.println("Exception when calling DefaultApi#listCalls");
@@ -2077,6 +2079,7 @@ Name | Type | Description | Notes
20772079
**startTime** | **String**| Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional]
20782080
**endTime** | **String**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional]
20792081
**parentCallId** | **String**| Only show Calls spawned by the call with this ID. | [optional]
2082+
**applicationId** | [**List&lt;String&gt;**](String.md)| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional]
20802083

20812084

20822085
### Return type

openapi.json

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,33 @@
8585
"type": "string",
8686
"enum": ["closed", "suspended", "active"],
8787
"x-enum-varnames": ["CLOSED", "SUSPENDED", "ACTIVE"],
88-
"description": "The status of this account. It is one of: active, suspended, or closed."
88+
"description": "The status of this account. It is one of: active, suspended, or closed.",
89+
"nullable": true
8990
},
9091
"AccountType": {
9192
"type": "string",
9293
"description": "The type of this account. It is one of: trial or full.",
9394
"enum": ["trial", "full"],
94-
"x-enum-varnames": ["TRIAL", "FULL"]
95+
"x-enum-varnames": ["TRIAL", "FULL"],
96+
"nullable": true
9597
},
9698
"AnsweredBy": {
9799
"type": "string",
100+
"nullable": true,
98101
"enum": ["human", "machine"],
99102
"x-enum-varnames": ["HUMAN", "MACHINE"],
100103
"description": "If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise."
101104
},
102105
"CallDirection": {
103106
"type": "string",
107+
"nullable": true,
104108
"enum": ["inbound", "outboundAPI", "outboundDial"],
105109
"x-enum-varnames": ["INBOUND", "OUTBOUND_API", "OUTBOUND_DIAL"],
106110
"description": "Direction of the Call. `inbound` for Calls into FreeClimb, `outboundAPI` for Calls initiated via the REST API, `outboundDial` for Calls initiated by the `OutDial` PerCL command."
107111
},
108112
"CallStatus": {
109113
"type": "string",
114+
"nullable": true,
110115
"enum": [
111116
"queued",
112117
"ringing",
@@ -131,6 +136,7 @@
131136
},
132137
"ConferenceStatus": {
133138
"type": "string",
139+
"nullable": true,
134140
"enum": ["empty", "populated", "inProgress", "terminated"],
135141
"x-enum-varnames": ["EMPTY", "POPULATED", "IN_PROGRESS", "TERMINATED"],
136142
"description": "The status of the Conference. One of: creating, empty, populated, inProgress, or terminated."
@@ -194,6 +200,7 @@
194200
"GrammarType": {
195201
"type": "string",
196202
"enum": ["URL", "BUILTIN"],
203+
"nullable": true,
197204
"x-enum-varnames": ["URL", "BUILT_IN"],
198205
"description": "The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files."
199206
},
@@ -265,6 +272,7 @@
265272
"LogLevel": {
266273
"type": "string",
267274
"enum": ["info", "warning", "error"],
275+
"nullable": true,
268276
"x-enum-varnames": ["INFO", "WARNING", "ERROR"],
269277
"description": "Level of the log. Possible values are info, warning, and error."
270278
},
@@ -280,6 +288,7 @@
280288
},
281289
"MessageStatus": {
282290
"type": "string",
291+
"nullable": true,
283292
"description": "Indicates the state of the message through the message lifecycle including: new, queued, rejected, sending, sent, failed, received, undelivered, expired, deleted, and unknown",
284293
"enum": [
285294
"new",
@@ -310,9 +319,10 @@
310319
},
311320
"PlayBeep": {
312321
"type": "string",
322+
"nullable": true,
313323
"enum": ["always", "never", "entryOnly", "exitOnly"],
314324
"x-enum-varnames": ["ALWAYS", "NEVER", "ENTRY_ONLY", "EXIT_ONLY"],
315-
"description": "Controls when a beep is played. Valid values: `always`, `never`, `entryOnly`, `exitOnly`.",
325+
"description": "Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` ",
316326
"default": "always",
317327
"x-enum-default-attr": "ALWAYS"
318328
},
@@ -520,7 +530,6 @@
520530
"type": "boolean"
521531
},
522532
"playBeep": {
523-
"description": "Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` ",
524533
"$ref": "#/components/schemas/PlayBeep"
525534
},
526535
"record": {
@@ -653,8 +662,7 @@
653662
"format": "uri"
654663
},
655664
"grammarType": {
656-
"$ref": "#/components/schemas/GrammarType",
657-
"nullable": true
665+
"$ref": "#/components/schemas/GrammarType"
658666
},
659667
"grammarFile": {
660668
"description": "The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL.",
@@ -1297,12 +1305,10 @@
12971305
"nullable": true
12981306
},
12991307
"type": {
1300-
"$ref": "#/components/schemas/AccountType",
1301-
"nullable": true
1308+
"$ref": "#/components/schemas/AccountType"
13021309
},
13031310
"status": {
1304-
"$ref": "#/components/schemas/AccountStatus",
1305-
"nullable": true
1311+
"$ref": "#/components/schemas/AccountStatus"
13061312
},
13071313
"subresourceUris": {
13081314
"type": "object",
@@ -1648,8 +1654,7 @@
16481654
"nullable": true
16491655
},
16501656
"callStatus": {
1651-
"$ref": "#/components/schemas/CallStatus",
1652-
"nullable": true
1657+
"$ref": "#/components/schemas/CallStatus"
16531658
},
16541659
"startTime": {
16551660
"type": "string",
@@ -1677,12 +1682,10 @@
16771682
"nullable": true
16781683
},
16791684
"direction": {
1680-
"$ref": "#/components/schemas/CallDirection",
1681-
"nullable": true
1685+
"$ref": "#/components/schemas/CallDirection"
16821686
},
16831687
"answeredBy": {
1684-
"$ref": "#/components/schemas/AnsweredBy",
1685-
"nullable": true
1688+
"$ref": "#/components/schemas/AnsweredBy"
16861689
},
16871690
"subresourceUris": {
16881691
"type": "object",
@@ -1834,9 +1837,7 @@
18341837
"nullable": true
18351838
},
18361839
"level": {
1837-
"$ref": "#/components/schemas/LogLevel",
1838-
1839-
"nullable": true
1840+
"$ref": "#/components/schemas/LogLevel"
18401841
},
18411842
"requestId": {
18421843
"type": "string",
@@ -1909,17 +1910,15 @@
19091910
},
19101911
"playBeep": {
19111912
"$ref": "#/components/schemas/PlayBeep",
1912-
"description": "Setting that controls when a beep is played. One of: always, never, entryOnly, exitOnly. Defaults to always.",
1913-
"nullable": true
1913+
"description": "Setting that controls when a beep is played. One of: always, never, entryOnly, exitOnly. Defaults to always."
19141914
},
19151915
"record": {
19161916
"type": "boolean",
19171917
"description": "Flag indicating whether recording is enabled for this Conference.",
19181918
"nullable": true
19191919
},
19201920
"status": {
1921-
"$ref": "#/components/schemas/ConferenceStatus",
1922-
"nullable": true
1921+
"$ref": "#/components/schemas/ConferenceStatus"
19231922
},
19241923
"waitUrl": {
19251924
"type": "string",
@@ -2036,8 +2035,7 @@
20362035
"nullable": true
20372036
},
20382037
"status": {
2039-
"$ref": "#/components/schemas/MessageStatus",
2040-
"nullable": true
2038+
"$ref": "#/components/schemas/MessageStatus"
20412039
},
20422040
"from": {
20432041
"type": "string",
@@ -3066,6 +3064,21 @@
30663064
"type": "string"
30673065
}
30683066
},
3067+
{
3068+
"name": "applicationId",
3069+
"in": "query",
3070+
"description": "Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications.",
3071+
"explode": true,
3072+
"required": false,
3073+
"schema": {
3074+
"type": "array",
3075+
"maxItems": 16,
3076+
"items": {
3077+
"type": "string",
3078+
"pattern": "^AP[0-9a-fA-F]{40}$"
3079+
}
3080+
}
3081+
},
30693082
{
30703083
"$ref": "#/components/parameters/AccountId"
30713084
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>freeclimb-java-client</artifactId>
66
<packaging>jar</packaging>
77
<name>freeclimb-java-client</name>
8-
<version>5.2.0</version>
8+
<version>5.3.0</version>
99
<url>https://github.com/freeclimbapi/java-sdk</url>
1010
<description>FreeClimb Java Client</description>
1111
<scm>

src/main/java/com/github/freeclimbapi/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void init() {
131131
json = new JSON();
132132

133133
// Set default User-Agent.
134-
setUserAgent("OpenAPI-Generator/5.2.0/java");
134+
setUserAgent("OpenAPI-Generator/5.3.0/java");
135135

136136
authentications = new HashMap<String, Authentication>();
137137
}

0 commit comments

Comments
 (0)