Skip to content

Commit

Permalink
Merge pull request #4 from mondaycom/feat/ori/add-json-data-contract
Browse files Browse the repository at this point in the history
Add generic JsonDataContract
  • Loading branch information
oricho123 authored Jul 7, 2024
2 parents a6983a2 + 32cde19 commit 0a1f542
Show file tree
Hide file tree
Showing 39 changed files with 1,350 additions and 419 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ target/

#Ipython Notebook
.ipynb_checkpoints

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,19 @@ Class | Method | HTTP request | Description

- [GetByKeyFromStorage404Response](docs/GetByKeyFromStorage404Response.md)
- [GetByKeyFromStorage500Response](docs/GetByKeyFromStorage500Response.md)
- [IncrementCounter200Response](docs/IncrementCounter200Response.md)
- [IncrementCounter200ResponseAnyOf](docs/IncrementCounter200ResponseAnyOf.md)
- [IncrementCounter200ResponseAnyOf1](docs/IncrementCounter200ResponseAnyOf1.md)
- [IncrementCounterParams](docs/IncrementCounterParams.md)
- [JsonValue](docs/JsonValue.md)
- [JsonDataContract](docs/JsonDataContract.md)
- [LogMethods](docs/LogMethods.md)
- [Period](docs/Period.md)
- [PublishMessageParams](docs/PublishMessageParams.md)
- [PublishMessageResponse](docs/PublishMessageResponse.md)
- [SecureStorageDataContract](docs/SecureStorageDataContract.md)
- [StorageDataContract](docs/StorageDataContract.md)
- [UpsertByKeyFromStorage200Response](docs/UpsertByKeyFromStorage200Response.md)
- [UpsertByKeyFromStorage200ResponseAnyOf](docs/UpsertByKeyFromStorage200ResponseAnyOf.md)
- [UpsertByKeyFromStorage200ResponseAnyOf1](docs/UpsertByKeyFromStorage200ResponseAnyOf1.md)
- [ValidateSecretParams](docs/ValidateSecretParams.md)
- [ValidateSecretResponse](docs/ValidateSecretResponse.md)
- [WriteLogRequestBody](docs/WriteLogRequestBody.md)
Expand Down
5 changes: 2 additions & 3 deletions docs/EnvironmentVariablesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Method | HTTP request | Description


# **get_environment_variable**
> JsonValue get_environment_variable(name)
> object get_environment_variable(name)


Expand All @@ -18,7 +18,6 @@ Method | HTTP request | Description

```python
import monday_code
from monday_code.models.json_value import JsonValue
from monday_code.rest import ApiException
from pprint import pprint

Expand Down Expand Up @@ -54,7 +53,7 @@ Name | Type | Description | Notes

### Return type

[**JsonValue**](JsonValue.md)
**object**

### Authorization

Expand Down
32 changes: 32 additions & 0 deletions docs/IncrementCounter200Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# IncrementCounter200Response


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**new_counter_value** | **float** | |
**message** | **str** | |
**success** | **bool** | |
**error** | **object** | |

## Example

```python
from monday_code.models.increment_counter200_response import IncrementCounter200Response

# TODO update the JSON string below
json = "{}"
# create an instance of IncrementCounter200Response from a JSON string
increment_counter200_response_instance = IncrementCounter200Response.from_json(json)
# print the JSON string representation of the object
print(IncrementCounter200Response.to_json())

# convert the object into a dict
increment_counter200_response_dict = increment_counter200_response_instance.to_dict()
# create an instance of IncrementCounter200Response from a dict
increment_counter200_response_from_dict = IncrementCounter200Response.from_dict(increment_counter200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions docs/IncrementCounter200ResponseAnyOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# IncrementCounter200ResponseAnyOf


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**new_counter_value** | **object** | | [optional]
**message** | **object** | | [optional]
**success** | **bool** | |
**error** | **str** | |

## Example

```python
from monday_code.models.increment_counter200_response_any_of import IncrementCounter200ResponseAnyOf

# TODO update the JSON string below
json = "{}"
# create an instance of IncrementCounter200ResponseAnyOf from a JSON string
increment_counter200_response_any_of_instance = IncrementCounter200ResponseAnyOf.from_json(json)
# print the JSON string representation of the object
print(IncrementCounter200ResponseAnyOf.to_json())

# convert the object into a dict
increment_counter200_response_any_of_dict = increment_counter200_response_any_of_instance.to_dict()
# create an instance of IncrementCounter200ResponseAnyOf from a dict
increment_counter200_response_any_of_from_dict = IncrementCounter200ResponseAnyOf.from_dict(increment_counter200_response_any_of_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions docs/IncrementCounter200ResponseAnyOf1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# IncrementCounter200ResponseAnyOf1


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **object** | | [optional]
**success** | **bool** | |
**new_counter_value** | **float** | |
**message** | **str** | |

## Example

```python
from monday_code.models.increment_counter200_response_any_of1 import IncrementCounter200ResponseAnyOf1

# TODO update the JSON string below
json = "{}"
# create an instance of IncrementCounter200ResponseAnyOf1 from a JSON string
increment_counter200_response_any_of1_instance = IncrementCounter200ResponseAnyOf1.from_json(json)
# print the JSON string representation of the object
print(IncrementCounter200ResponseAnyOf1.to_json())

# convert the object into a dict
increment_counter200_response_any_of1_dict = increment_counter200_response_any_of1_instance.to_dict()
# create an instance of IncrementCounter200ResponseAnyOf1 from a dict
increment_counter200_response_any_of1_from_dict = IncrementCounter200ResponseAnyOf1.from_dict(increment_counter200_response_any_of1_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


29 changes: 29 additions & 0 deletions docs/JsonDataContract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# JsonDataContract


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **object** | |

## Example

```python
from monday_code.models.json_data_contract import JsonDataContract

# TODO update the JSON string below
json = "{}"
# create an instance of JsonDataContract from a JSON string
json_data_contract_instance = JsonDataContract.from_json(json)
# print the JSON string representation of the object
print(JsonDataContract.to_json())

# convert the object into a dict
json_data_contract_dict = json_data_contract_instance.to_dict()
# create an instance of JsonDataContract from a dict
json_data_contract_from_dict = JsonDataContract.from_dict(json_data_contract_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


28 changes: 0 additions & 28 deletions docs/JsonValue.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/SecureStorageApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ No authorization required
[[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)

# **get_secure_storage**
> SecureStorageDataContract get_secure_storage(key)
> JsonDataContract get_secure_storage(key)


Expand All @@ -81,7 +81,7 @@ No authorization required

```python
import monday_code
from monday_code.models.secure_storage_data_contract import SecureStorageDataContract
from monday_code.models.json_data_contract import JsonDataContract
from monday_code.rest import ApiException
from pprint import pprint

Expand Down Expand Up @@ -117,7 +117,7 @@ Name | Type | Description | Notes

### Return type

[**SecureStorageDataContract**](SecureStorageDataContract.md)
[**JsonDataContract**](JsonDataContract.md)

### Authorization

Expand All @@ -138,7 +138,7 @@ No authorization required
[[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)

# **put_secure_storage**
> object put_secure_storage(key, secure_storage_data_contract)
> bool put_secure_storage(key, json_data_contract)


Expand All @@ -147,7 +147,7 @@ No authorization required

```python
import monday_code
from monday_code.models.secure_storage_data_contract import SecureStorageDataContract
from monday_code.models.json_data_contract import JsonDataContract
from monday_code.rest import ApiException
from pprint import pprint

Expand All @@ -163,10 +163,10 @@ with monday_code.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = monday_code.SecureStorageApi(api_client)
key = 'key_example' # str |
secure_storage_data_contract = monday_code.SecureStorageDataContract() # SecureStorageDataContract |
json_data_contract = monday_code.JsonDataContract() # JsonDataContract |

try:
api_response = api_instance.put_secure_storage(key, secure_storage_data_contract)
api_response = api_instance.put_secure_storage(key, json_data_contract)
print("The response of SecureStorageApi->put_secure_storage:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -181,11 +181,11 @@ with monday_code.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**key** | **str**| |
**secure_storage_data_contract** | [**SecureStorageDataContract**](SecureStorageDataContract.md)| |
**json_data_contract** | [**JsonDataContract**](JsonDataContract.md)| |

### Return type

**object**
**bool**

### Authorization

Expand Down
29 changes: 0 additions & 29 deletions docs/SecureStorageDataContract.md

This file was deleted.

18 changes: 10 additions & 8 deletions docs/StorageApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ No authorization required
[[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)

# **increment_counter**
> object increment_counter(x_monday_access_token, increment_counter_params)
> IncrementCounter200Response increment_counter(x_monday_access_token, increment_counter_params)


Expand All @@ -155,6 +155,7 @@ No authorization required

```python
import monday_code
from monday_code.models.increment_counter200_response import IncrementCounter200Response
from monday_code.models.increment_counter_params import IncrementCounterParams
from monday_code.rest import ApiException
from pprint import pprint
Expand Down Expand Up @@ -193,7 +194,7 @@ Name | Type | Description | Notes

### Return type

**object**
[**IncrementCounter200Response**](IncrementCounter200Response.md)

### Authorization

Expand All @@ -213,7 +214,7 @@ No authorization required
[[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)

# **upsert_by_key_from_storage**
> object upsert_by_key_from_storage(key, x_monday_access_token, storage_data_contract, shared=shared, previous_version=previous_version)
> UpsertByKeyFromStorage200Response upsert_by_key_from_storage(key, x_monday_access_token, json_data_contract, shared=shared, previous_version=previous_version)


Expand All @@ -222,7 +223,8 @@ No authorization required

```python
import monday_code
from monday_code.models.storage_data_contract import StorageDataContract
from monday_code.models.json_data_contract import JsonDataContract
from monday_code.models.upsert_by_key_from_storage200_response import UpsertByKeyFromStorage200Response
from monday_code.rest import ApiException
from pprint import pprint

Expand All @@ -239,12 +241,12 @@ with monday_code.ApiClient(configuration) as api_client:
api_instance = monday_code.StorageApi(api_client)
key = 'key_example' # str |
x_monday_access_token = 'x_monday_access_token_example' # str |
storage_data_contract = monday_code.StorageDataContract() # StorageDataContract |
json_data_contract = monday_code.JsonDataContract() # JsonDataContract |
shared = True # bool | (optional)
previous_version = 'previous_version_example' # str | (optional)

try:
api_response = api_instance.upsert_by_key_from_storage(key, x_monday_access_token, storage_data_contract, shared=shared, previous_version=previous_version)
api_response = api_instance.upsert_by_key_from_storage(key, x_monday_access_token, json_data_contract, shared=shared, previous_version=previous_version)
print("The response of StorageApi->upsert_by_key_from_storage:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -260,13 +262,13 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**key** | **str**| |
**x_monday_access_token** | **str**| |
**storage_data_contract** | [**StorageDataContract**](StorageDataContract.md)| |
**json_data_contract** | [**JsonDataContract**](JsonDataContract.md)| |
**shared** | **bool**| | [optional]
**previous_version** | **str**| | [optional]

### Return type

**object**
[**UpsertByKeyFromStorage200Response**](UpsertByKeyFromStorage200Response.md)

### Authorization

Expand Down
Loading

0 comments on commit 0a1f542

Please sign in to comment.