diff --git a/README.md b/README.md index de986f5..9c1fc04 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Connect is the fastest way to add blockchain capabilities to your app without cr This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: 1.0.17 -- Package version: 1.0.0 +- Package version: 1.0.1 - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -45,7 +45,7 @@ Class | Method | HTTP request | Description *EntriesApi* | [**GetLastEntry**](docs/EntriesApi.md#getlastentry) | **Get** /chains/{chain_id}/entries/last | Get Chain's Last Entry *EntriesApi* | [**PostEntriesSearch**](docs/EntriesApi.md#postentriessearch) | **Post** /chains/{chain_id}/entries/search | Search Chain's Entries *EntriesApi* | [**PostEntryToChainID**](docs/EntriesApi.md#postentrytochainid) | **Post** /chains/{chain_id}/entries | Create an Entry -*InfoApi* | [**GetAllInfo**](docs/InfoApi.md#getallinfo) | **Get** / | API Info +*InfoApi* | [**GetApiInfo**](docs/InfoApi.md#getapiinfo) | **Get** / | API Info ## Documentation For Models @@ -55,6 +55,8 @@ Class | Method | HTTP request | Description - [Chain](docs/Chain.md) - [ChainCreate](docs/ChainCreate.md) - [ChainData](docs/ChainData.md) + - [ChainDataDblock](docs/ChainDataDblock.md) + - [ChainDataEblock](docs/ChainDataEblock.md) - [ChainDataEntries](docs/ChainDataEntries.md) - [ChainLink](docs/ChainLink.md) - [ChainList](docs/ChainList.md) @@ -63,10 +65,10 @@ Class | Method | HTTP request | Description - [Entry](docs/Entry.md) - [EntryCreate](docs/EntryCreate.md) - [EntryData](docs/EntryData.md) + - [EntryDataDblock](docs/EntryDataDblock.md) - [EntryDataEblock](docs/EntryDataEblock.md) - - [EntryLink](docs/EntryLink.md) - - [EntryLinkChain](docs/EntryLinkChain.md) - [EntryList](docs/EntryList.md) + - [EntryListChain](docs/EntryListChain.md) - [EntryListData](docs/EntryListData.md) - [EntrySearchResponse](docs/EntrySearchResponse.md) - [EntrySearchResponseData](docs/EntrySearchResponseData.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 22e6710..8bea746 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -20,7 +20,7 @@ paths: /: get: description: Request general information about the Connect API such as the version and available endpoints. - operationId: getAllInfo + operationId: getApiInfo responses: 200: content: @@ -76,7 +76,7 @@ paths: format: int32 type: integer style: form - - description: The page you would like to request. The first page offset is Zero. + - description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. example: "2" explode: true in: query @@ -89,7 +89,7 @@ paths: - description: 'The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. - For example: `''multi_az,factom''`.' + For example: `''replicated,factom''`.' explode: true in: query name: stages @@ -147,7 +147,7 @@ paths: format: int32 type: integer style: form - - description: The page you would like to request. The first page offset is Zero. + - description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. example: "2" explode: true in: query @@ -223,7 +223,7 @@ paths: format: int32 type: integer style: form - - description: The page you would like to request. The first page offset is Zero. + - description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. example: "2" explode: true in: query @@ -245,7 +245,7 @@ paths: - description: 'The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. - For example: `''multi_az,factom''`.' + For example: `''replicated,factom''`.' explode: true in: query name: stages @@ -382,7 +382,7 @@ paths: format: int32 type: integer style: form - - description: The page you would like to request. The first page offset is Zero. + - description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. example: "2" explode: true in: query @@ -460,7 +460,7 @@ components: type: string style: simple offset: - description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 14. `offset=0` retrieves the first item of the set and is the default position. + description: The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. example: "2" explode: true in: query @@ -485,7 +485,7 @@ components: description: 'The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For - example: `''multi_az,factom''`.' + example: `''replicated,factom''`.' explode: true in: query name: stages @@ -503,7 +503,7 @@ components: schemas: AllInfo: example: - api_version: v1.0.1234 + version: v1.0.1234 links: chains: https://api.factom.com/apollo/v1/chains properties: @@ -535,9 +535,6 @@ components: required: - external_ids type: object - ChainURL: - description: You can send an authenticated GET request to this URL to retrieve information about the specified chain. - type: string ChainLink: description: An object that contains the Chain Hash (ID) as well as a URL for the chain. example: @@ -565,7 +562,7 @@ components: callback_url: http://httpbin.org/post?my_id="12345" callback_stages: - factom - - bitcoin + - anchored properties: external_ids: description: Tags that can be used to identify your chain. You can search for records that contain a particular external_id using Connect. You must send External IDs in Base64 format. @@ -608,7 +605,7 @@ components: $ref: '#/components/schemas/ChainList_data' type: array offset: - description: The first chain returned from the total set (Starting from 0). + description: The index of the first chain returned from the total set (Starting from 0). format: int32 type: integer limit: @@ -669,44 +666,17 @@ components: - entry_hash - stage type: object - EntryURL: - description: You can send an authenticated GET request to this url to retrieve information about the specified entry. - title: Entry URL - type: string - EntryLink: - description: An object that contains the Entry Hash (ID) and a URL for the entry. - example: - entry_hash: ea - links: - entry: https://api.factom.com/apollo/v1/chains/285904/entries/ea - properties: - entry_hash: - description: The SHA256 Hash of this entry. - type: string - chain: - $ref: '#/components/schemas/EntryLink_chain' - created_at: - description: 'The time at which this entry was created. Sent in [ISO 8601 - Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ`' - type: string - href: - description: An API link to retrieve all information about this entry. - type: string - required: - - chain - - created_at - - entry_hash - - href - type: object EntrySearchResponse: example: data: - - href: href + - stage: stage + href: href external_ids: - external_ids - external_ids entry_hash: entry_hash - - href: href + - stage: stage + href: href external_ids: - external_ids - external_ids @@ -721,7 +691,7 @@ components: $ref: '#/components/schemas/EntrySearchResponse_data' type: array offset: - description: The first item returned from the total set (Starting from 0). + description: The index of the first item returned from the total set (Starting from 0). format: int32 type: integer limit: @@ -760,7 +730,7 @@ components: $ref: '#/components/schemas/EntryList_data' type: array offset: - description: The first entry returned from the total set (Starting from 0). + description: The index of the first entry returned from the total set (Starting from 0). format: int32 type: integer limit: @@ -789,7 +759,7 @@ components: callback_url: http://httpbin.org/post?my_id="12345" callback_stages: - factom - - bitcoin + - anchored properties: external_ids: description: Tags that can be used to identify your entry. You can search for records that contain a particular `external_id` using Connect. External IDs should be sent in Base64. @@ -840,7 +810,7 @@ components: description: The SHA256 Hash of the entry you just created. You can use this hash to referece this entry in the future. type: string stage: - description: The current immutability stage of the new entry. Only returned if callbacks are enabled. + description: The current immutability stage of the new entry. type: string type: object AllInfo_links: @@ -864,10 +834,21 @@ components: href: description: An API link to retrieve all information about this chain. type: string + stage: + description: The level of immutability that this chain has reached. + type: string + created_at: + description: 'The time at which this chain was created. Sent in [ISO 8601 + Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` + This will be null if the chain is not at least at the `factom` immutability + stage.' + type: string required: - chain_id + - created_at - external_ids - href + - stage Chain_data_entries: properties: href: @@ -875,11 +856,36 @@ components: type: string required: - href + Chain_data_eblock: + description: Represents the Entry Block that contains the first entry of this chain. This will be null if the chain is not at least at the `factom` immutability stage. + properties: + keymr: + description: The Key Merkle Root for this entry block. + type: string + href: + description: An API link to retrieve all information about this entry block. + type: string + Chain_data_dblock: + description: Represents the Directory Block that relates to this chain. This will be null if the chain is not at least at the `factom` immutability stage. + properties: + keymr: + description: The Key Merkle Root for this directory block. + type: string + height: + description: The Factom blockchain height of this directory block. + format: int32 + type: integer + href: + description: An API link to retrieve all information about this directory block. + type: string Chain_data: properties: chain_id: description: This is the unique identifier created for each chain. type: string + content: + description: This is the data that was stored in the first entry of this chain. + type: string external_ids: description: Tags that have been used to identify this entry. items: @@ -887,27 +893,32 @@ components: type: array stage: description: The immutability stage that this chain has reached. - example: Public Witness + example: replicated type: string entries: $ref: '#/components/schemas/Chain_data_entries' + eblock: + $ref: '#/components/schemas/Chain_data_eblock' + dblock: + $ref: '#/components/schemas/Chain_data_dblock' + created_at: + description: 'The time at which this chain was created. Sent in [ISO 8601 + Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` + This will be null if the chain is not at least at the `factom` immutability + stage.' + type: string required: - chain_id + - content + - created_at + - dblock + - eblock - entries - external_ids - stage - EntryLink_chain: - description: An object that contains the Chain Hash (ID) as well as a URL for the chain. - example: '{"chain_id":"285904","links":{"chain":"https://api.factom.com/apollo/v1/chains/285904"}}' - properties: - chain_id: - description: The ID for this chain on the Factom blockchain. - type: string - href: - description: An API link to retrieve all information about this chain. - type: string EntrySearchResponse_data: example: + stage: stage href: href external_ids: - external_ids @@ -922,6 +933,9 @@ components: items: type: string type: array + stage: + description: The level of immutability that this entry has reached. + type: string href: description: An API link to retrieve all information about this entry. type: string @@ -929,6 +943,17 @@ components: - entry_hash - external_ids - href + - stage + EntryList_chain: + description: An object that contains the Chain Hash (ID) as well as a URL for the chain. + example: '{"chain_id":"285904","links":{"chain":"https://api.factom.com/apollo/v1/chains/285904"}}' + properties: + chain_id: + description: The ID for this chain on the Factom blockchain. + type: string + href: + description: An API link to retrieve all information about this chain. + type: string EntryList_data: example: chain: '{"chain_id":"285904","links":{"chain":"https://api.factom.com/apollo/v1/chains/285904"}}' @@ -940,10 +965,10 @@ components: description: The SHA256 Hash of this entry. type: string chain: - $ref: '#/components/schemas/EntryLink_chain' + $ref: '#/components/schemas/EntryList_chain' created_at: description: 'The time at which this entry was created. Sent in [ISO 8601 - Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ`' + Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ`' type: string href: description: An API link to retrieve all information about this entry. @@ -953,7 +978,21 @@ components: - created_at - entry_hash - href + Entry_data_dblock: + description: Represents the Directory Block that relates to this entry. This will be null if the chain is not at least at the `factom` immutability stage. + properties: + keymr: + description: The Key Merkle Root for this directory block. + type: string + height: + description: The Factom blockchain height of this directory block. + format: int32 + type: integer + href: + description: An API link to retrieve all information about this directory block. + type: string Entry_data_eblock: + description: Represents the Entry Block that contains the entry. This will be null if the entry is not at least at the `factom` immutability stage. properties: keymr: description: The Key Merkle Root for this entry block. @@ -967,10 +1006,10 @@ components: description: The SHA256 Hash of this entry. type: string chain: - $ref: '#/components/schemas/EntryLink_chain' + $ref: '#/components/schemas/EntryList_chain' created_at: description: 'The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). - For example: `YYYY-MM-DDThh:mm:ssZ`' + For example: `YYYY-MM-DDThh:mm:ss.ssssssZ`' type: string external_ids: description: Tags that can be used to identify your entry. You can search for records that contain a particular external_id using Connect. External IDs are returned in Base64. @@ -983,8 +1022,19 @@ components: stage: description: The level of immutability that this entry has reached. type: string + dblock: + $ref: '#/components/schemas/Entry_data_dblock' eblock: $ref: '#/components/schemas/Entry_data_eblock' + required: + - chain + - content + - created_at + - dblock + - eblock + - entry_hash + - external_ids + - stage securitySchemes: AppId: description: You must include a user key in the header of all requests to Factom Connect. If you attempt to communicate with the API without this key, you will trigger an error response. diff --git a/api_chains.go b/api_chains.go index 502583c..093d370 100644 --- a/api_chains.go +++ b/api_chains.go @@ -147,8 +147,8 @@ Returns all of the chains on factomd. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param optional nil or *GetChainsOpts - Optional Parameters: * @param "Limit" (optional.Int32) - The number of items you would like back in each page. - * @param "Offset" (optional.Int32) - The page you would like to request. The first page offset is Zero. - * @param "Stages" (optional.String) - The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'multi_az,factom'`. + * @param "Offset" (optional.Int32) - The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. + * @param "Stages" (optional.String) - The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'replicated,factom'`. @return ChainList */ @@ -395,7 +395,7 @@ Finds all of the chains with `external_ids` that match what you've * @param searchBody * @param optional nil or *PostChainSearchOpts - Optional Parameters: * @param "Limit" (optional.Int32) - The number of items you would like back in each page. - * @param "Offset" (optional.Int32) - The page you would like to request. The first page offset is Zero. + * @param "Offset" (optional.Int32) - The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. @return ChainList */ diff --git a/api_entries.go b/api_entries.go index 10d375d..cae7f74 100644 --- a/api_entries.go +++ b/api_entries.go @@ -34,8 +34,8 @@ List all entries contained on the specified chain. * @param chainId Chain identifier * @param optional nil or *GetEntriesByChainIDOpts - Optional Parameters: * @param "Limit" (optional.Int32) - The number of items you would like back in each page. - * @param "Offset" (optional.Int32) - The page you would like to request. The first page offset is Zero. - * @param "Stages" (optional.String) - The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'multi_az,factom'`. + * @param "Offset" (optional.Int32) - The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. + * @param "Stages" (optional.String) - The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'replicated,factom'`. @return EntryList */ @@ -513,7 +513,7 @@ Find all of the entries within the specified chain that have the requested ` * @param searchBody * @param optional nil or *PostEntriesSearchOpts - Optional Parameters: * @param "Limit" (optional.Int32) - The number of items you would like back in each page. - * @param "Offset" (optional.Int32) - The page you would like to request. The first page offset is Zero. + * @param "Offset" (optional.Int32) - The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. @return EntrySearchResponse */ diff --git a/api_info.go b/api_info.go index ba45035..ebb6654 100644 --- a/api_info.go +++ b/api_info.go @@ -31,7 +31,7 @@ Request general information about the Connect API such as the version and availa * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return AllInfo */ -func (a *InfoApiService) GetAllInfo(ctx context.Context) (AllInfo, *http.Response, error) { +func (a *InfoApiService) GetApiInfo(ctx context.Context) (AllInfo, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} diff --git a/configuration.go b/configuration.go index cdebcda..a2bd568 100644 --- a/configuration.go +++ b/configuration.go @@ -63,7 +63,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://connect-shared-sandbox-2445582615332.production.gw.apicast.io/v1", DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", + UserAgent: "OpenAPI-Generator/1.0.1/go", } return cfg } diff --git a/docs/ChainData.md b/docs/ChainData.md index 9acf3a6..f13af07 100644 --- a/docs/ChainData.md +++ b/docs/ChainData.md @@ -4,9 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ChainId** | **string** | This is the unique identifier created for each chain. | +**Content** | **string** | This is the data that was stored in the first entry of this chain. | **ExternalIds** | **[]string** | Tags that have been used to identify this entry. | **Stage** | **string** | The immutability stage that this chain has reached. | **Entries** | [**ChainDataEntries**](Chain_data_entries.md) | | +**Eblock** | [**ChainDataEblock**](Chain_data_eblock.md) | | +**Dblock** | [**ChainDataDblock**](Chain_data_dblock.md) | | +**CreatedAt** | **string** | The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChainDataDblock.md b/docs/ChainDataDblock.md new file mode 100644 index 0000000..0d6da9e --- /dev/null +++ b/docs/ChainDataDblock.md @@ -0,0 +1,12 @@ +# ChainDataDblock + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keymr** | **string** | The Key Merkle Root for this directory block. | [optional] +**Height** | **int32** | The Factom blockchain height of this directory block. | [optional] +**Href** | **string** | An API link to retrieve all information about this directory block. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChainDataEblock.md b/docs/ChainDataEblock.md new file mode 100644 index 0000000..5a147a8 --- /dev/null +++ b/docs/ChainDataEblock.md @@ -0,0 +1,11 @@ +# ChainDataEblock + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keymr** | **string** | The Key Merkle Root for this entry block. | [optional] +**Href** | **string** | An API link to retrieve all information about this entry block. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChainList.md b/docs/ChainList.md index 50cb735..9cc589c 100644 --- a/docs/ChainList.md +++ b/docs/ChainList.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [**[]ChainListData**](ChainList_data.md) | An array that contains the chains on this page. | -**Offset** | **int32** | The first chain returned from the total set (Starting from 0). | +**Offset** | **int32** | The index of the first chain returned from the total set (Starting from 0). | **Limit** | **int32** | The number of chains returned. | **Count** | **int32** | The total number of chains seen. | diff --git a/docs/ChainListData.md b/docs/ChainListData.md index 01ace6d..871ef60 100644 --- a/docs/ChainListData.md +++ b/docs/ChainListData.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes **ChainId** | **string** | The ID for this chain on the Factom blockchain. | **ExternalIds** | **[]string** | The external IDs attached to this chain on the Factom blockchain. | **Href** | **string** | An API link to retrieve all information about this chain. | +**Stage** | **string** | The level of immutability that this chain has reached. | +**CreatedAt** | **string** | The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChainsApi.md b/docs/ChainsApi.md index 1181d2c..21df999 100644 --- a/docs/ChainsApi.md +++ b/docs/ChainsApi.md @@ -57,8 +57,8 @@ Optional parameters are passed through a pointer to a GetChainsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int32**| The number of items you would like back in each page. | - **offset** | **optional.Int32**| The page you would like to request. The first page offset is Zero. | - **stages** | **optional.String**| The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'multi_az,factom'`. | + **offset** | **optional.Int32**| The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. | + **stages** | **optional.String**| The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'replicated,factom'`. | ### Return type @@ -124,7 +124,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int32**| The number of items you would like back in each page. | - **offset** | **optional.Int32**| The page you would like to request. The first page offset is Zero. | + **offset** | **optional.Int32**| The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. | ### Return type diff --git a/docs/EntriesApi.md b/docs/EntriesApi.md index 02505c6..57f8307 100644 --- a/docs/EntriesApi.md +++ b/docs/EntriesApi.md @@ -33,8 +33,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int32**| The number of items you would like back in each page. | - **offset** | **optional.Int32**| The page you would like to request. The first page offset is Zero. | - **stages** | **optional.String**| The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'multi_az,factom'`. | + **offset** | **optional.Int32**| The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. | + **stages** | **optional.String**| The immutability stages you want to restrict results to. You can choose any from `replicated`, `factom`, and `anchored`. If you would like to search among multiple stages, send them in a comma separated string. For example: `'replicated,factom'`. | ### Return type @@ -159,7 +159,7 @@ Name | Type | Description | Notes **limit** | **optional.Int32**| The number of items you would like back in each page. | - **offset** | **optional.Int32**| The page you would like to request. The first page offset is Zero. | + **offset** | **optional.Int32**| The offset parameter allows you to select which item you would like to start from when you get back a list from Connect. For example, if you've already seen the first 15 items and you'd like the next set, you would send an offset of 15. `offset=0` starts from the first item of the set and is the default position. | ### Return type diff --git a/docs/EntryData.md b/docs/EntryData.md index 04d3eec..96d53f2 100644 --- a/docs/EntryData.md +++ b/docs/EntryData.md @@ -3,13 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EntryHash** | **string** | The SHA256 Hash of this entry. | [optional] -**Chain** | [**EntryLinkChain**](EntryLink_chain.md) | | [optional] -**CreatedAt** | **string** | The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` | [optional] -**ExternalIds** | **[]string** | Tags that can be used to identify your entry. You can search for records that contain a particular external_id using Connect. External IDs are returned in Base64. | [optional] -**Content** | **string** | This is the data that is stored by the entry. Content will be sent in Base64 format. | [optional] -**Stage** | **string** | The level of immutability that this entry has reached. | [optional] -**Eblock** | [**EntryDataEblock**](Entry_data_eblock.md) | | [optional] +**EntryHash** | **string** | The SHA256 Hash of this entry. | +**Chain** | [**EntryListChain**](EntryList_chain.md) | | +**CreatedAt** | **string** | The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` | +**ExternalIds** | **[]string** | Tags that can be used to identify your entry. You can search for records that contain a particular external_id using Connect. External IDs are returned in Base64. | +**Content** | **string** | This is the data that is stored by the entry. Content will be sent in Base64 format. | +**Stage** | **string** | The level of immutability that this entry has reached. | +**Dblock** | [**EntryDataDblock**](Entry_data_dblock.md) | | +**Eblock** | [**EntryDataEblock**](Entry_data_eblock.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntryDataDblock.md b/docs/EntryDataDblock.md new file mode 100644 index 0000000..e769e85 --- /dev/null +++ b/docs/EntryDataDblock.md @@ -0,0 +1,12 @@ +# EntryDataDblock + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keymr** | **string** | The Key Merkle Root for this directory block. | [optional] +**Height** | **int32** | The Factom blockchain height of this directory block. | [optional] +**Href** | **string** | An API link to retrieve all information about this directory block. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntryLink.md b/docs/EntryLink.md deleted file mode 100644 index 61f8682..0000000 --- a/docs/EntryLink.md +++ /dev/null @@ -1,13 +0,0 @@ -# EntryLink - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EntryHash** | **string** | The SHA256 Hash of this entry. | -**Chain** | [**EntryLinkChain**](EntryLink_chain.md) | | -**CreatedAt** | **string** | The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` | -**Href** | **string** | An API link to retrieve all information about this entry. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EntryList.md b/docs/EntryList.md index 8de57b7..8efa638 100644 --- a/docs/EntryList.md +++ b/docs/EntryList.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [**[]EntryListData**](EntryList_data.md) | An array that contains the entries on this page. | -**Offset** | **int32** | The first entry returned from the total set (Starting from 0). | +**Offset** | **int32** | The index of the first entry returned from the total set (Starting from 0). | **Limit** | **int32** | The number of entries returned. | **Count** | **int32** | The total number of entries seen. | diff --git a/docs/EntryLinkChain.md b/docs/EntryListChain.md similarity index 96% rename from docs/EntryLinkChain.md rename to docs/EntryListChain.md index 66fce05..bcf120e 100644 --- a/docs/EntryLinkChain.md +++ b/docs/EntryListChain.md @@ -1,4 +1,4 @@ -# EntryLinkChain +# EntryListChain ## Properties Name | Type | Description | Notes diff --git a/docs/EntryListData.md b/docs/EntryListData.md index 88fa74f..dd712b1 100644 --- a/docs/EntryListData.md +++ b/docs/EntryListData.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EntryHash** | **string** | The SHA256 Hash of this entry. | -**Chain** | [**EntryLinkChain**](EntryLink_chain.md) | | -**CreatedAt** | **string** | The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` | +**Chain** | [**EntryListChain**](EntryList_chain.md) | | +**CreatedAt** | **string** | The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` | **Href** | **string** | An API link to retrieve all information about this entry. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntrySearchResponse.md b/docs/EntrySearchResponse.md index 55eebc9..46375a8 100644 --- a/docs/EntrySearchResponse.md +++ b/docs/EntrySearchResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | [**[]EntrySearchResponseData**](EntrySearchResponse_data.md) | An array of entries that match your search criterion. | -**Offset** | **int32** | The first item returned from the total set (Starting from 0). | +**Offset** | **int32** | The index of the first item returned from the total set (Starting from 0). | **Limit** | **int32** | The maximum number of entries per page. | **Count** | **int32** | The total number of entries seen. | diff --git a/docs/EntrySearchResponseData.md b/docs/EntrySearchResponseData.md index a6d6f97..b41603d 100644 --- a/docs/EntrySearchResponseData.md +++ b/docs/EntrySearchResponseData.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EntryHash** | **string** | The SHA256 Hash of this entry. | **ExternalIds** | **[]string** | Tags that can be used to identify this entry. | +**Stage** | **string** | The level of immutability that this entry has reached. | **Href** | **string** | An API link to retrieve all information about this entry. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntryShort.md b/docs/EntryShort.md index ded5dde..9079a71 100644 --- a/docs/EntryShort.md +++ b/docs/EntryShort.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EntryHash** | **string** | The SHA256 Hash of the entry you just created. You can use this hash to referece this entry in the future. | [optional] -**Stage** | **string** | The current immutability stage of the new entry. Only returned if callbacks are enabled. | [optional] +**Stage** | **string** | The current immutability stage of the new entry. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InfoApi.md b/docs/InfoApi.md index a9af646..da43284 100644 --- a/docs/InfoApi.md +++ b/docs/InfoApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://connect-shared-sandbox-2445582615332.productio Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetAllInfo**](InfoApi.md#GetAllInfo) | **Get** / | API Info +[**GetApiInfo**](InfoApi.md#GetApiInfo) | **Get** / | API Info -# **GetAllInfo** -> AllInfo GetAllInfo(ctx, ) +# **GetApiInfo** +> AllInfo GetApiInfo(ctx, ) API Info Request general information about the Connect API such as the version and available endpoints. diff --git a/model_chain_data.go b/model_chain_data.go index f6d3b8d..d137b51 100644 --- a/model_chain_data.go +++ b/model_chain_data.go @@ -13,9 +13,15 @@ package connectclient type ChainData struct { // This is the unique identifier created for each chain. ChainId string `json:"chain_id"` + // This is the data that was stored in the first entry of this chain. + Content string `json:"content"` // Tags that have been used to identify this entry. ExternalIds []string `json:"external_ids"` // The immutability stage that this chain has reached. Stage string `json:"stage"` Entries ChainDataEntries `json:"entries"` + Eblock ChainDataEblock `json:"eblock"` + Dblock ChainDataDblock `json:"dblock"` + // The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. + CreatedAt string `json:"created_at"` } diff --git a/model_chain_data_dblock.go b/model_chain_data_dblock.go new file mode 100644 index 0000000..a9d98d7 --- /dev/null +++ b/model_chain_data_dblock.go @@ -0,0 +1,21 @@ +/* + * Harmony Connect + * + * An easy to use API that helps you access the Factom blockchain. + * + * API version: 1.0.17 + * Contact: harmony-support@factom.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package connectclient + +// Represents the Directory Block that relates to this chain. This will be null if the chain is not at least at the `factom` immutability stage. +type ChainDataDblock struct { + // The Key Merkle Root for this directory block. + Keymr string `json:"keymr,omitempty"` + // The Factom blockchain height of this directory block. + Height int32 `json:"height,omitempty"` + // An API link to retrieve all information about this directory block. + Href string `json:"href,omitempty"` +} diff --git a/model_chain_data_eblock.go b/model_chain_data_eblock.go new file mode 100644 index 0000000..e0fbb3b --- /dev/null +++ b/model_chain_data_eblock.go @@ -0,0 +1,19 @@ +/* + * Harmony Connect + * + * An easy to use API that helps you access the Factom blockchain. + * + * API version: 1.0.17 + * Contact: harmony-support@factom.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package connectclient + +// Represents the Entry Block that contains the first entry of this chain. This will be null if the chain is not at least at the `factom` immutability stage. +type ChainDataEblock struct { + // The Key Merkle Root for this entry block. + Keymr string `json:"keymr,omitempty"` + // An API link to retrieve all information about this entry block. + Href string `json:"href,omitempty"` +} diff --git a/model_chain_list.go b/model_chain_list.go index 6761fa7..7250c39 100644 --- a/model_chain_list.go +++ b/model_chain_list.go @@ -14,7 +14,7 @@ package connectclient type ChainList struct { // An array that contains the chains on this page. Data []ChainListData `json:"data"` - // The first chain returned from the total set (Starting from 0). + // The index of the first chain returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of chains returned. Limit int32 `json:"limit"` diff --git a/model_chain_list_data.go b/model_chain_list_data.go index dfe18d1..5ccb7cc 100644 --- a/model_chain_list_data.go +++ b/model_chain_list_data.go @@ -17,4 +17,8 @@ type ChainListData struct { ExternalIds []string `json:"external_ids"` // An API link to retrieve all information about this chain. Href string `json:"href"` + // The level of immutability that this chain has reached. + Stage string `json:"stage"` + // The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. + CreatedAt string `json:"created_at"` } diff --git a/model_entry_data.go b/model_entry_data.go index 0bd29fb..d2375ff 100644 --- a/model_entry_data.go +++ b/model_entry_data.go @@ -12,15 +12,16 @@ package connectclient type EntryData struct { // The SHA256 Hash of this entry. - EntryHash string `json:"entry_hash,omitempty"` - Chain EntryLinkChain `json:"chain,omitempty"` - // The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` - CreatedAt string `json:"created_at,omitempty"` + EntryHash string `json:"entry_hash"` + Chain EntryListChain `json:"chain"` + // The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` + CreatedAt string `json:"created_at"` // Tags that can be used to identify your entry. You can search for records that contain a particular external_id using Connect. External IDs are returned in Base64. - ExternalIds []string `json:"external_ids,omitempty"` + ExternalIds []string `json:"external_ids"` // This is the data that is stored by the entry. Content will be sent in Base64 format. - Content string `json:"content,omitempty"` + Content string `json:"content"` // The level of immutability that this entry has reached. - Stage string `json:"stage,omitempty"` - Eblock EntryDataEblock `json:"eblock,omitempty"` + Stage string `json:"stage"` + Dblock EntryDataDblock `json:"dblock"` + Eblock EntryDataEblock `json:"eblock"` } diff --git a/model_entry_data_dblock.go b/model_entry_data_dblock.go new file mode 100644 index 0000000..63d51d4 --- /dev/null +++ b/model_entry_data_dblock.go @@ -0,0 +1,21 @@ +/* + * Harmony Connect + * + * An easy to use API that helps you access the Factom blockchain. + * + * API version: 1.0.17 + * Contact: harmony-support@factom.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package connectclient + +// Represents the Directory Block that relates to this entry. This will be null if the chain is not at least at the `factom` immutability stage. +type EntryDataDblock struct { + // The Key Merkle Root for this directory block. + Keymr string `json:"keymr,omitempty"` + // The Factom blockchain height of this directory block. + Height int32 `json:"height,omitempty"` + // An API link to retrieve all information about this directory block. + Href string `json:"href,omitempty"` +} diff --git a/model_entry_data_eblock.go b/model_entry_data_eblock.go index f6ed32f..ccdf1a9 100644 --- a/model_entry_data_eblock.go +++ b/model_entry_data_eblock.go @@ -10,6 +10,7 @@ package connectclient +// Represents the Entry Block that contains the entry. This will be null if the entry is not at least at the `factom` immutability stage. type EntryDataEblock struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` diff --git a/model_entry_link.go b/model_entry_link.go deleted file mode 100644 index 35d9167..0000000 --- a/model_entry_link.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Harmony Connect - * - * An easy to use API that helps you access the Factom blockchain. - * - * API version: 1.0.17 - * Contact: harmony-support@factom.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package connectclient - -// An object that contains the Entry Hash (ID) and a URL for the entry. -type EntryLink struct { - // The SHA256 Hash of this entry. - EntryHash string `json:"entry_hash"` - Chain EntryLinkChain `json:"chain"` - // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` - CreatedAt string `json:"created_at"` - // An API link to retrieve all information about this entry. - Href string `json:"href"` -} diff --git a/model_entry_list.go b/model_entry_list.go index 7de2116..4a70a67 100644 --- a/model_entry_list.go +++ b/model_entry_list.go @@ -14,7 +14,7 @@ package connectclient type EntryList struct { // An array that contains the entries on this page. Data []EntryListData `json:"data"` - // The first entry returned from the total set (Starting from 0). + // The index of the first entry returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of entries returned. Limit int32 `json:"limit"` diff --git a/model_entry_link_chain.go b/model_entry_list_chain.go similarity index 94% rename from model_entry_link_chain.go rename to model_entry_list_chain.go index d4c7bdd..73a84ee 100644 --- a/model_entry_link_chain.go +++ b/model_entry_list_chain.go @@ -11,7 +11,7 @@ package connectclient // An object that contains the Chain Hash (ID) as well as a URL for the chain. -type EntryLinkChain struct { +type EntryListChain struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id,omitempty"` // An API link to retrieve all information about this chain. diff --git a/model_entry_list_data.go b/model_entry_list_data.go index 943b377..c7cecbc 100644 --- a/model_entry_list_data.go +++ b/model_entry_list_data.go @@ -13,8 +13,8 @@ package connectclient type EntryListData struct { // The SHA256 Hash of this entry. EntryHash string `json:"entry_hash"` - Chain EntryLinkChain `json:"chain"` - // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` + Chain EntryListChain `json:"chain"` + // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` CreatedAt string `json:"created_at"` // An API link to retrieve all information about this entry. Href string `json:"href"` diff --git a/model_entry_search_response.go b/model_entry_search_response.go index 815275a..0324d0f 100644 --- a/model_entry_search_response.go +++ b/model_entry_search_response.go @@ -13,7 +13,7 @@ package connectclient type EntrySearchResponse struct { // An array of entries that match your search criterion. Data []EntrySearchResponseData `json:"data"` - // The first item returned from the total set (Starting from 0). + // The index of the first item returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The maximum number of entries per page. Limit int32 `json:"limit"` diff --git a/model_entry_search_response_data.go b/model_entry_search_response_data.go index 7429439..b22091f 100644 --- a/model_entry_search_response_data.go +++ b/model_entry_search_response_data.go @@ -15,6 +15,8 @@ type EntrySearchResponseData struct { EntryHash string `json:"entry_hash"` // Tags that can be used to identify this entry. ExternalIds []string `json:"external_ids"` + // The level of immutability that this entry has reached. + Stage string `json:"stage"` // An API link to retrieve all information about this entry. Href string `json:"href"` } diff --git a/model_entry_short.go b/model_entry_short.go index 8a26384..ae3ed54 100644 --- a/model_entry_short.go +++ b/model_entry_short.go @@ -13,6 +13,6 @@ package connectclient type EntryShort struct { // The SHA256 Hash of the entry you just created. You can use this hash to referece this entry in the future. EntryHash string `json:"entry_hash,omitempty"` - // The current immutability stage of the new entry. Only returned if callbacks are enabled. + // The current immutability stage of the new entry. Stage string `json:"stage,omitempty"` }