Skip to content

Commit

Permalink
Use unambiguous metadata value type definitions in OAS
Browse files Browse the repository at this point in the history
  • Loading branch information
krzlabrdx committed Jul 13, 2023
1 parent 550782f commit b16356c
Show file tree
Hide file tree
Showing 116 changed files with 13,846 additions and 481 deletions.
67 changes: 63 additions & 4 deletions sdk/typescript/lib/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,73 @@ models/InvalidTransactionErrorAllOf.ts
models/LedgerState.ts
models/LedgerStateMixin.ts
models/LedgerStateSelector.ts
models/MetadataBoolArrayValue.ts
models/MetadataBoolArrayValueAllOf.ts
models/MetadataBoolValue.ts
models/MetadataBoolValueAllOf.ts
models/MetadataDecimalArrayValue.ts
models/MetadataDecimalArrayValueAllOf.ts
models/MetadataDecimalValue.ts
models/MetadataDecimalValueAllOf.ts
models/MetadataGlobalAddressArrayValue.ts
models/MetadataGlobalAddressArrayValueAllOf.ts
models/MetadataGlobalAddressValue.ts
models/MetadataGlobalAddressValueAllOf.ts
models/MetadataI32ArrayValue.ts
models/MetadataI32ArrayValueAllOf.ts
models/MetadataI32Value.ts
models/MetadataI32ValueAllOf.ts
models/MetadataI64ArrayValue.ts
models/MetadataI64ArrayValueAllOf.ts
models/MetadataI64Value.ts
models/MetadataI64ValueAllOf.ts
models/MetadataInstantArrayValue.ts
models/MetadataInstantArrayValueAllOf.ts
models/MetadataInstantValue.ts
models/MetadataInstantValueAllOf.ts
models/MetadataNonFungibleGlobalIdArrayValue.ts
models/MetadataNonFungibleGlobalIdArrayValueAllOf.ts
models/MetadataNonFungibleGlobalIdArrayValueAllOfValues.ts
models/MetadataNonFungibleGlobalIdValue.ts
models/MetadataNonFungibleGlobalIdValueAllOf.ts
models/MetadataNonFungibleLocalIdArrayValue.ts
models/MetadataNonFungibleLocalIdArrayValueAllOf.ts
models/MetadataNonFungibleLocalIdValue.ts
models/MetadataNonFungibleLocalIdValueAllOf.ts
models/MetadataOriginArrayValue.ts
models/MetadataOriginArrayValueAllOf.ts
models/MetadataOriginValue.ts
models/MetadataOriginValueAllOf.ts
models/MetadataPublicKeyArrayValue.ts
models/MetadataPublicKeyArrayValueAllOf.ts
models/MetadataPublicKeyHashArrayValue.ts
models/MetadataPublicKeyHashArrayValueAllOf.ts
models/MetadataPublicKeyHashValue.ts
models/MetadataPublicKeyHashValueAllOf.ts
models/MetadataPublicKeyValue.ts
models/MetadataPublicKeyValueAllOf.ts
models/MetadataScalarArrayValue.ts
models/MetadataScalarArrayValueAllOf.ts
models/MetadataScalarValue.ts
models/MetadataScalarValueAllOf.ts
models/MetadataStringArrayValue.ts
models/MetadataStringArrayValueAllOf.ts
models/MetadataStringValue.ts
models/MetadataStringValueAllOf.ts
models/MetadataTypedValue.ts
models/MetadataTypedValueBase.ts
models/MetadataU32ArrayValue.ts
models/MetadataU32ArrayValueAllOf.ts
models/MetadataU32Value.ts
models/MetadataU32ValueAllOf.ts
models/MetadataU64ArrayValue.ts
models/MetadataU64ArrayValueAllOf.ts
models/MetadataU64Value.ts
models/MetadataU64ValueAllOf.ts
models/MetadataU8ArrayValue.ts
models/MetadataU8ArrayValueAllOf.ts
models/MetadataU8Value.ts
models/MetadataU8ValueAllOf.ts
models/MetadataUrlArrayValue.ts
models/MetadataUrlArrayValueAllOf.ts
models/MetadataUrlValue.ts
models/MetadataUrlValueAllOf.ts
models/MetadataValueType.ts
models/NetworkConfigurationResponse.ts
models/NetworkConfigurationResponseWellKnownAddresses.ts
Expand Down Expand Up @@ -89,6 +141,13 @@ models/PublicKeyEcdsaSecp256k1.ts
models/PublicKeyEcdsaSecp256k1AllOf.ts
models/PublicKeyEddsaEd25519.ts
models/PublicKeyEddsaEd25519AllOf.ts
models/PublicKeyHash.ts
models/PublicKeyHashBase.ts
models/PublicKeyHashEcdsaSecp256k1.ts
models/PublicKeyHashEcdsaSecp256k1AllOf.ts
models/PublicKeyHashEddsaEd25519.ts
models/PublicKeyHashEddsaEd25519AllOf.ts
models/PublicKeyHashType.ts
models/PublicKeyType.ts
models/ResourceAggregationLevel.ts
models/ResultSetCursorMixin.ts
Expand Down
85 changes: 85 additions & 0 deletions sdk/typescript/lib/generated/models/MetadataBoolArrayValue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* tslint:disable */
/* eslint-disable */
/**
* Babylon Gateway API - RCnet V2
* This API is exposed by the Babylon Radix Gateway to enable clients to efficiently query current and historic state on the RadixDLT ledger, and intelligently handle transaction submission. It is designed for use by wallets and explorers. For simple use cases, you can typically use the Core API on a Node. A Gateway is only needed for reading historic snapshots of ledger states or a more robust set-up. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/babylon-gateway), which is configured to read from [full node(s)](https://github.com/radixdlt/babylon-node) to extract and index data from the network. This document is an API reference documentation, visit [User Guide](https://docs-babylon.radixdlt.com/) to learn more about how to run a Gateway of your own. ## Integration and forward compatibility guarantees We give no guarantees that other endpoints will not change before Babylon mainnet launch, although changes are expected to be minimal.
*
* The version of the OpenAPI document: 0.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface MetadataBoolArrayValue
*/
export interface MetadataBoolArrayValue {
/**
*
* @type {string}
* @memberof MetadataBoolArrayValue
*/
type: MetadataBoolArrayValueTypeEnum;
/**
*
* @type {Array<boolean>}
* @memberof MetadataBoolArrayValue
*/
values: Array<boolean>;
}


/**
* @export
*/
export const MetadataBoolArrayValueTypeEnum = {
BoolArray: 'BoolArray'
} as const;
export type MetadataBoolArrayValueTypeEnum = typeof MetadataBoolArrayValueTypeEnum[keyof typeof MetadataBoolArrayValueTypeEnum];


/**
* Check if a given object implements the MetadataBoolArrayValue interface.
*/
export function instanceOfMetadataBoolArrayValue(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "values" in value;

return isInstance;
}

export function MetadataBoolArrayValueFromJSON(json: any): MetadataBoolArrayValue {
return MetadataBoolArrayValueFromJSONTyped(json, false);
}

export function MetadataBoolArrayValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetadataBoolArrayValue {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'type': json['type'],
'values': json['values'],
};
}

export function MetadataBoolArrayValueToJSON(value?: MetadataBoolArrayValue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'type': value.type,
'values': value.values,
};
}

84 changes: 84 additions & 0 deletions sdk/typescript/lib/generated/models/MetadataBoolArrayValueAllOf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* tslint:disable */
/* eslint-disable */
/**
* Babylon Gateway API - RCnet V2
* This API is exposed by the Babylon Radix Gateway to enable clients to efficiently query current and historic state on the RadixDLT ledger, and intelligently handle transaction submission. It is designed for use by wallets and explorers. For simple use cases, you can typically use the Core API on a Node. A Gateway is only needed for reading historic snapshots of ledger states or a more robust set-up. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/babylon-gateway), which is configured to read from [full node(s)](https://github.com/radixdlt/babylon-node) to extract and index data from the network. This document is an API reference documentation, visit [User Guide](https://docs-babylon.radixdlt.com/) to learn more about how to run a Gateway of your own. ## Integration and forward compatibility guarantees We give no guarantees that other endpoints will not change before Babylon mainnet launch, although changes are expected to be minimal.
*
* The version of the OpenAPI document: 0.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface MetadataBoolArrayValueAllOf
*/
export interface MetadataBoolArrayValueAllOf {
/**
*
* @type {Array<boolean>}
* @memberof MetadataBoolArrayValueAllOf
*/
values: Array<boolean>;
/**
*
* @type {string}
* @memberof MetadataBoolArrayValueAllOf
*/
type?: MetadataBoolArrayValueAllOfTypeEnum;
}


/**
* @export
*/
export const MetadataBoolArrayValueAllOfTypeEnum = {
BoolArray: 'BoolArray'
} as const;
export type MetadataBoolArrayValueAllOfTypeEnum = typeof MetadataBoolArrayValueAllOfTypeEnum[keyof typeof MetadataBoolArrayValueAllOfTypeEnum];


/**
* Check if a given object implements the MetadataBoolArrayValueAllOf interface.
*/
export function instanceOfMetadataBoolArrayValueAllOf(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "values" in value;

return isInstance;
}

export function MetadataBoolArrayValueAllOfFromJSON(json: any): MetadataBoolArrayValueAllOf {
return MetadataBoolArrayValueAllOfFromJSONTyped(json, false);
}

export function MetadataBoolArrayValueAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetadataBoolArrayValueAllOf {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'values': json['values'],
'type': !exists(json, 'type') ? undefined : json['type'],
};
}

export function MetadataBoolArrayValueAllOfToJSON(value?: MetadataBoolArrayValueAllOf | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'values': value.values,
'type': value.type,
};
}

85 changes: 85 additions & 0 deletions sdk/typescript/lib/generated/models/MetadataBoolValue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* tslint:disable */
/* eslint-disable */
/**
* Babylon Gateway API - RCnet V2
* This API is exposed by the Babylon Radix Gateway to enable clients to efficiently query current and historic state on the RadixDLT ledger, and intelligently handle transaction submission. It is designed for use by wallets and explorers. For simple use cases, you can typically use the Core API on a Node. A Gateway is only needed for reading historic snapshots of ledger states or a more robust set-up. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/babylon-gateway), which is configured to read from [full node(s)](https://github.com/radixdlt/babylon-node) to extract and index data from the network. This document is an API reference documentation, visit [User Guide](https://docs-babylon.radixdlt.com/) to learn more about how to run a Gateway of your own. ## Integration and forward compatibility guarantees We give no guarantees that other endpoints will not change before Babylon mainnet launch, although changes are expected to be minimal.
*
* The version of the OpenAPI document: 0.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface MetadataBoolValue
*/
export interface MetadataBoolValue {
/**
*
* @type {string}
* @memberof MetadataBoolValue
*/
type: MetadataBoolValueTypeEnum;
/**
*
* @type {boolean}
* @memberof MetadataBoolValue
*/
value: boolean;
}


/**
* @export
*/
export const MetadataBoolValueTypeEnum = {
Bool: 'Bool'
} as const;
export type MetadataBoolValueTypeEnum = typeof MetadataBoolValueTypeEnum[keyof typeof MetadataBoolValueTypeEnum];


/**
* Check if a given object implements the MetadataBoolValue interface.
*/
export function instanceOfMetadataBoolValue(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "value" in value;

return isInstance;
}

export function MetadataBoolValueFromJSON(json: any): MetadataBoolValue {
return MetadataBoolValueFromJSONTyped(json, false);
}

export function MetadataBoolValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetadataBoolValue {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'type': json['type'],
'value': json['value'],
};
}

export function MetadataBoolValueToJSON(value?: MetadataBoolValue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'type': value.type,
'value': value.value,
};
}

Loading

0 comments on commit b16356c

Please sign in to comment.