Skip to content

Commit 7ab478a

Browse files
dbbrahmbhattroot
andauthored
Version 1.1.0-v2.0-1.1.0 release (#3)
Co-authored-by: root <root@devcenteradmin.docusigntest.com>
1 parent f722991 commit 7ab478a

File tree

13 files changed

+855
-56
lines changed

13 files changed

+855
-56
lines changed

.swagger-codegen/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.13-SNAPSHOT
1+
2.4.21-SNAPSHOT

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
33

44

5+
## [v1.1.0] - Monitor API v2.0-1.1.0 - 2022-04-11
6+
### Changed
7+
- Added support for version v2.0-1.1.0 of the DocuSign Monitor API.
8+
- Updated the SDK release version.
9+
510
## [v1.0.0] - Monitor API v2.0-1.0.0 - 2021-06-24
611
### Changed
712
- Updated the SDK release version.

linter.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
./vendor/bin/phpcbf -p src --extensions=php -d memory_limit=512M
2+
./vendor/bin/phpcs src --standard=ruleset.xml

ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="DocuSign">
3+
<description>DocuSign custom coding standard.</description>
4+
<rule ref="PEAR">
5+
<exclude name="Generic.Files.LineLength" />
6+
</rule>
7+
</ruleset>

src/Api/DataSetApi.php

Lines changed: 131 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
*
99
* @category Class
1010
* @package DocuSign\Monitor
11-
* @author Swagger Codegen team
11+
* @author Swagger Codegen team <apihelp@docusign.com>
12+
* @license The DocuSign PHP Client SDK is licensed under the MIT License.
1213
* @link https://github.com/swagger-api/swagger-codegen
1314
*/
1415

1516
/**
1617
* Monitor API
1718
*
18-
* Use the DocuSign Monitor API to receive a data feed containing atypical security events within your DocuSign account. This data goes directly to an integrated application or website.
19+
* An API for an integrator to access the features of DocuSign Monitor
1920
*
2021
* OpenAPI spec version: v2.0
2122
* Contact: devcenter@docusign.com
2223
* Generated by: https://github.com/swagger-api/swagger-codegen.git
23-
* Swagger Codegen version: 2.4.13-SNAPSHOT
24+
* Swagger Codegen version: 2.4.21-SNAPSHOT
2425
*/
2526

2627
/**
@@ -32,6 +33,15 @@
3233
namespace DocuSign\Monitor\Api\DataSetApi;
3334

3435

36+
/**
37+
* GetStreamOptions Class Doc Comment
38+
*
39+
* @category Class
40+
* @package DocuSign\Monitor
41+
* @author Swagger Codegen team <apihelp@docusign.com>
42+
* @license The DocuSign PHP Client SDK is licensed under the MIT License.
43+
* @link https://github.com/swagger-api/swagger-codegen
44+
*/
3545
class GetStreamOptions
3646
{
3747
/**
@@ -42,6 +52,7 @@ class GetStreamOptions
4252

4353
/**
4454
* Gets cursor
55+
*
4556
* @return ?string
4657
*/
4758
public function getCursor(): ?string
@@ -52,6 +63,7 @@ public function getCursor(): ?string
5263
/**
5364
* Sets cursor
5465
* @param ?string $cursor The cursor value to continue querying the data with. For an intial call, use empty string
66+
*
5567
* @return self
5668
*/
5769
public function setCursor(?string $cursor): self
@@ -67,6 +79,7 @@ public function setCursor(?string $cursor): self
6779

6880
/**
6981
* Gets limit
82+
*
7083
* @return ?int
7184
*/
7285
public function getLimit(): ?int
@@ -77,6 +90,7 @@ public function getLimit(): ?int
7790
/**
7891
* Sets limit
7992
* @param ?int $limit The maximum number of records to return, minimum of 1, maximum of 2000. Defaults to 1000 if no value is provided
93+
*
8094
* @return self
8195
*/
8296
public function setLimit(?int $limit): self
@@ -100,7 +114,8 @@ public function setLimit(?int $limit): self
100114
*
101115
* @category Class
102116
* @package DocuSign\Monitor
103-
* @author Swagger Codegen team
117+
* @author Swagger Codegen team <apihelp@docusign.com>
118+
* @license The DocuSign PHP Client SDK is licensed under the MIT License.
104119
* @link https://github.com/swagger-api/swagger-codegen
105120
*/
106121
class DataSetApi
@@ -116,6 +131,7 @@ class DataSetApi
116131
* Constructor
117132
*
118133
* @param ApiClient|null $apiClient The api client to use
134+
*
119135
* @return void
120136
*/
121137
public function __construct(ApiClient $apiClient = null)
@@ -149,9 +165,9 @@ public function setApiClient(ApiClient $apiClient): self
149165
/**
150166
* Update $resourcePath with $
151167
*
152-
* @param string $resourcePath
153-
* @param string $baseName
154-
* @param string $paramName
168+
* @param string $resourcePath the resource path to use
169+
* @param string $baseName the base name param
170+
* @param string $paramName the parameter name
155171
*
156172
* @return string
157173
*/
@@ -172,7 +188,8 @@ public function updateResourcePath(string $resourcePath, string $baseName, strin
172188
*
173189
* @param ?string $data_set_name The name of the dataset to stream
174190
* @param ?string $version The requested API version
175-
* @param \DocuSign\Monitor\Api\DataSetApi\GetStreamOptions for modifying the behavior of the function. (optional)
191+
* @param \DocuSign\Monitor\Api\DataSetApi\GetStreamOptions $options for modifying the behavior of the function. (optional)
192+
*
176193
* @throws ApiException on non-2xx response
177194
* @return \DocuSign\Monitor\Model\CursoredResult
178195
*/
@@ -189,7 +206,8 @@ public function getStream($data_set_name, $version, \DocuSign\Monitor\Api\DataSe
189206
*
190207
* @param ?string $data_set_name The name of the dataset to stream
191208
* @param ?string $version The requested API version
192-
* @param \DocuSign\Monitor\Api\DataSetApi\GetStreamOptions for modifying the behavior of the function. (optional)
209+
* @param \DocuSign\Monitor\Api\DataSetApi\GetStreamOptions $options for modifying the behavior of the function. (optional)
210+
*
193211
* @throws ApiException on non-2xx response
194212
* @return array of \DocuSign\Monitor\Model\CursoredResult, HTTP status code, HTTP response headers (array of strings)
195213
*/
@@ -267,4 +285,108 @@ public function getStreamWithHttpInfo($data_set_name, $version, \DocuSign\Monito
267285
throw $e;
268286
}
269287
}
288+
289+
/**
290+
* Operation postWebQuery
291+
*
292+
*
293+
*
294+
* @param ?string $data_set_name The name of the dataset to query
295+
* @param ?string $version The requested API version
296+
* @param \DocuSign\Monitor\Model\WebQuery $web_query A collection of filter clauses and aggregations scoped to one or more organizations. The fields queryScope and queryScopeId may be omitted defaulting to all applicable organizations (required)
297+
*
298+
* @throws ApiException on non-2xx response
299+
* @return \DocuSign\Monitor\Model\AggregateResult
300+
*/
301+
public function postWebQuery($data_set_name, $version, $web_query)
302+
{
303+
list($response) = $this->postWebQueryWithHttpInfo($data_set_name, $version, $web_query);
304+
return $response;
305+
}
306+
307+
/**
308+
* Operation postWebQueryWithHttpInfo
309+
*
310+
*
311+
*
312+
* @param ?string $data_set_name The name of the dataset to query
313+
* @param ?string $version The requested API version
314+
* @param \DocuSign\Monitor\Model\WebQuery $web_query A collection of filter clauses and aggregations scoped to one or more organizations. The fields queryScope and queryScopeId may be omitted defaulting to all applicable organizations (required)
315+
*
316+
* @throws ApiException on non-2xx response
317+
* @return array of \DocuSign\Monitor\Model\AggregateResult, HTTP status code, HTTP response headers (array of strings)
318+
*/
319+
public function postWebQueryWithHttpInfo($data_set_name, $version, $web_query): array
320+
{
321+
// verify the required parameter 'data_set_name' is set
322+
if ($data_set_name === null) {
323+
throw new \InvalidArgumentException('Missing the required parameter $data_set_name when calling postWebQuery');
324+
}
325+
// verify the required parameter 'version' is set
326+
if ($version === null) {
327+
throw new \InvalidArgumentException('Missing the required parameter $version when calling postWebQuery');
328+
}
329+
// verify the required parameter 'web_query' is set
330+
if ($web_query === null) {
331+
throw new \InvalidArgumentException('Missing the required parameter $web_query when calling postWebQuery');
332+
}
333+
// parse inputs
334+
$resourcePath = "/api/v{version}/datasets/{dataSetName}/web_query";
335+
$httpBody = $_tempBody ?? ''; // $_tempBody is the method argument, if present
336+
$queryParams = $headerParams = $formParams = [];
337+
$headerParams['Accept'] ??= $this->apiClient->selectHeaderAccept(['application/json']);
338+
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);
339+
340+
341+
// path params
342+
if ($data_set_name !== null) {
343+
$resourcePath = self::updateResourcePath($resourcePath, "dataSetName", $data_set_name);
344+
}
345+
// path params
346+
if ($version !== null) {
347+
$resourcePath = self::updateResourcePath($resourcePath, "version", $version);
348+
}
349+
350+
// default format to json
351+
$resourcePath = str_replace("{format}", "json", $resourcePath);
352+
// body params
353+
$_tempBody = null;
354+
if (isset($web_query)) {
355+
$_tempBody = $web_query;
356+
}
357+
358+
// for model (json/xml)
359+
if (isset($_tempBody)) {
360+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
361+
} elseif (count($formParams) > 0) {
362+
$httpBody = $formParams; // for HTTP post (form)
363+
}
364+
// this endpoint requires OAuth (access token)
365+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
366+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
367+
}
368+
// make the API Call
369+
try {
370+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
371+
$resourcePath,
372+
'POST',
373+
$queryParams,
374+
$httpBody,
375+
$headerParams,
376+
'\DocuSign\Monitor\Model\AggregateResult',
377+
'/api/v{version}/datasets/{dataSetName}/web_query'
378+
);
379+
380+
return [$this->apiClient->getSerializer()->deserialize($response, '\DocuSign\Monitor\Model\AggregateResult', $httpHeader), $statusCode, $httpHeader];
381+
} catch (ApiException $e) {
382+
switch ($e->getCode()) {
383+
case 200:
384+
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\Monitor\Model\AggregateResult', $e->getResponseHeaders());
385+
$e->setResponseObject($data);
386+
break;
387+
}
388+
389+
throw $e;
390+
}
391+
}
270392
}

src/HeaderSelector.php

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
*
66
* @category Class
77
* @package DocuSign\Monitor
8-
* @author Swagger Codegen team
8+
* @author Swagger Codegen team <apihelp@docusign.com>
9+
* @license The DocuSign PHP Client SDK is licensed under the MIT License.
910
* @link https://github.com/swagger-api/swagger-codegen
1011
*/
1112

1213
/**
1314
* Monitor API
1415
*
15-
* Use the DocuSign Monitor API to receive a data feed containing atypical security events within your DocuSign account. This data goes directly to an integrated application or website.
16+
* An API for an integrator to access the features of DocuSign Monitor
1617
*
1718
* OpenAPI spec version: v2.0
1819
* Contact: devcenter@docusign.com
1920
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20-
* Swagger Codegen version: 2.4.13-SNAPSHOT
21+
* Swagger Codegen version: 2.4.21-SNAPSHOT
2122
*/
2223

2324
/**
@@ -35,32 +36,39 @@
3536
*
3637
* @category Class
3738
* @package DocuSign\Monitor
38-
* @author Swagger Codegen team
39+
* @author Swagger Codegen team <apihelp@docusign.com>
40+
* @license The DocuSign PHP Client SDK is licensed under the MIT License.
3941
* @link https://github.com/swagger-api/swagger-codegen
4042
*/
4143
class HeaderSelector
4244
{
4345

4446
/**
45-
* @param string[] $accept
46-
* @param string[] $contentTypes
47+
* SelectHeaders method comment
48+
*
49+
* @param string[] $accept list of strings
50+
* @param string[] $contentTypes list of strings for contentTypes
51+
*
4752
* @return array
4853
*/
4954
public function selectHeaders($accept, $contentTypes)
5055
{
5156
$headers = [];
5257

53-
$accept = $this->selectAcceptHeader($accept);
58+
$accept = $this->_selectAcceptHeader($accept);
5459
if ($accept !== null) {
5560
$headers['Accept'] = $accept;
5661
}
5762

58-
$headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes);
63+
$headers['Content-Type'] = $this->_selectContentTypeHeader($contentTypes);
5964
return $headers;
6065
}
6166

6267
/**
63-
* @param string[] $accept
68+
* SelectHeadersForMultipart method comment
69+
*
70+
* @param string[] $accept list of strings
71+
*
6472
* @return array
6573
*/
6674
public function selectHeadersForMultipart($accept)
@@ -78,7 +86,7 @@ public function selectHeadersForMultipart($accept)
7886
*
7987
* @return string Accept (e.g. application/json)
8088
*/
81-
private function selectAcceptHeader($accept)
89+
private function _selectAcceptHeader($accept)
8290
{
8391
if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) {
8492
return null;
@@ -96,7 +104,7 @@ private function selectAcceptHeader($accept)
96104
*
97105
* @return string Content-Type (e.g. application/json)
98106
*/
99-
private function selectContentTypeHeader($contentType)
107+
private function _selectContentTypeHeader($contentType)
100108
{
101109
if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) {
102110
return 'application/json';

0 commit comments

Comments
 (0)