Skip to content

Commit f835b52

Browse files
authored
Resolve VCSWP-19258 (Introduce application ID filtering on list call method for python sdk) (#36)
* Introduce application ID filtering on list call method for python sdk * Remove hasApplication boolean value from listCalls
1 parent dbfbbb3 commit f835b52

File tree

12 files changed

+263
-215
lines changed

12 files changed

+263
-215
lines changed

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,5 @@ requirements.txt
269269
setup.cfg
270270
setup.py
271271
test/__init__.py
272+
test/test_default_api.py
272273
tox.ini

CHANGELOG.md

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

1010
None
1111

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

1524
### Changed

README.md

Lines changed: 189 additions & 183 deletions
Large diffs are not rendered by default.

docs/DefaultApi.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2377,6 +2377,9 @@ with freeclimb.ApiClient(configuration) as api_client:
23772377
start_time = "startTime_example" # str | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional)
23782378
end_time = "endTime_example" # str | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional)
23792379
parent_call_id = "parentCallId_example" # str | Only show Calls spawned by the call with this ID. (optional)
2380+
application_id = [
2381+
"AP62ECB020842930cc01FFCCfeEe150AC32DcAEc8a",
2382+
] # [str] | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional)
23802383

23812384
# example passing only required values which don't have defaults set
23822385
try:
@@ -2390,7 +2393,7 @@ with freeclimb.ApiClient(configuration) as api_client:
23902393
# and optional values
23912394
try:
23922395
# List Calls
2393-
api_response = api_instance.list_calls(account_id, active=active, to=to, _from=_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id)
2396+
api_response = api_instance.list_calls(account_id, active=active, to=to, _from=_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id)
23942397
pprint(api_response)
23952398
except freeclimb.ApiException as e:
23962399
print("Exception when calling DefaultApi->list_calls: %s\n" % e)
@@ -2409,6 +2412,7 @@ Name | Type | Description | Notes
24092412
**start_time** | **str**| Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional]
24102413
**end_time** | **str**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional]
24112414
**parent_call_id** | **str**| Only show Calls spawned by the call with this ID. | [optional]
2415+
**application_id** | **[str]**| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional]
24122416

24132417
### Return type
24142418

docs/PlayBeep.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PlayBeep
22

3-
Controls when a beep is played. Valid values: `always`, `never`, `entryOnly`, `exitOnly`.
3+
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`
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------

freeclimb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "4.2.1"
14+
__version__ = "4.3.0"
1515

1616
# import ApiClient
1717
from freeclimb.api_client import ApiClient

freeclimb/api/default_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,7 @@ def __init__(self, api_client=None, account_id=None):
17321732
'start_time',
17331733
'end_time',
17341734
'parent_call_id',
1735+
'application_id',
17351736
],
17361737
'required': [
17371738
'account_id',
@@ -1741,10 +1742,15 @@ def __init__(self, api_client=None, account_id=None):
17411742
'enum': [
17421743
],
17431744
'validation': [
1745+
'application_id',
17441746
]
17451747
},
17461748
root_map={
17471749
'validations': {
1750+
('application_id',): {
1751+
1752+
'max_items': 16,
1753+
},
17481754
},
17491755
'allowed_values': {
17501756
},
@@ -1765,6 +1771,8 @@ def __init__(self, api_client=None, account_id=None):
17651771
(str,),
17661772
'parent_call_id':
17671773
(str,),
1774+
'application_id':
1775+
([str],),
17681776
},
17691777
'attribute_map': {
17701778
'account_id': 'accountId',
@@ -1775,6 +1783,7 @@ def __init__(self, api_client=None, account_id=None):
17751783
'start_time': 'startTime',
17761784
'end_time': 'endTime',
17771785
'parent_call_id': 'parentCallId',
1786+
'application_id': 'applicationId',
17781787
},
17791788
'location_map': {
17801789
'account_id': 'path',
@@ -1785,8 +1794,10 @@ def __init__(self, api_client=None, account_id=None):
17851794
'start_time': 'query',
17861795
'end_time': 'query',
17871796
'parent_call_id': 'query',
1797+
'application_id': 'query',
17881798
},
17891799
'collection_format_map': {
1800+
'application_id': 'multi',
17901801
}
17911802
},
17921803
headers_map={
@@ -5360,6 +5371,7 @@ def list_calls(
53605371
start_time (str): Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss.. [optional]
53615372
end_time (str): Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss.. [optional]
53625373
parent_call_id (str): Only show Calls spawned by the call with this ID.. [optional]
5374+
application_id ([str]): Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications.. [optional]
53635375
_return_http_data_only (bool): response data without head status
53645376
code and headers. Default is True.
53655377
_preload_content (bool): if False, the urllib3.HTTPResponse object

freeclimb/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/4.2.1/python'
80+
self.user_agent = 'OpenAPI-Generator/4.3.0/python'
8181

8282
def __enter__(self):
8383
return self

freeclimb/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def to_debug_report(self):
405405
"OS: {env}\n"\
406406
"Python Version: {pyversion}\n"\
407407
"Version of the API: 1.0.0\n"\
408-
"SDK Package Version: 4.2.1".\
408+
"SDK Package Version: 4.3.0".\
409409
format(env=sys.platform, pyversion=sys.version)
410410

411411
def get_host_settings(self):

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
}

0 commit comments

Comments
 (0)