Skip to content

Commit 6b3ff48

Browse files
authored
Add new endpoints and some parameters; Improve openapi schema (#2)
* Add new endpoints and some parameters; Improve openapi schema
1 parent b4f5330 commit 6b3ff48

File tree

214 files changed

+9353
-889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+9353
-889
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
PandaDoc SDK spans a broad range of functionality to help you build incredible documents automation experiences inside your product.
33

44
## Docs
5-
[Official public API documentation](https://developers.pandadoc.com/reference/about)
5+
- [Official public API documentation](https://developers.pandadoc.com/reference/about)
66

77
## Requirements
8-
python >= 3.6
8+
Python >= 3.6
99

1010
## Installation
1111
#### pip install
1212
If the python package is hosted on a repository, you can install directly using:
1313
```sh
14-
pip install git+https://github.com/PandaDoc/pandadoc-api-python-client.git
14+
pip install pandadoc-python-client
1515
```
16-
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/PandaDoc/pandadoc-api-python-client.git`)
16+
(you may need to run `pip` with root permission: `sudo pip install pandadoc-python-client`)
1717

1818
Then import the package:
1919
```python
@@ -55,18 +55,17 @@ with pandadoc_client.ApiClient(cfg) as api_client:
5555
- **Type**: API key
5656
- **API key parameter name**: Authorization
5757
- **Location**: HTTP header
58-
5958
### oauth2
6059
- **Type**: OAuth
6160
- **Flow**: accessCode
6261
- **Authorization URL**: https://app.pandadoc.com/oauth2/authorize
6362
- **Scopes**:
64-
- **read+write**: default
63+
- **read+write**: Use `read+write` to create, send, delete, and download documents, and `read` to view templates and document details.
6564

6665
## Examples
6766

68-
- [Create and send document from a template](examples/create_from_template_and_send.py)
69-
- [Create and send document from the pdf url](examples/create_from_pdf_by_url_and_send.py)
67+
- [Create and send document from a template](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/examples/create_from_template_and_send.py)
68+
- [Create and send document from the pdf url](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/examples/create_from_pdf_by_url_and_send.py)
7069

7170
## Docs
7271
### Official PandaDoc public API docs
@@ -80,31 +79,48 @@ Class | Method | HTTP request | Description
8079
------------ | ------------- | ------------- | -------------
8180
*APILogsApi* | [**details_api_log**](docs/APILogsApi.md#details_api_log) | **GET** /public/v1/logs/{id} | Details API Log
8281
*APILogsApi* | [**list_api_logs**](docs/APILogsApi.md#list_api_logs) | **GET** /public/v1/logs | List API Log
82+
*ContactsApi* | [**contact_create**](docs/ContactsApi.md#contact_create) | **POST** /public/v1/contacts | Create contact
83+
*ContactsApi* | [**contact_delete**](docs/ContactsApi.md#contact_delete) | **DELETE** /public/v1/contacts/{id} | Delete contact by id
84+
*ContactsApi* | [**contact_details**](docs/ContactsApi.md#contact_details) | **GET** /public/v1/contacts/{id} | Get contact details by id
85+
*ContactsApi* | [**contact_list**](docs/ContactsApi.md#contact_list) | **GET** /public/v1/contacts | List contacts
86+
*ContactsApi* | [**contact_update**](docs/ContactsApi.md#contact_update) | **PATCH** /public/v1/contacts/{id} | Update contact by id
8387
*ContentLibraryItemsApi* | [**details_content_library_item**](docs/ContentLibraryItemsApi.md#details_content_library_item) | **GET** /public/v1/content-library-items/{id}/details | Details Content Library Item
8488
*ContentLibraryItemsApi* | [**list_content_library_items**](docs/ContentLibraryItemsApi.md#list_content_library_items) | **GET** /public/v1/content-library-items | List Content Library Item
89+
*DocumentAttachmentsApi* | [**document_attachment_create**](docs/DocumentAttachmentsApi.md#document_attachment_create) | **POST** /public/v1/documents/{id}/attachments | Document Attachment Create
90+
*DocumentAttachmentsApi* | [**document_attachment_delete**](docs/DocumentAttachmentsApi.md#document_attachment_delete) | **DELETE** /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Delete
91+
*DocumentAttachmentsApi* | [**document_attachment_details**](docs/DocumentAttachmentsApi.md#document_attachment_details) | **GET** /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Details
92+
*DocumentAttachmentsApi* | [**document_attachment_download**](docs/DocumentAttachmentsApi.md#document_attachment_download) | **GET** /public/v1/documents/{id}/attachments/{attachment_id}/download | Document Attachment Download
93+
*DocumentAttachmentsApi* | [**document_attachments_list**](docs/DocumentAttachmentsApi.md#document_attachments_list) | **GET** /public/v1/documents/{id}/attachments | Document Attachment List
8594
*DocumentsApi* | [**delete_document**](docs/DocumentsApi.md#delete_document) | **DELETE** /public/v1/documents/{id} | Delete document by id
8695
*DocumentsApi* | [**document_create**](docs/DocumentsApi.md#document_create) | **POST** /public/v1/documents | Create document
8796
*DocumentsApi* | [**document_create_link**](docs/DocumentsApi.md#document_create_link) | **POST** /public/v1/documents/{id}/session | Create a Document Link
8897
*DocumentsApi* | [**document_details**](docs/DocumentsApi.md#document_details) | **GET** /public/v1/documents/{id}/details | Document details
8998
*DocumentsApi* | [**document_list**](docs/DocumentsApi.md#document_list) | **GET** /public/v1/documents | List documents
9099
*DocumentsApi* | [**document_status**](docs/DocumentsApi.md#document_status) | **GET** /public/v1/documents/{id} | Document status
100+
*DocumentsApi* | [**document_status_change**](docs/DocumentsApi.md#document_status_change) | **PATCH** /public/v1/documents/{id}/status | Document status change
91101
*DocumentsApi* | [**download_document**](docs/DocumentsApi.md#download_document) | **GET** /public/v1/documents/{id}/download | Document download
92102
*DocumentsApi* | [**download_protected_document**](docs/DocumentsApi.md#download_protected_document) | **GET** /public/v1/documents/{id}/download-protected | Download document protected
93103
*DocumentsApi* | [**linked_object_delete**](docs/DocumentsApi.md#linked_object_delete) | **DELETE** /public/v1/documents/{id}/linked-objects/{linked_object_id} | Delete Linked Object
94104
*DocumentsApi* | [**linked_object_list**](docs/DocumentsApi.md#linked_object_list) | **GET** /public/v1/documents/{id}/linked-objects | List Linked Objects
95105
*DocumentsApi* | [**linked_objects_create**](docs/DocumentsApi.md#linked_objects_create) | **POST** /public/v1/documents/{id}/linked-objects | Create Linked Object
96106
*DocumentsApi* | [**send_document**](docs/DocumentsApi.md#send_document) | **POST** /public/v1/documents/{id}/send | Send Document
107+
*DocumentsApi* | [**transfer_all_documents_ownership**](docs/DocumentsApi.md#transfer_all_documents_ownership) | **PATCH** /public/v1/documents/ownership | Transfer all documents ownership
108+
*DocumentsApi* | [**transfer_document_ownership**](docs/DocumentsApi.md#transfer_document_ownership) | **PATCH** /public/v1/documents/{id}/ownership | Update document ownership
97109
*FoldersAPIApi* | [**create_document_folder**](docs/FoldersAPIApi.md#create_document_folder) | **POST** /public/v1/documents/folders | Create Documents Folder
98110
*FoldersAPIApi* | [**create_template_folder**](docs/FoldersAPIApi.md#create_template_folder) | **POST** /public/v1/templates/folders | Create Templates Folder
99111
*FoldersAPIApi* | [**list_document_folders**](docs/FoldersAPIApi.md#list_document_folders) | **GET** /public/v1/documents/folders | List Documents Folders
100112
*FoldersAPIApi* | [**list_template_folders**](docs/FoldersAPIApi.md#list_template_folders) | **GET** /public/v1/templates/folders | List Templates Folders
101113
*FoldersAPIApi* | [**rename_document_folder**](docs/FoldersAPIApi.md#rename_document_folder) | **PUT** /public/v1/documents/folders/{id} | Rename Documents Folder
102114
*FoldersAPIApi* | [**rename_template_folder**](docs/FoldersAPIApi.md#rename_template_folder) | **PUT** /public/v1/templates/folders/{id} | Rename Templates Folder
103115
*FormsApi* | [**list_form**](docs/FormsApi.md#list_form) | **GET** /public/v1/forms | Forms
116+
*MembersApi* | [**current_member_details**](docs/MembersApi.md#current_member_details) | **GET** /public/v1/members/current | Current member details
117+
*MembersApi* | [**member_details**](docs/MembersApi.md#member_details) | **GET** /public/v1/members/{id} | Member details
118+
*MembersApi* | [**member_list**](docs/MembersApi.md#member_list) | **GET** /public/v1/members | List members
104119
*OAuth20AuthenticationApi* | [**access_token**](docs/OAuth20AuthenticationApi.md#access_token) | **POST** /oauth2/access_token | Create/Refresh Access Token
105120
*TemplatesApi* | [**delete_template**](docs/TemplatesApi.md#delete_template) | **DELETE** /public/v1/templates/{id} | Delete Template
106121
*TemplatesApi* | [**details_temaplate**](docs/TemplatesApi.md#details_temaplate) | **GET** /public/v1/templates/{id}/details | Details Template
107122
*TemplatesApi* | [**list_templates**](docs/TemplatesApi.md#list_templates) | **GET** /public/v1/templates | List Templates
108123

124+
109125
## License
110-
SDK is licensed under the following [License](LICENSE).
126+
SDK is licensed under the following [License](https://github.com/PandaDoc/pandadoc-api-python-client/blob/main/LICENSE).

docs/APILogDetailsResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Name | Type | Description | Notes
2222
**user_id** | **str** | | [optional]
2323
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
2424

25-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
25+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2626

2727

docs/APILogListResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Name | Type | Description | Notes
77
**results** | [**[APILogListResponseResults]**](APILogListResponseResults.md) | | [optional]
88
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
99

10-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1111

1212

docs/APILogListResponseResults.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Name | Type | Description | Notes
1111
**response_time** | **str** | | [optional]
1212
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1313

14-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

1616

docs/APILogsApi.md

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Returns details of the specific API log event.
2121
* OAuth Authentication (oauth2):
2222

2323
```python
24-
import time
2524
import pandadoc_client
2625
from pandadoc_client.api import api_logs_api
2726
from pandadoc_client.model.api_log_details_response import APILogDetailsResponse
2827
from pprint import pprint
28+
2929
# Defining the host is optional and defaults to https://api.pandadoc.com
3030
# See configuration.py for a list of all supported configuration parameters.
3131
configuration = pandadoc_client.Configuration(
32-
host = "https://api.pandadoc.com"
32+
host="https://api.pandadoc.com",
3333
)
3434

3535
# The client must configure the authentication and authorization parameters
@@ -39,21 +39,19 @@ configuration = pandadoc_client.Configuration(
3939

4040
# Configure API key authorization: apiKey
4141
configuration.api_key['apiKey'] = 'YOUR_API_KEY'
42-
43-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
44-
# configuration.api_key_prefix['apiKey'] = 'Bearer'
42+
configuration.api_key_prefix['apiKey'] = 'API-Key'
4543

4644
# Configure OAuth2 access token for authorization: oauth2
47-
configuration = pandadoc_client.Configuration(
48-
host = "https://api.pandadoc.com"
49-
)
50-
configuration.access_token = 'YOUR_ACCESS_TOKEN'
45+
# configuration = pandadoc_client.Configuration(
46+
# host="https://api.pandadoc.com",
47+
# )
48+
# configuration.access_token = 'YOUR_ACCESS_TOKEN'
5149

5250
# Enter a context with an instance of the API client
5351
with pandadoc_client.ApiClient(configuration) as api_client:
5452
# Create an instance of the API class
5553
api_instance = api_logs_api.APILogsApi(api_client)
56-
id = "id_example" # str | Log event id.
54+
id = "AXp2jrHMK2MKv_lRqmQ" # str | Log event id.
5755

5856
# example passing only required values which don't have defaults set
5957
try:
@@ -64,7 +62,6 @@ with pandadoc_client.ApiClient(configuration) as api_client:
6462
print("Exception when calling APILogsApi->details_api_log: %s\n" % e)
6563
```
6664

67-
6865
### Parameters
6966

7067
Name | Type | Description | Notes
@@ -94,7 +91,7 @@ Name | Type | Description | Notes
9491
**404** | Not found | - |
9592
**429** | Too Many Requests | - |
9693

97-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
94+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9895

9996
# **list_api_logs**
10097
> APILogListResponse list_api_logs()
@@ -109,15 +106,15 @@ Get the list of all logs within the selected workspace. Optionally filter by dat
109106
* OAuth Authentication (oauth2):
110107

111108
```python
112-
import time
113109
import pandadoc_client
114110
from pandadoc_client.api import api_logs_api
115111
from pandadoc_client.model.api_log_list_response import APILogListResponse
116112
from pprint import pprint
113+
117114
# Defining the host is optional and defaults to https://api.pandadoc.com
118115
# See configuration.py for a list of all supported configuration parameters.
119116
configuration = pandadoc_client.Configuration(
120-
host = "https://api.pandadoc.com"
117+
host="https://api.pandadoc.com",
121118
)
122119

123120
# The client must configure the authentication and authorization parameters
@@ -127,44 +124,46 @@ configuration = pandadoc_client.Configuration(
127124

128125
# Configure API key authorization: apiKey
129126
configuration.api_key['apiKey'] = 'YOUR_API_KEY'
130-
131-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
132-
# configuration.api_key_prefix['apiKey'] = 'Bearer'
127+
configuration.api_key_prefix['apiKey'] = 'API-Key'
133128

134129
# Configure OAuth2 access token for authorization: oauth2
135-
configuration = pandadoc_client.Configuration(
136-
host = "https://api.pandadoc.com"
137-
)
138-
configuration.access_token = 'YOUR_ACCESS_TOKEN'
130+
# configuration = pandadoc_client.Configuration(
131+
# host="https://api.pandadoc.com",
132+
# )
133+
# configuration.access_token = 'YOUR_ACCESS_TOKEN'
139134

140135
# Enter a context with an instance of the API client
141136
with pandadoc_client.ApiClient(configuration) as api_client:
142137
# Create an instance of the API class
143138
api_instance = api_logs_api.APILogsApi(api_client)
144-
since = "since_example" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-90d\" (for past 90 days). (optional)
145-
to = "to_example" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-10d\" (for past 10 days) or a special \"now\" value. (optional)
146-
count = 1 # int | The amount of items on each page. (optional)
147-
page = 1 # int | Page number of the results returned. (optional)
148-
statuses = [
149-
100,
150-
] # [int] | Returns only the predefined status codes. Allows 1xx, 2xx, 3xx, 4xx, and 5xx. (optional)
151-
methods = [
152-
"GET",
153-
] # [str] | Returns only the predefined HTTP methods. Allows GET, POST, PUT, PATCH, and DELETE. (optional)
154-
search = "search_example" # str | Returns the results containing a string. (optional)
155-
environment_type = "PRODUCTION" # str | Returns logs for production/sandbox. (optional)
139+
since = "-7d" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-90d\" (for past 90 days). (optional)
140+
to = "now" # str | Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as \"-10d\" (for past 10 days) or a special \"now\" value. (optional)
141+
count = 10 # int | The amount of items on each page. (optional)
142+
page = 1 # int | Page number of the results returned. (optional)
143+
statuses = [400,500] # [int] | Returns only the predefined status codes. Allows 1xx, 2xx, 3xx, 4xx, and 5xx. (optional)
144+
methods = ["GET","POST"] # [str] | Returns only the predefined HTTP methods. Allows GET, POST, PUT, PATCH, and DELETE. (optional)
145+
search = "documents/hryJY9mqYZHjQCYQuSjRQg/send" # str | Returns the results containing a string. (optional)
146+
environment_type = "PRODUCTION" # str | Returns logs for production/sandbox. (optional)
156147

157148
# example passing only required values which don't have defaults set
158149
# and optional values
159150
try:
160151
# List API Log
161-
api_response = api_instance.list_api_logs(since=since, to=to, count=count, page=page, statuses=statuses, methods=methods, search=search, environment_type=environment_type)
152+
api_response = api_instance.list_api_logs(
153+
since=since,
154+
to=to,
155+
count=count,
156+
page=page,
157+
statuses=statuses,
158+
methods=methods,
159+
search=search,
160+
environment_type=environment_type,
161+
)
162162
pprint(api_response)
163163
except pandadoc_client.ApiException as e:
164164
print("Exception when calling APILogsApi->list_api_logs: %s\n" % e)
165165
```
166166

167-
168167
### Parameters
169168

170169
Name | Type | Description | Notes
@@ -201,5 +200,5 @@ Name | Type | Description | Notes
201200
**401** | Authentication error | - |
202201
**429** | Too Many Requests | - |
203202

204-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
203+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
205204

docs/ContactCreateRequest.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ContactCreateRequest
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**email** | **str** | |
8+
**first_name** | **str, none_type** | | [optional]
9+
**last_name** | **str, none_type** | | [optional]
10+
**company** | **str, none_type** | | [optional]
11+
**job_title** | **str, none_type** | | [optional]
12+
**phone** | **str, none_type** | | [optional]
13+
**state** | **str, none_type** | | [optional]
14+
**street_address** | **str, none_type** | | [optional]
15+
**city** | **str, none_type** | | [optional]
16+
**postal_code** | **str, none_type** | | [optional]
17+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
18+
19+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20+
21+

docs/ContactDetailsResponse.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ContactDetailsResponse
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **str** | | [optional]
8+
**email** | **str** | | [optional]
9+
**first_name** | **str, none_type** | | [optional]
10+
**last_name** | **str, none_type** | | [optional]
11+
**company** | **str, none_type** | | [optional]
12+
**job_title** | **str, none_type** | | [optional]
13+
**phone** | **str, none_type** | | [optional]
14+
**state** | **str, none_type** | | [optional]
15+
**street_address** | **str, none_type** | | [optional]
16+
**city** | **str, none_type** | | [optional]
17+
**postal_code** | **str, none_type** | | [optional]
18+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
19+
20+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
21+
22+

docs/ContactListResponse.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ContactListResponse
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | [**[ContactDetailsResponse]**](ContactDetailsResponse.md) | |
8+
9+
[[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

0 commit comments

Comments
 (0)