@space-cow-media/spellbook-client 3.14.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apis/cardListFromTextApi.d.ts +33 -0
- package/dist/apis/cardListFromTextApi.js +135 -0
- package/dist/apis/cardListFromTextApi.js.map +1 -0
- package/dist/apis/cardListFromUrlApi.d.ts +27 -0
- package/dist/apis/cardListFromUrlApi.js +103 -0
- package/dist/apis/cardListFromUrlApi.js.map +1 -0
- package/dist/apis/cardsApi.d.ts +40 -0
- package/dist/apis/cardsApi.js +151 -0
- package/dist/apis/cardsApi.js.map +1 -0
- package/dist/apis/defaultApi.d.ts +47 -0
- package/dist/apis/defaultApi.js +143 -0
- package/dist/apis/defaultApi.js.map +1 -0
- package/dist/apis/featuresApi.d.ts +38 -0
- package/dist/apis/featuresApi.js +145 -0
- package/dist/apis/featuresApi.js.map +1 -0
- package/dist/apis/findMyCombosApi.d.ts +47 -0
- package/dist/apis/findMyCombosApi.js +171 -0
- package/dist/apis/findMyCombosApi.js.map +1 -0
- package/dist/apis/index.d.ts +13 -0
- package/dist/apis/index.js +32 -0
- package/dist/apis/index.js.map +1 -0
- package/dist/apis/propertiesApi.d.ts +37 -0
- package/dist/apis/propertiesApi.js +142 -0
- package/dist/apis/propertiesApi.js.map +1 -0
- package/dist/apis/templatesApi.d.ts +38 -0
- package/dist/apis/templatesApi.js +145 -0
- package/dist/apis/templatesApi.js.map +1 -0
- package/dist/apis/tokenApi.d.ts +51 -0
- package/dist/apis/tokenApi.js +153 -0
- package/dist/apis/tokenApi.js.map +1 -0
- package/dist/apis/usersApi.d.ts +66 -0
- package/dist/apis/usersApi.js +256 -0
- package/dist/apis/usersApi.js.map +1 -0
- package/dist/apis/variantAliasesApi.d.ts +37 -0
- package/dist/apis/variantAliasesApi.js +142 -0
- package/dist/apis/variantAliasesApi.js.map +1 -0
- package/dist/apis/variantSuggestionsApi.d.ts +76 -0
- package/dist/apis/variantSuggestionsApi.js +297 -0
- package/dist/apis/variantSuggestionsApi.js.map +1 -0
- package/dist/apis/variantsApi.d.ts +41 -0
- package/dist/apis/variantsApi.js +154 -0
- package/dist/apis/variantsApi.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/models/card.d.ts +56 -0
- package/dist/models/card.js +66 -0
- package/dist/models/card.js.map +1 -0
- package/dist/models/cardDetail.d.ts +126 -0
- package/dist/models/cardDetail.js +110 -0
- package/dist/models/cardDetail.js.map +1 -0
- package/dist/models/cardInDeck.d.ts +38 -0
- package/dist/models/cardInDeck.js +55 -0
- package/dist/models/cardInDeck.js.map +1 -0
- package/dist/models/cardInDeckRequest.d.ts +38 -0
- package/dist/models/cardInDeckRequest.js +53 -0
- package/dist/models/cardInDeckRequest.js.map +1 -0
- package/dist/models/cardInVariant.d.ts +75 -0
- package/dist/models/cardInVariant.js +73 -0
- package/dist/models/cardInVariant.js.map +1 -0
- package/dist/models/cardLegalities.d.ts +104 -0
- package/dist/models/cardLegalities.js +99 -0
- package/dist/models/cardLegalities.js.map +1 -0
- package/dist/models/cardPrices.d.ts +44 -0
- package/dist/models/cardPrices.js +59 -0
- package/dist/models/cardPrices.js.map +1 -0
- package/dist/models/cardUsedInVariantSuggestion.d.ts +75 -0
- package/dist/models/cardUsedInVariantSuggestion.js +80 -0
- package/dist/models/cardUsedInVariantSuggestion.js.map +1 -0
- package/dist/models/cardUsedInVariantSuggestionRequest.d.ts +75 -0
- package/dist/models/cardUsedInVariantSuggestionRequest.js +68 -0
- package/dist/models/cardUsedInVariantSuggestionRequest.js.map +1 -0
- package/dist/models/combo.d.ts +32 -0
- package/dist/models/combo.js +49 -0
- package/dist/models/combo.js.map +1 -0
- package/dist/models/deck.d.ts +39 -0
- package/dist/models/deck.js +56 -0
- package/dist/models/deck.js.map +1 -0
- package/dist/models/deckRequest.d.ts +39 -0
- package/dist/models/deckRequest.js +52 -0
- package/dist/models/deckRequest.js.map +1 -0
- package/dist/models/feature.d.ts +44 -0
- package/dist/models/feature.js +58 -0
- package/dist/models/feature.js.map +1 -0
- package/dist/models/featureOfCard.d.ts +81 -0
- package/dist/models/featureOfCard.js +81 -0
- package/dist/models/featureOfCard.js.map +1 -0
- package/dist/models/featureProducedByVariant.d.ts +39 -0
- package/dist/models/featureProducedByVariant.js +55 -0
- package/dist/models/featureProducedByVariant.js.map +1 -0
- package/dist/models/featureProducedInVariantSuggestion.d.ts +32 -0
- package/dist/models/featureProducedInVariantSuggestion.js +51 -0
- package/dist/models/featureProducedInVariantSuggestion.js.map +1 -0
- package/dist/models/featureProducedInVariantSuggestionRequest.d.ts +32 -0
- package/dist/models/featureProducedInVariantSuggestionRequest.js +51 -0
- package/dist/models/featureProducedInVariantSuggestionRequest.js.map +1 -0
- package/dist/models/findMyCombosResponse.d.ts +69 -0
- package/dist/models/findMyCombosResponse.js +76 -0
- package/dist/models/findMyCombosResponse.js.map +1 -0
- package/dist/models/identityEnum.d.ts +86 -0
- package/dist/models/identityEnum.js +115 -0
- package/dist/models/identityEnum.js.map +1 -0
- package/dist/models/index.d.ts +56 -0
- package/dist/models/index.js +75 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/invalidUrlResponse.d.ts +32 -0
- package/dist/models/invalidUrlResponse.js +51 -0
- package/dist/models/invalidUrlResponse.js.map +1 -0
- package/dist/models/paginatedCardDetailList.d.ts +51 -0
- package/dist/models/paginatedCardDetailList.js +64 -0
- package/dist/models/paginatedCardDetailList.js.map +1 -0
- package/dist/models/paginatedFeatureList.d.ts +51 -0
- package/dist/models/paginatedFeatureList.js +64 -0
- package/dist/models/paginatedFeatureList.js.map +1 -0
- package/dist/models/paginatedFindMyCombosResponseList.d.ts +51 -0
- package/dist/models/paginatedFindMyCombosResponseList.js +64 -0
- package/dist/models/paginatedFindMyCombosResponseList.js.map +1 -0
- package/dist/models/paginatedFindMyCombosResponseListResults.d.ts +69 -0
- package/dist/models/paginatedFindMyCombosResponseListResults.js +76 -0
- package/dist/models/paginatedFindMyCombosResponseListResults.js.map +1 -0
- package/dist/models/paginatedTemplateList.d.ts +51 -0
- package/dist/models/paginatedTemplateList.js +64 -0
- package/dist/models/paginatedTemplateList.js.map +1 -0
- package/dist/models/paginatedUserDetailList.d.ts +51 -0
- package/dist/models/paginatedUserDetailList.js +64 -0
- package/dist/models/paginatedUserDetailList.js.map +1 -0
- package/dist/models/paginatedVariantAliasList.d.ts +51 -0
- package/dist/models/paginatedVariantAliasList.js +64 -0
- package/dist/models/paginatedVariantAliasList.js.map +1 -0
- package/dist/models/paginatedVariantList.d.ts +51 -0
- package/dist/models/paginatedVariantList.js +64 -0
- package/dist/models/paginatedVariantList.js.map +1 -0
- package/dist/models/paginatedVariantSuggestionList.d.ts +51 -0
- package/dist/models/paginatedVariantSuggestionList.js +64 -0
- package/dist/models/paginatedVariantSuggestionList.js.map +1 -0
- package/dist/models/paginatedWebsitePropertyList.d.ts +51 -0
- package/dist/models/paginatedWebsitePropertyList.js +64 -0
- package/dist/models/paginatedWebsitePropertyList.js.map +1 -0
- package/dist/models/patchedUserDetailRequest.d.ts +44 -0
- package/dist/models/patchedUserDetailRequest.js +53 -0
- package/dist/models/patchedUserDetailRequest.js.map +1 -0
- package/dist/models/patchedVariantSuggestionRequest.d.ts +83 -0
- package/dist/models/patchedVariantSuggestionRequest.js +68 -0
- package/dist/models/patchedVariantSuggestionRequest.js.map +1 -0
- package/dist/models/template.d.ts +57 -0
- package/dist/models/template.js +61 -0
- package/dist/models/template.js.map +1 -0
- package/dist/models/templateInVariant.d.ts +75 -0
- package/dist/models/templateInVariant.js +73 -0
- package/dist/models/templateInVariant.js.map +1 -0
- package/dist/models/templateRequiredInVariantSuggestion.d.ts +88 -0
- package/dist/models/templateRequiredInVariantSuggestion.js +84 -0
- package/dist/models/templateRequiredInVariantSuggestion.js.map +1 -0
- package/dist/models/templateRequiredInVariantSuggestionRequest.d.ts +88 -0
- package/dist/models/templateRequiredInVariantSuggestionRequest.js +70 -0
- package/dist/models/templateRequiredInVariantSuggestionRequest.js.map +1 -0
- package/dist/models/tokenObtainPair.d.ts +38 -0
- package/dist/models/tokenObtainPair.js +52 -0
- package/dist/models/tokenObtainPair.js.map +1 -0
- package/dist/models/tokenObtainPairRequest.d.ts +44 -0
- package/dist/models/tokenObtainPairRequest.js +53 -0
- package/dist/models/tokenObtainPairRequest.js.map +1 -0
- package/dist/models/tokenRefresh.d.ts +32 -0
- package/dist/models/tokenRefresh.js +49 -0
- package/dist/models/tokenRefresh.js.map +1 -0
- package/dist/models/tokenRefreshRequest.d.ts +32 -0
- package/dist/models/tokenRefreshRequest.js +51 -0
- package/dist/models/tokenRefreshRequest.js.map +1 -0
- package/dist/models/tokenVerifyRequest.d.ts +32 -0
- package/dist/models/tokenVerifyRequest.js +51 -0
- package/dist/models/tokenVerifyRequest.js.map +1 -0
- package/dist/models/user.d.ts +38 -0
- package/dist/models/user.js +54 -0
- package/dist/models/user.js.map +1 -0
- package/dist/models/userDetail.d.ts +68 -0
- package/dist/models/userDetail.js +70 -0
- package/dist/models/userDetail.js.map +1 -0
- package/dist/models/userDetailRequest.d.ts +44 -0
- package/dist/models/userDetailRequest.js +55 -0
- package/dist/models/userDetailRequest.js.map +1 -0
- package/dist/models/userRequest.d.ts +32 -0
- package/dist/models/userRequest.js +51 -0
- package/dist/models/userRequest.js.map +1 -0
- package/dist/models/variant.d.ts +150 -0
- package/dist/models/variant.js +113 -0
- package/dist/models/variant.js.map +1 -0
- package/dist/models/variantAlias.d.ts +38 -0
- package/dist/models/variantAlias.js +55 -0
- package/dist/models/variantAlias.js.map +1 -0
- package/dist/models/variantLegalities.d.ts +104 -0
- package/dist/models/variantLegalities.js +99 -0
- package/dist/models/variantLegalities.js.map +1 -0
- package/dist/models/variantPrices.d.ts +44 -0
- package/dist/models/variantPrices.js +59 -0
- package/dist/models/variantPrices.js.map +1 -0
- package/dist/models/variantStatusEnum.d.ts +36 -0
- package/dist/models/variantStatusEnum.js +65 -0
- package/dist/models/variantStatusEnum.js.map +1 -0
- package/dist/models/variantSuggestion.d.ts +115 -0
- package/dist/models/variantSuggestion.js +100 -0
- package/dist/models/variantSuggestion.js.map +1 -0
- package/dist/models/variantSuggestionRequest.d.ts +83 -0
- package/dist/models/variantSuggestionRequest.js +76 -0
- package/dist/models/variantSuggestionRequest.js.map +1 -0
- package/dist/models/variantSuggestionStatusEnum.d.ts +32 -0
- package/dist/models/variantSuggestionStatusEnum.js +61 -0
- package/dist/models/variantSuggestionStatusEnum.js.map +1 -0
- package/dist/models/variantsQueryValidationError.d.ts +32 -0
- package/dist/models/variantsQueryValidationError.js +51 -0
- package/dist/models/variantsQueryValidationError.js.map +1 -0
- package/dist/models/websiteProperty.d.ts +38 -0
- package/dist/models/websiteProperty.js +54 -0
- package/dist/models/websiteProperty.js.map +1 -0
- package/dist/models/zoneLocationsEnum.d.ts +34 -0
- package/dist/models/zoneLocationsEnum.js +63 -0
- package/dist/models/zoneLocationsEnum.js.map +1 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +347 -0
- package/dist/runtime.js.map +1 -0
- package/package.json +36 -0
- package/spellbook-client/.openapi-generator/FILES +74 -0
- package/spellbook-client/.openapi-generator/VERSION +1 -0
- package/spellbook-client/.openapi-generator-ignore +23 -0
- package/spellbook-client/apis/cardListFromTextApi.ts +107 -0
- package/spellbook-client/apis/cardListFromUrlApi.ts +76 -0
- package/spellbook-client/apis/cardsApi.ts +142 -0
- package/spellbook-client/apis/defaultApi.ts +112 -0
- package/spellbook-client/apis/featuresApi.ts +132 -0
- package/spellbook-client/apis/findMyCombosApi.ts +173 -0
- package/spellbook-client/apis/index.ts +15 -0
- package/spellbook-client/apis/propertiesApi.ts +127 -0
- package/spellbook-client/apis/templatesApi.ts +132 -0
- package/spellbook-client/apis/tokenApi.ts +154 -0
- package/spellbook-client/apis/usersApi.ts +285 -0
- package/spellbook-client/apis/variantAliasesApi.ts +127 -0
- package/spellbook-client/apis/variantSuggestionsApi.ts +339 -0
- package/spellbook-client/apis/variantsApi.ts +150 -0
- package/spellbook-client/index.ts +5 -0
- package/spellbook-client/models/card.ts +101 -0
- package/spellbook-client/models/cardDetail.ts +227 -0
- package/spellbook-client/models/cardInDeck.ts +75 -0
- package/spellbook-client/models/cardInDeckRequest.ts +74 -0
- package/spellbook-client/models/cardInVariant.ts +130 -0
- package/spellbook-client/models/cardLegalities.ts +174 -0
- package/spellbook-client/models/cardPrices.ts +84 -0
- package/spellbook-client/models/cardUsedInVariantSuggestion.ts +137 -0
- package/spellbook-client/models/cardUsedInVariantSuggestionRequest.ts +131 -0
- package/spellbook-client/models/combo.ts +65 -0
- package/spellbook-client/models/deck.ts +83 -0
- package/spellbook-client/models/deckRequest.ts +81 -0
- package/spellbook-client/models/feature.ts +83 -0
- package/spellbook-client/models/featureOfCard.ts +143 -0
- package/spellbook-client/models/featureProducedByVariant.ts +82 -0
- package/spellbook-client/models/featureProducedInVariantSuggestion.ts +66 -0
- package/spellbook-client/models/featureProducedInVariantSuggestionRequest.ts +66 -0
- package/spellbook-client/models/findMyCombosResponse.ts +128 -0
- package/spellbook-client/models/identityEnum.ts +113 -0
- package/spellbook-client/models/index.ts +58 -0
- package/spellbook-client/models/invalidUrlResponse.ts +66 -0
- package/spellbook-client/models/paginatedCardDetailList.ts +101 -0
- package/spellbook-client/models/paginatedFeatureList.ts +101 -0
- package/spellbook-client/models/paginatedFindMyCombosResponseList.ts +101 -0
- package/spellbook-client/models/paginatedFindMyCombosResponseListResults.ts +128 -0
- package/spellbook-client/models/paginatedTemplateList.ts +101 -0
- package/spellbook-client/models/paginatedUserDetailList.ts +101 -0
- package/spellbook-client/models/paginatedVariantAliasList.ts +101 -0
- package/spellbook-client/models/paginatedVariantList.ts +101 -0
- package/spellbook-client/models/paginatedVariantSuggestionList.ts +101 -0
- package/spellbook-client/models/paginatedWebsitePropertyList.ts +101 -0
- package/spellbook-client/models/patchedUserDetailRequest.ts +81 -0
- package/spellbook-client/models/patchedVariantSuggestionRequest.ts +151 -0
- package/spellbook-client/models/template.ts +98 -0
- package/spellbook-client/models/templateInVariant.ts +130 -0
- package/spellbook-client/models/templateRequiredInVariantSuggestion.ts +153 -0
- package/spellbook-client/models/templateRequiredInVariantSuggestionRequest.ts +146 -0
- package/spellbook-client/models/tokenObtainPair.ts +73 -0
- package/spellbook-client/models/tokenObtainPairRequest.ts +81 -0
- package/spellbook-client/models/tokenRefresh.ts +65 -0
- package/spellbook-client/models/tokenRefreshRequest.ts +66 -0
- package/spellbook-client/models/tokenVerifyRequest.ts +66 -0
- package/spellbook-client/models/user.ts +74 -0
- package/spellbook-client/models/userDetail.ts +115 -0
- package/spellbook-client/models/userDetailRequest.ts +82 -0
- package/spellbook-client/models/userRequest.ts +66 -0
- package/spellbook-client/models/variant.ts +272 -0
- package/spellbook-client/models/variantAlias.ts +75 -0
- package/spellbook-client/models/variantLegalities.ts +174 -0
- package/spellbook-client/models/variantPrices.ts +84 -0
- package/spellbook-client/models/variantStatusEnum.ts +63 -0
- package/spellbook-client/models/variantSuggestion.ts +214 -0
- package/spellbook-client/models/variantSuggestionRequest.ts +155 -0
- package/spellbook-client/models/variantSuggestionStatusEnum.ts +59 -0
- package/spellbook-client/models/variantsQueryValidationError.ts +66 -0
- package/spellbook-client/models/websiteProperty.ts +74 -0
- package/spellbook-client/models/zoneLocationsEnum.ts +61 -0
- package/spellbook-client/runtime.ts +431 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Template
|
|
20
|
+
*/
|
|
21
|
+
export interface Template {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Template
|
|
26
|
+
*/
|
|
27
|
+
readonly id: number;
|
|
28
|
+
/**
|
|
29
|
+
* short description of the template in natural language
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Template
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Variables supported: mv, manavalue, power, pow, toughness, tou, pt, powtou, loyalty, loy, c, color, id, identity, produces, has, t, type, keyword, kw, is, o, oracle, function, otag, oracletag, oracleid, m, mana, devotion.
|
|
36
|
+
* Operators supported: =, !=, <, >, <=, >=, :.
|
|
37
|
+
* You can compose a "and"/"or" expression made of "and"/"or" expressions, like "(c:W or c:U) and (t:creature or t:artifact)".
|
|
38
|
+
* You can also omit parentheses when not necessary, like "(c:W or c:U) t:creature".
|
|
39
|
+
* Card names are only supported if wrapped in double quotes and preceded by an exclamation mark (!) in order to match the exact name, like !"Lightning Bolt".
|
|
40
|
+
* You can negate any expression by prepending a dash (-), like "-t:creature".
|
|
41
|
+
* More info at: https://scryfall.com/docs/syntax.
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof Template
|
|
45
|
+
*/
|
|
46
|
+
scryfallQuery: string | null;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof Template
|
|
51
|
+
*/
|
|
52
|
+
readonly scryfallApi: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the Template interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfTemplate(value: object): value is Template {
|
|
59
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
if (!('scryfallQuery' in value) || value['scryfallQuery'] === undefined) return false;
|
|
62
|
+
if (!('scryfallApi' in value) || value['scryfallApi'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function TemplateFromJSON(json: any): Template {
|
|
67
|
+
return TemplateFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function TemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): Template {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'name': json['name'],
|
|
78
|
+
'scryfallQuery': json['scryfallQuery'],
|
|
79
|
+
'scryfallApi': json['scryfallApi'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function TemplateToJSON(json: any): Template {
|
|
84
|
+
return TemplateToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function TemplateToJSONTyped(value?: Omit<Template, 'id'|'scryfallApi'> | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'name': value['name'],
|
|
95
|
+
'scryfallQuery': value['scryfallQuery'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Template } from './template';
|
|
17
|
+
import {
|
|
18
|
+
TemplateFromJSON,
|
|
19
|
+
TemplateFromJSONTyped,
|
|
20
|
+
TemplateToJSON,
|
|
21
|
+
TemplateToJSONTyped,
|
|
22
|
+
} from './template';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface TemplateInVariant
|
|
28
|
+
*/
|
|
29
|
+
export interface TemplateInVariant {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Template}
|
|
33
|
+
* @memberof TemplateInVariant
|
|
34
|
+
*/
|
|
35
|
+
readonly template: Template;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<string>}
|
|
39
|
+
* @memberof TemplateInVariant
|
|
40
|
+
*/
|
|
41
|
+
readonly zoneLocations: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof TemplateInVariant
|
|
46
|
+
*/
|
|
47
|
+
readonly battlefieldCardState: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof TemplateInVariant
|
|
52
|
+
*/
|
|
53
|
+
readonly exileCardState: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof TemplateInVariant
|
|
58
|
+
*/
|
|
59
|
+
readonly libraryCardState: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof TemplateInVariant
|
|
64
|
+
*/
|
|
65
|
+
readonly graveyardCardState: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof TemplateInVariant
|
|
70
|
+
*/
|
|
71
|
+
readonly mustBeCommander: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Quantity of the card in the combo.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof TemplateInVariant
|
|
76
|
+
*/
|
|
77
|
+
quantity: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the TemplateInVariant interface.
|
|
82
|
+
*/
|
|
83
|
+
export function instanceOfTemplateInVariant(value: object): value is TemplateInVariant {
|
|
84
|
+
if (!('template' in value) || value['template'] === undefined) return false;
|
|
85
|
+
if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false;
|
|
86
|
+
if (!('battlefieldCardState' in value) || value['battlefieldCardState'] === undefined) return false;
|
|
87
|
+
if (!('exileCardState' in value) || value['exileCardState'] === undefined) return false;
|
|
88
|
+
if (!('libraryCardState' in value) || value['libraryCardState'] === undefined) return false;
|
|
89
|
+
if (!('graveyardCardState' in value) || value['graveyardCardState'] === undefined) return false;
|
|
90
|
+
if (!('mustBeCommander' in value) || value['mustBeCommander'] === undefined) return false;
|
|
91
|
+
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function TemplateInVariantFromJSON(json: any): TemplateInVariant {
|
|
96
|
+
return TemplateInVariantFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function TemplateInVariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateInVariant {
|
|
100
|
+
if (json == null) {
|
|
101
|
+
return json;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'template': TemplateFromJSON(json['template']),
|
|
106
|
+
'zoneLocations': json['zoneLocations'],
|
|
107
|
+
'battlefieldCardState': json['battlefieldCardState'],
|
|
108
|
+
'exileCardState': json['exileCardState'],
|
|
109
|
+
'libraryCardState': json['libraryCardState'],
|
|
110
|
+
'graveyardCardState': json['graveyardCardState'],
|
|
111
|
+
'mustBeCommander': json['mustBeCommander'],
|
|
112
|
+
'quantity': json['quantity'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function TemplateInVariantToJSON(json: any): TemplateInVariant {
|
|
117
|
+
return TemplateInVariantToJSONTyped(json, false);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function TemplateInVariantToJSONTyped(value?: Omit<TemplateInVariant, 'template'|'zoneLocations'|'battlefieldCardState'|'exileCardState'|'libraryCardState'|'graveyardCardState'|'mustBeCommander'> | null, ignoreDiscriminator: boolean = false): any {
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
|
|
127
|
+
'quantity': value['quantity'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ZoneLocationsEnum } from './zoneLocationsEnum';
|
|
17
|
+
import {
|
|
18
|
+
ZoneLocationsEnumFromJSON,
|
|
19
|
+
ZoneLocationsEnumFromJSONTyped,
|
|
20
|
+
ZoneLocationsEnumToJSON,
|
|
21
|
+
ZoneLocationsEnumToJSONTyped,
|
|
22
|
+
} from './zoneLocationsEnum';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface TemplateRequiredInVariantSuggestion
|
|
28
|
+
*/
|
|
29
|
+
export interface TemplateRequiredInVariantSuggestion {
|
|
30
|
+
/**
|
|
31
|
+
* Template name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
34
|
+
*/
|
|
35
|
+
template: string;
|
|
36
|
+
/**
|
|
37
|
+
* Quantity of the card in the combo.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
40
|
+
*/
|
|
41
|
+
quantity: number;
|
|
42
|
+
/**
|
|
43
|
+
* Variables supported: mv, manavalue, power, pow, toughness, tou, pt, powtou, loyalty, loy, c, color, id, identity, produces, has, t, type, keyword, kw, is, o, oracle, function, otag, oracletag, oracleid, m, mana, devotion.
|
|
44
|
+
* Operators supported: =, !=, <, >, <=, >=, :.
|
|
45
|
+
* You can compose a "and"/"or" expression made of "and"/"or" expressions, like "(c:W or c:U) and (t:creature or t:artifact)".
|
|
46
|
+
* You can also omit parentheses when not necessary, like "(c:W or c:U) t:creature".
|
|
47
|
+
* Card names are only supported if wrapped in double quotes and preceded by an exclamation mark (!) in order to match the exact name, like !"Lightning Bolt".
|
|
48
|
+
* You can negate any expression by prepending a dash (-), like "-t:creature".
|
|
49
|
+
* More info at: https://scryfall.com/docs/syntax.
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
53
|
+
*/
|
|
54
|
+
scryfallQuery: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<ZoneLocationsEnum>}
|
|
58
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
59
|
+
*/
|
|
60
|
+
zoneLocations: Array<ZoneLocationsEnum>;
|
|
61
|
+
/**
|
|
62
|
+
* State of the card on the battlefield, if present.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
65
|
+
*/
|
|
66
|
+
battlefieldCardState: string;
|
|
67
|
+
/**
|
|
68
|
+
* State of the card in exile, if present.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
71
|
+
*/
|
|
72
|
+
exileCardState: string;
|
|
73
|
+
/**
|
|
74
|
+
* State of the card in the library, if present.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
77
|
+
*/
|
|
78
|
+
libraryCardState: string;
|
|
79
|
+
/**
|
|
80
|
+
* State of the card in the graveyard, if present.
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
83
|
+
*/
|
|
84
|
+
graveyardCardState: string;
|
|
85
|
+
/**
|
|
86
|
+
* Does the card have to be a commander?
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof TemplateRequiredInVariantSuggestion
|
|
89
|
+
*/
|
|
90
|
+
mustBeCommander: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the TemplateRequiredInVariantSuggestion interface.
|
|
95
|
+
*/
|
|
96
|
+
export function instanceOfTemplateRequiredInVariantSuggestion(value: object): value is TemplateRequiredInVariantSuggestion {
|
|
97
|
+
if (!('template' in value) || value['template'] === undefined) return false;
|
|
98
|
+
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
99
|
+
if (!('scryfallQuery' in value) || value['scryfallQuery'] === undefined) return false;
|
|
100
|
+
if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false;
|
|
101
|
+
if (!('battlefieldCardState' in value) || value['battlefieldCardState'] === undefined) return false;
|
|
102
|
+
if (!('exileCardState' in value) || value['exileCardState'] === undefined) return false;
|
|
103
|
+
if (!('libraryCardState' in value) || value['libraryCardState'] === undefined) return false;
|
|
104
|
+
if (!('graveyardCardState' in value) || value['graveyardCardState'] === undefined) return false;
|
|
105
|
+
if (!('mustBeCommander' in value) || value['mustBeCommander'] === undefined) return false;
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function TemplateRequiredInVariantSuggestionFromJSON(json: any): TemplateRequiredInVariantSuggestion {
|
|
110
|
+
return TemplateRequiredInVariantSuggestionFromJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function TemplateRequiredInVariantSuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateRequiredInVariantSuggestion {
|
|
114
|
+
if (json == null) {
|
|
115
|
+
return json;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
|
|
119
|
+
'template': json['template'],
|
|
120
|
+
'quantity': json['quantity'],
|
|
121
|
+
'scryfallQuery': json['scryfallQuery'],
|
|
122
|
+
'zoneLocations': ((json['zoneLocations'] as Array<any>).map(ZoneLocationsEnumFromJSON)),
|
|
123
|
+
'battlefieldCardState': json['battlefieldCardState'],
|
|
124
|
+
'exileCardState': json['exileCardState'],
|
|
125
|
+
'libraryCardState': json['libraryCardState'],
|
|
126
|
+
'graveyardCardState': json['graveyardCardState'],
|
|
127
|
+
'mustBeCommander': json['mustBeCommander'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function TemplateRequiredInVariantSuggestionToJSON(json: any): TemplateRequiredInVariantSuggestion {
|
|
132
|
+
return TemplateRequiredInVariantSuggestionToJSONTyped(json, false);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function TemplateRequiredInVariantSuggestionToJSONTyped(value?: TemplateRequiredInVariantSuggestion | null, ignoreDiscriminator: boolean = false): any {
|
|
136
|
+
if (value == null) {
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
|
|
142
|
+
'template': value['template'],
|
|
143
|
+
'quantity': value['quantity'],
|
|
144
|
+
'scryfallQuery': value['scryfallQuery'],
|
|
145
|
+
'zoneLocations': ((value['zoneLocations'] as Array<any>).map(ZoneLocationsEnumToJSON)),
|
|
146
|
+
'battlefieldCardState': value['battlefieldCardState'],
|
|
147
|
+
'exileCardState': value['exileCardState'],
|
|
148
|
+
'libraryCardState': value['libraryCardState'],
|
|
149
|
+
'graveyardCardState': value['graveyardCardState'],
|
|
150
|
+
'mustBeCommander': value['mustBeCommander'],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ZoneLocationsEnum } from './zoneLocationsEnum';
|
|
17
|
+
import {
|
|
18
|
+
ZoneLocationsEnumFromJSON,
|
|
19
|
+
ZoneLocationsEnumFromJSONTyped,
|
|
20
|
+
ZoneLocationsEnumToJSON,
|
|
21
|
+
ZoneLocationsEnumToJSONTyped,
|
|
22
|
+
} from './zoneLocationsEnum';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface TemplateRequiredInVariantSuggestionRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface TemplateRequiredInVariantSuggestionRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Template name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
34
|
+
*/
|
|
35
|
+
template: string;
|
|
36
|
+
/**
|
|
37
|
+
* Quantity of the card in the combo.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
40
|
+
*/
|
|
41
|
+
quantity?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Variables supported: mv, manavalue, power, pow, toughness, tou, pt, powtou, loyalty, loy, c, color, id, identity, produces, has, t, type, keyword, kw, is, o, oracle, function, otag, oracletag, oracleid, m, mana, devotion.
|
|
44
|
+
* Operators supported: =, !=, <, >, <=, >=, :.
|
|
45
|
+
* You can compose a "and"/"or" expression made of "and"/"or" expressions, like "(c:W or c:U) and (t:creature or t:artifact)".
|
|
46
|
+
* You can also omit parentheses when not necessary, like "(c:W or c:U) t:creature".
|
|
47
|
+
* Card names are only supported if wrapped in double quotes and preceded by an exclamation mark (!) in order to match the exact name, like !"Lightning Bolt".
|
|
48
|
+
* You can negate any expression by prepending a dash (-), like "-t:creature".
|
|
49
|
+
* More info at: https://scryfall.com/docs/syntax.
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
53
|
+
*/
|
|
54
|
+
scryfallQuery?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<ZoneLocationsEnum>}
|
|
58
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
59
|
+
*/
|
|
60
|
+
zoneLocations: Array<ZoneLocationsEnum>;
|
|
61
|
+
/**
|
|
62
|
+
* State of the card on the battlefield, if present.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
65
|
+
*/
|
|
66
|
+
battlefieldCardState?: string;
|
|
67
|
+
/**
|
|
68
|
+
* State of the card in exile, if present.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
71
|
+
*/
|
|
72
|
+
exileCardState?: string;
|
|
73
|
+
/**
|
|
74
|
+
* State of the card in the library, if present.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
77
|
+
*/
|
|
78
|
+
libraryCardState?: string;
|
|
79
|
+
/**
|
|
80
|
+
* State of the card in the graveyard, if present.
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
83
|
+
*/
|
|
84
|
+
graveyardCardState?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Does the card have to be a commander?
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof TemplateRequiredInVariantSuggestionRequest
|
|
89
|
+
*/
|
|
90
|
+
mustBeCommander?: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the TemplateRequiredInVariantSuggestionRequest interface.
|
|
95
|
+
*/
|
|
96
|
+
export function instanceOfTemplateRequiredInVariantSuggestionRequest(value: object): value is TemplateRequiredInVariantSuggestionRequest {
|
|
97
|
+
if (!('template' in value) || value['template'] === undefined) return false;
|
|
98
|
+
if (!('zoneLocations' in value) || value['zoneLocations'] === undefined) return false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function TemplateRequiredInVariantSuggestionRequestFromJSON(json: any): TemplateRequiredInVariantSuggestionRequest {
|
|
103
|
+
return TemplateRequiredInVariantSuggestionRequestFromJSONTyped(json, false);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function TemplateRequiredInVariantSuggestionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TemplateRequiredInVariantSuggestionRequest {
|
|
107
|
+
if (json == null) {
|
|
108
|
+
return json;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'template': json['template'],
|
|
113
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
114
|
+
'scryfallQuery': json['scryfallQuery'] == null ? undefined : json['scryfallQuery'],
|
|
115
|
+
'zoneLocations': ((json['zoneLocations'] as Array<any>).map(ZoneLocationsEnumFromJSON)),
|
|
116
|
+
'battlefieldCardState': json['battlefieldCardState'] == null ? undefined : json['battlefieldCardState'],
|
|
117
|
+
'exileCardState': json['exileCardState'] == null ? undefined : json['exileCardState'],
|
|
118
|
+
'libraryCardState': json['libraryCardState'] == null ? undefined : json['libraryCardState'],
|
|
119
|
+
'graveyardCardState': json['graveyardCardState'] == null ? undefined : json['graveyardCardState'],
|
|
120
|
+
'mustBeCommander': json['mustBeCommander'] == null ? undefined : json['mustBeCommander'],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function TemplateRequiredInVariantSuggestionRequestToJSON(json: any): TemplateRequiredInVariantSuggestionRequest {
|
|
125
|
+
return TemplateRequiredInVariantSuggestionRequestToJSONTyped(json, false);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function TemplateRequiredInVariantSuggestionRequestToJSONTyped(value?: TemplateRequiredInVariantSuggestionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
129
|
+
if (value == null) {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
|
|
135
|
+
'template': value['template'],
|
|
136
|
+
'quantity': value['quantity'],
|
|
137
|
+
'scryfallQuery': value['scryfallQuery'],
|
|
138
|
+
'zoneLocations': ((value['zoneLocations'] as Array<any>).map(ZoneLocationsEnumToJSON)),
|
|
139
|
+
'battlefieldCardState': value['battlefieldCardState'],
|
|
140
|
+
'exileCardState': value['exileCardState'],
|
|
141
|
+
'libraryCardState': value['libraryCardState'],
|
|
142
|
+
'graveyardCardState': value['graveyardCardState'],
|
|
143
|
+
'mustBeCommander': value['mustBeCommander'],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface TokenObtainPair
|
|
20
|
+
*/
|
|
21
|
+
export interface TokenObtainPair {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof TokenObtainPair
|
|
26
|
+
*/
|
|
27
|
+
readonly refresh: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof TokenObtainPair
|
|
32
|
+
*/
|
|
33
|
+
readonly access: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the TokenObtainPair interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfTokenObtainPair(value: object): value is TokenObtainPair {
|
|
40
|
+
if (!('refresh' in value) || value['refresh'] === undefined) return false;
|
|
41
|
+
if (!('access' in value) || value['access'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function TokenObtainPairFromJSON(json: any): TokenObtainPair {
|
|
46
|
+
return TokenObtainPairFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function TokenObtainPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenObtainPair {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'refresh': json['refresh'],
|
|
56
|
+
'access': json['access'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function TokenObtainPairToJSON(json: any): TokenObtainPair {
|
|
61
|
+
return TokenObtainPairToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function TokenObtainPairToJSONTyped(value?: Omit<TokenObtainPair, 'refresh'|'access'> | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Commander Spellbook API
|
|
5
|
+
* API for Commander Spellbook, the combo database engine for Magic: The Gathering
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: dev
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface TokenObtainPairRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface TokenObtainPairRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof TokenObtainPairRequest
|
|
26
|
+
*/
|
|
27
|
+
username?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof TokenObtainPairRequest
|
|
32
|
+
*/
|
|
33
|
+
password?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof TokenObtainPairRequest
|
|
38
|
+
*/
|
|
39
|
+
code?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the TokenObtainPairRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfTokenObtainPairRequest(value: object): value is TokenObtainPairRequest {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function TokenObtainPairRequestFromJSON(json: any): TokenObtainPairRequest {
|
|
50
|
+
return TokenObtainPairRequestFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function TokenObtainPairRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenObtainPairRequest {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'username': json['username'] == null ? undefined : json['username'],
|
|
60
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
61
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function TokenObtainPairRequestToJSON(json: any): TokenObtainPairRequest {
|
|
66
|
+
return TokenObtainPairRequestToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function TokenObtainPairRequestToJSONTyped(value?: TokenObtainPairRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'username': value['username'],
|
|
77
|
+
'password': value['password'],
|
|
78
|
+
'code': value['code'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|