From 29e4efdd0b3a83d1669dd93851a5a98ec3c14c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haylee=20Sch=C3=A4fer?= Date: Mon, 14 Oct 2024 11:32:36 +0200 Subject: [PATCH] move some types here --- dist/generate/DuplicateSource.d.ts | 8 ++++++++ dist/generate/DuplicateSource.js | 13 +++++++++++++ dist/generate/DuplicateSource.js.map | 1 + dist/generate/GenerateRequest.d.ts | 12 ++++++++++++ dist/generate/GenerateRequest.js | 3 +++ dist/generate/GenerateRequest.js.map | 1 + dist/generate/GenerateResult.d.ts | 8 ++++++++ dist/generate/GenerateResult.js | 3 +++ dist/generate/GenerateResult.js.map | 1 + dist/generate/index.d.ts | 3 +++ dist/generate/index.js | 3 +++ dist/generate/index.js.map | 2 +- dist/index.d.ts | 1 + dist/index.js | 1 + dist/index.js.map | 2 +- dist/usage/CreditsUsageInfo.d.ts | 6 ++++++ dist/usage/CreditsUsageInfo.js | 3 +++ dist/usage/CreditsUsageInfo.js.map | 1 + dist/usage/LimitUsageInfo.d.ts | 4 ++++ dist/usage/LimitUsageInfo.js | 3 +++ dist/usage/LimitUsageInfo.js.map | 1 + dist/usage/MeteredUsageInfo.d.ts | 3 +++ dist/usage/MeteredUsageInfo.js | 3 +++ dist/usage/MeteredUsageInfo.js.map | 1 + dist/usage/RateUsageInfo.d.ts | 4 ++++ dist/usage/RateUsageInfo.js | 3 +++ dist/usage/RateUsageInfo.js.map | 1 + dist/usage/UsageInfo.d.ts | 10 ++++++++++ dist/usage/UsageInfo.js | 3 +++ dist/usage/UsageInfo.js.map | 1 + dist/usage/index.d.ts | 5 +++++ dist/usage/index.js | 22 ++++++++++++++++++++++ dist/usage/index.js.map | 1 + src/generate/DuplicateSource.ts | 8 ++++++++ src/generate/GenerateRequest.ts | 13 +++++++++++++ src/generate/GenerateResult.ts | 9 +++++++++ src/generate/index.ts | 5 ++++- src/index.ts | 3 ++- src/usage/CreditsUsageInfo.ts | 7 +++++++ src/usage/LimitUsageInfo.ts | 4 ++++ src/usage/MeteredUsageInfo.ts | 3 +++ src/usage/RateUsageInfo.ts | 4 ++++ src/usage/UsageInfo.ts | 11 +++++++++++ src/usage/index.ts | 5 +++++ 44 files changed, 205 insertions(+), 4 deletions(-) create mode 100644 dist/generate/DuplicateSource.d.ts create mode 100644 dist/generate/DuplicateSource.js create mode 100644 dist/generate/DuplicateSource.js.map create mode 100644 dist/generate/GenerateRequest.d.ts create mode 100644 dist/generate/GenerateRequest.js create mode 100644 dist/generate/GenerateRequest.js.map create mode 100644 dist/generate/GenerateResult.d.ts create mode 100644 dist/generate/GenerateResult.js create mode 100644 dist/generate/GenerateResult.js.map create mode 100644 dist/usage/CreditsUsageInfo.d.ts create mode 100644 dist/usage/CreditsUsageInfo.js create mode 100644 dist/usage/CreditsUsageInfo.js.map create mode 100644 dist/usage/LimitUsageInfo.d.ts create mode 100644 dist/usage/LimitUsageInfo.js create mode 100644 dist/usage/LimitUsageInfo.js.map create mode 100644 dist/usage/MeteredUsageInfo.d.ts create mode 100644 dist/usage/MeteredUsageInfo.js create mode 100644 dist/usage/MeteredUsageInfo.js.map create mode 100644 dist/usage/RateUsageInfo.d.ts create mode 100644 dist/usage/RateUsageInfo.js create mode 100644 dist/usage/RateUsageInfo.js.map create mode 100644 dist/usage/UsageInfo.d.ts create mode 100644 dist/usage/UsageInfo.js create mode 100644 dist/usage/UsageInfo.js.map create mode 100644 dist/usage/index.d.ts create mode 100644 dist/usage/index.js create mode 100644 dist/usage/index.js.map create mode 100644 src/generate/DuplicateSource.ts create mode 100644 src/generate/GenerateRequest.ts create mode 100644 src/generate/GenerateResult.ts create mode 100644 src/usage/CreditsUsageInfo.ts create mode 100644 src/usage/LimitUsageInfo.ts create mode 100644 src/usage/MeteredUsageInfo.ts create mode 100644 src/usage/RateUsageInfo.ts create mode 100644 src/usage/UsageInfo.ts create mode 100644 src/usage/index.ts diff --git a/dist/generate/DuplicateSource.d.ts b/dist/generate/DuplicateSource.d.ts new file mode 100644 index 0000000..579fffd --- /dev/null +++ b/dist/generate/DuplicateSource.d.ts @@ -0,0 +1,8 @@ +export declare enum DuplicateSource { + MINESKIN_URL = "mineskin_url", + TEXTURE_URL = "texture_url", + IMAGE_HASH = "image_hash", + TEXTURE_URL_DATA = "texture_url_data", + IMAGE_HASH_DATA = "image_hash_data", + USER_UUID = "user_uuid" +} diff --git a/dist/generate/DuplicateSource.js b/dist/generate/DuplicateSource.js new file mode 100644 index 0000000..f7d0d0f --- /dev/null +++ b/dist/generate/DuplicateSource.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DuplicateSource = void 0; +var DuplicateSource; +(function (DuplicateSource) { + DuplicateSource["MINESKIN_URL"] = "mineskin_url"; + DuplicateSource["TEXTURE_URL"] = "texture_url"; + DuplicateSource["IMAGE_HASH"] = "image_hash"; + DuplicateSource["TEXTURE_URL_DATA"] = "texture_url_data"; + DuplicateSource["IMAGE_HASH_DATA"] = "image_hash_data"; + DuplicateSource["USER_UUID"] = "user_uuid"; +})(DuplicateSource || (exports.DuplicateSource = DuplicateSource = {})); +//# sourceMappingURL=DuplicateSource.js.map \ No newline at end of file diff --git a/dist/generate/DuplicateSource.js.map b/dist/generate/DuplicateSource.js.map new file mode 100644 index 0000000..bda8152 --- /dev/null +++ b/dist/generate/DuplicateSource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DuplicateSource.js","sourceRoot":"/","sources":["generate/DuplicateSource.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAOX;AAPD,WAAY,eAAe;IACvB,gDAA6B,CAAA;IAC7B,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,wDAAqC,CAAA;IACrC,sDAAmC,CAAA;IACnC,0CAAuB,CAAA;AAC3B,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B","sourcesContent":["export enum DuplicateSource {\n MINESKIN_URL = \"mineskin_url\",\n TEXTURE_URL = \"texture_url\",\n IMAGE_HASH = \"image_hash\",\n TEXTURE_URL_DATA = \"texture_url_data\",\n IMAGE_HASH_DATA = \"image_hash_data\",\n USER_UUID = \"user_uuid\"\n}\n"]} \ No newline at end of file diff --git a/dist/generate/GenerateRequest.d.ts b/dist/generate/GenerateRequest.d.ts new file mode 100644 index 0000000..63e426f --- /dev/null +++ b/dist/generate/GenerateRequest.d.ts @@ -0,0 +1,12 @@ +import { GenerateType } from "./GenerateType"; +import { ClientInfo } from "../skin"; +import { GenerateOptions } from "./GenerateOptions"; +import { Breadcrumb } from "../misc"; +export interface GenerateRequest { + image: string; + type: GenerateType; + clientInfo: ClientInfo; + client?: any; + options: GenerateOptions; + breadcrumb?: Breadcrumb; +} diff --git a/dist/generate/GenerateRequest.js b/dist/generate/GenerateRequest.js new file mode 100644 index 0000000..624ca54 --- /dev/null +++ b/dist/generate/GenerateRequest.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=GenerateRequest.js.map \ No newline at end of file diff --git a/dist/generate/GenerateRequest.js.map b/dist/generate/GenerateRequest.js.map new file mode 100644 index 0000000..16cc77e --- /dev/null +++ b/dist/generate/GenerateRequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GenerateRequest.js","sourceRoot":"/","sources":["generate/GenerateRequest.ts"],"names":[],"mappings":"","sourcesContent":["import { GenerateType } from \"./GenerateType\";\nimport { ClientInfo } from \"../skin\";\nimport { GenerateOptions } from \"./GenerateOptions\";\nimport { Breadcrumb } from \"../misc\";\n\nexport interface GenerateRequest {\n image: string; // image hash\n type: GenerateType;\n clientInfo: ClientInfo;\n client?: any;\n options: GenerateOptions;\n breadcrumb?: Breadcrumb;\n}\n"]} \ No newline at end of file diff --git a/dist/generate/GenerateResult.d.ts b/dist/generate/GenerateResult.d.ts new file mode 100644 index 0000000..56af16d --- /dev/null +++ b/dist/generate/GenerateResult.d.ts @@ -0,0 +1,8 @@ +import { UUID } from "../misc"; +import { DuplicateSource } from "./DuplicateSource"; +import { UsageInfo } from "../usage"; +export interface GenerateResult { + skin: UUID; + duplicate?: DuplicateSource; + usage?: UsageInfo; +} diff --git a/dist/generate/GenerateResult.js b/dist/generate/GenerateResult.js new file mode 100644 index 0000000..b1e8ce6 --- /dev/null +++ b/dist/generate/GenerateResult.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=GenerateResult.js.map \ No newline at end of file diff --git a/dist/generate/GenerateResult.js.map b/dist/generate/GenerateResult.js.map new file mode 100644 index 0000000..79cc80a --- /dev/null +++ b/dist/generate/GenerateResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GenerateResult.js","sourceRoot":"/","sources":["generate/GenerateResult.ts"],"names":[],"mappings":"","sourcesContent":["import { UUID } from \"../misc\";\nimport { DuplicateSource } from \"./DuplicateSource\";\nimport { UsageInfo } from \"../usage\";\n\nexport interface GenerateResult {\n skin: UUID;\n duplicate?: DuplicateSource;\n usage?: UsageInfo;\n}\n"]} \ No newline at end of file diff --git a/dist/generate/index.d.ts b/dist/generate/index.d.ts index c1f9979..29c2fee 100644 --- a/dist/generate/index.d.ts +++ b/dist/generate/index.d.ts @@ -1,3 +1,6 @@ export * from "./DelayInfo"; export * from "./GenerateType"; export * from "./RateLimitInfo"; +export * from "./DuplicateSource"; +export * from "./GenerateRequest"; +export * from "./GenerateResult"; diff --git a/dist/generate/index.js b/dist/generate/index.js index cfdee7d..8c0998f 100644 --- a/dist/generate/index.js +++ b/dist/generate/index.js @@ -17,4 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./DelayInfo"), exports); __exportStar(require("./GenerateType"), exports); __exportStar(require("./RateLimitInfo"), exports); +__exportStar(require("./DuplicateSource"), exports); +__exportStar(require("./GenerateRequest"), exports); +__exportStar(require("./GenerateResult"), exports); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/generate/index.js.map b/dist/generate/index.js.map index 13388b2..2024503 100644 --- a/dist/generate/index.js.map +++ b/dist/generate/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"/","sources":["generate/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,kDAAgC","sourcesContent":["export * from \"./DelayInfo\";\r\nexport * from \"./GenerateType\";\r\nexport * from \"./RateLimitInfo\";"]} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"/","sources":["generate/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,kDAAgC;AAChC,oDAAgC;AAChC,oDAAkC;AAClC,mDAAiC","sourcesContent":["export * from \"./DelayInfo\";\r\nexport * from \"./GenerateType\";\r\nexport * from \"./RateLimitInfo\";\r\nexport * from\"./DuplicateSource\"\r\nexport * from \"./GenerateRequest\";\r\nexport * from \"./GenerateResult\";"]} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 9519f03..488011f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -10,3 +10,4 @@ export * from "./minecraft"; export * from "./subscription"; export * from "./error"; export * from "./billing"; +export * from "./usage"; diff --git a/dist/index.js b/dist/index.js index 880622a..3bdf90a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -26,4 +26,5 @@ __exportStar(require("./minecraft"), exports); __exportStar(require("./subscription"), exports); __exportStar(require("./error"), exports); __exportStar(require("./billing"), exports); +__exportStar(require("./usage"), exports); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 08d4fec..f4caf7f 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,yCAAsB;AACtB,4CAAyB;AACzB,wCAAqB;AACrB,yCAAsB;AACtB,8CAA2B;AAC3B,iDAA8B;AAC9B,0CAAuB;AACvB,4CAAyB","sourcesContent":["export * from \"./generate\";\r\nexport * from \"./profile\";\r\nexport * from \"./skin\";\r\nexport * from \"./misc\";\r\nexport * from \"./auth\"\r\nexport * from \"./account\"\r\nexport * from \"./key\"\r\nexport * from \"./user\"\r\nexport * from \"./minecraft\"\r\nexport * from \"./subscription\"\r\nexport * from \"./error\"\r\nexport * from \"./billing\""]} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,yCAAuB;AACvB,yCAAsB;AACtB,4CAAyB;AACzB,wCAAqB;AACrB,yCAAsB;AACtB,8CAA2B;AAC3B,iDAA8B;AAC9B,0CAAuB;AACvB,4CAAyB;AACzB,0CAAuB","sourcesContent":["export * from \"./generate\";\r\nexport * from \"./profile\";\r\nexport * from \"./skin\";\r\nexport * from \"./misc\";\r\nexport * from \"./auth\"\r\nexport * from \"./account\"\r\nexport * from \"./key\"\r\nexport * from \"./user\"\r\nexport * from \"./minecraft\"\r\nexport * from \"./subscription\"\r\nexport * from \"./error\"\r\nexport * from \"./billing\"\r\nexport * from \"./usage\""]} \ No newline at end of file diff --git a/dist/usage/CreditsUsageInfo.d.ts b/dist/usage/CreditsUsageInfo.d.ts new file mode 100644 index 0000000..c7fe473 --- /dev/null +++ b/dist/usage/CreditsUsageInfo.d.ts @@ -0,0 +1,6 @@ +import { CreditType } from "../billing"; +export interface CreditsUsageInfo { + type: CreditType; + used: number; + remaining: number; +} diff --git a/dist/usage/CreditsUsageInfo.js b/dist/usage/CreditsUsageInfo.js new file mode 100644 index 0000000..7ef4200 --- /dev/null +++ b/dist/usage/CreditsUsageInfo.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=CreditsUsageInfo.js.map \ No newline at end of file diff --git a/dist/usage/CreditsUsageInfo.js.map b/dist/usage/CreditsUsageInfo.js.map new file mode 100644 index 0000000..deee5c9 --- /dev/null +++ b/dist/usage/CreditsUsageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CreditsUsageInfo.js","sourceRoot":"/","sources":["usage/CreditsUsageInfo.ts"],"names":[],"mappings":"","sourcesContent":["import { CreditType } from \"../billing\";\n\nexport interface CreditsUsageInfo {\n type: CreditType;\n used: number;\n remaining: number;\n}\n"]} \ No newline at end of file diff --git a/dist/usage/LimitUsageInfo.d.ts b/dist/usage/LimitUsageInfo.d.ts new file mode 100644 index 0000000..4e2ac9a --- /dev/null +++ b/dist/usage/LimitUsageInfo.d.ts @@ -0,0 +1,4 @@ +export interface LimitUsageInfo { + limit: number; + remaining: number; +} diff --git a/dist/usage/LimitUsageInfo.js b/dist/usage/LimitUsageInfo.js new file mode 100644 index 0000000..3b8cd3c --- /dev/null +++ b/dist/usage/LimitUsageInfo.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=LimitUsageInfo.js.map \ No newline at end of file diff --git a/dist/usage/LimitUsageInfo.js.map b/dist/usage/LimitUsageInfo.js.map new file mode 100644 index 0000000..59f1fab --- /dev/null +++ b/dist/usage/LimitUsageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LimitUsageInfo.js","sourceRoot":"/","sources":["usage/LimitUsageInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface LimitUsageInfo {\n limit: number;\n remaining: number;\n}\n"]} \ No newline at end of file diff --git a/dist/usage/MeteredUsageInfo.d.ts b/dist/usage/MeteredUsageInfo.d.ts new file mode 100644 index 0000000..867463f --- /dev/null +++ b/dist/usage/MeteredUsageInfo.d.ts @@ -0,0 +1,3 @@ +export interface MeteredUsageInfo { + used: number; +} diff --git a/dist/usage/MeteredUsageInfo.js b/dist/usage/MeteredUsageInfo.js new file mode 100644 index 0000000..1f3bdb6 --- /dev/null +++ b/dist/usage/MeteredUsageInfo.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=MeteredUsageInfo.js.map \ No newline at end of file diff --git a/dist/usage/MeteredUsageInfo.js.map b/dist/usage/MeteredUsageInfo.js.map new file mode 100644 index 0000000..071a141 --- /dev/null +++ b/dist/usage/MeteredUsageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MeteredUsageInfo.js","sourceRoot":"/","sources":["usage/MeteredUsageInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface MeteredUsageInfo {\n used: number;\n}\n"]} \ No newline at end of file diff --git a/dist/usage/RateUsageInfo.d.ts b/dist/usage/RateUsageInfo.d.ts new file mode 100644 index 0000000..fa10699 --- /dev/null +++ b/dist/usage/RateUsageInfo.d.ts @@ -0,0 +1,4 @@ +export interface RateUsageInfo { + delay: number; + next: number; +} diff --git a/dist/usage/RateUsageInfo.js b/dist/usage/RateUsageInfo.js new file mode 100644 index 0000000..aade1cc --- /dev/null +++ b/dist/usage/RateUsageInfo.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=RateUsageInfo.js.map \ No newline at end of file diff --git a/dist/usage/RateUsageInfo.js.map b/dist/usage/RateUsageInfo.js.map new file mode 100644 index 0000000..7565c7c --- /dev/null +++ b/dist/usage/RateUsageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateUsageInfo.js","sourceRoot":"/","sources":["usage/RateUsageInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface RateUsageInfo {\n delay: number;\n next: number;\n}\n"]} \ No newline at end of file diff --git a/dist/usage/UsageInfo.d.ts b/dist/usage/UsageInfo.d.ts new file mode 100644 index 0000000..a33275f --- /dev/null +++ b/dist/usage/UsageInfo.d.ts @@ -0,0 +1,10 @@ +import { MeteredUsageInfo } from "./MeteredUsageInfo"; +import { LimitUsageInfo } from "./LimitUsageInfo"; +import { CreditsUsageInfo } from "./CreditsUsageInfo"; +import { RateUsageInfo } from "./RateUsageInfo"; +export interface UsageInfo { + credits?: CreditsUsageInfo; + metered?: MeteredUsageInfo; + rate?: RateUsageInfo; + limit?: LimitUsageInfo; +} diff --git a/dist/usage/UsageInfo.js b/dist/usage/UsageInfo.js new file mode 100644 index 0000000..9db4be7 --- /dev/null +++ b/dist/usage/UsageInfo.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=UsageInfo.js.map \ No newline at end of file diff --git a/dist/usage/UsageInfo.js.map b/dist/usage/UsageInfo.js.map new file mode 100644 index 0000000..a7f91d5 --- /dev/null +++ b/dist/usage/UsageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UsageInfo.js","sourceRoot":"/","sources":["usage/UsageInfo.ts"],"names":[],"mappings":"","sourcesContent":["import { MeteredUsageInfo } from \"./MeteredUsageInfo\";\nimport { LimitUsageInfo } from \"./LimitUsageInfo\";\nimport { CreditsUsageInfo } from \"./CreditsUsageInfo\";\nimport { RateUsageInfo } from \"./RateUsageInfo\";\n\nexport interface UsageInfo {\n credits?: CreditsUsageInfo;\n metered?: MeteredUsageInfo;\n rate?: RateUsageInfo;\n limit?: LimitUsageInfo;\n}\n"]} \ No newline at end of file diff --git a/dist/usage/index.d.ts b/dist/usage/index.d.ts new file mode 100644 index 0000000..6f0fb62 --- /dev/null +++ b/dist/usage/index.d.ts @@ -0,0 +1,5 @@ +export * from "./CreditsUsageInfo"; +export * from "./LimitUsageInfo"; +export * from "./MeteredUsageInfo"; +export * from "./RateUsageInfo"; +export * from "./UsageInfo"; diff --git a/dist/usage/index.js b/dist/usage/index.js new file mode 100644 index 0000000..00f8946 --- /dev/null +++ b/dist/usage/index.js @@ -0,0 +1,22 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./CreditsUsageInfo"), exports); +__exportStar(require("./LimitUsageInfo"), exports); +__exportStar(require("./MeteredUsageInfo"), exports); +__exportStar(require("./RateUsageInfo"), exports); +__exportStar(require("./UsageInfo"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/usage/index.js.map b/dist/usage/index.js.map new file mode 100644 index 0000000..3d494a2 --- /dev/null +++ b/dist/usage/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"/","sources":["usage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,mDAAiC;AACjC,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B","sourcesContent":["export * from \"./CreditsUsageInfo\";\nexport * from \"./LimitUsageInfo\";\nexport * from \"./MeteredUsageInfo\";\nexport * from \"./RateUsageInfo\";\nexport * from \"./UsageInfo\";"]} \ No newline at end of file diff --git a/src/generate/DuplicateSource.ts b/src/generate/DuplicateSource.ts new file mode 100644 index 0000000..e75385a --- /dev/null +++ b/src/generate/DuplicateSource.ts @@ -0,0 +1,8 @@ +export enum DuplicateSource { + MINESKIN_URL = "mineskin_url", + TEXTURE_URL = "texture_url", + IMAGE_HASH = "image_hash", + TEXTURE_URL_DATA = "texture_url_data", + IMAGE_HASH_DATA = "image_hash_data", + USER_UUID = "user_uuid" +} diff --git a/src/generate/GenerateRequest.ts b/src/generate/GenerateRequest.ts new file mode 100644 index 0000000..8aa650e --- /dev/null +++ b/src/generate/GenerateRequest.ts @@ -0,0 +1,13 @@ +import { GenerateType } from "./GenerateType"; +import { ClientInfo } from "../skin"; +import { GenerateOptions } from "./GenerateOptions"; +import { Breadcrumb } from "../misc"; + +export interface GenerateRequest { + image: string; // image hash + type: GenerateType; + clientInfo: ClientInfo; + client?: any; + options: GenerateOptions; + breadcrumb?: Breadcrumb; +} diff --git a/src/generate/GenerateResult.ts b/src/generate/GenerateResult.ts new file mode 100644 index 0000000..5f9eb55 --- /dev/null +++ b/src/generate/GenerateResult.ts @@ -0,0 +1,9 @@ +import { UUID } from "../misc"; +import { DuplicateSource } from "./DuplicateSource"; +import { UsageInfo } from "../usage"; + +export interface GenerateResult { + skin: UUID; + duplicate?: DuplicateSource; + usage?: UsageInfo; +} diff --git a/src/generate/index.ts b/src/generate/index.ts index a6c574b..0900088 100644 --- a/src/generate/index.ts +++ b/src/generate/index.ts @@ -1,3 +1,6 @@ export * from "./DelayInfo"; export * from "./GenerateType"; -export * from "./RateLimitInfo"; \ No newline at end of file +export * from "./RateLimitInfo"; +export * from"./DuplicateSource" +export * from "./GenerateRequest"; +export * from "./GenerateResult"; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index a7e8b90..b89c8d8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,4 +9,5 @@ export * from "./user" export * from "./minecraft" export * from "./subscription" export * from "./error" -export * from "./billing" \ No newline at end of file +export * from "./billing" +export * from "./usage" \ No newline at end of file diff --git a/src/usage/CreditsUsageInfo.ts b/src/usage/CreditsUsageInfo.ts new file mode 100644 index 0000000..518b8ac --- /dev/null +++ b/src/usage/CreditsUsageInfo.ts @@ -0,0 +1,7 @@ +import { CreditType } from "../billing"; + +export interface CreditsUsageInfo { + type: CreditType; + used: number; + remaining: number; +} diff --git a/src/usage/LimitUsageInfo.ts b/src/usage/LimitUsageInfo.ts new file mode 100644 index 0000000..4e2ac9a --- /dev/null +++ b/src/usage/LimitUsageInfo.ts @@ -0,0 +1,4 @@ +export interface LimitUsageInfo { + limit: number; + remaining: number; +} diff --git a/src/usage/MeteredUsageInfo.ts b/src/usage/MeteredUsageInfo.ts new file mode 100644 index 0000000..867463f --- /dev/null +++ b/src/usage/MeteredUsageInfo.ts @@ -0,0 +1,3 @@ +export interface MeteredUsageInfo { + used: number; +} diff --git a/src/usage/RateUsageInfo.ts b/src/usage/RateUsageInfo.ts new file mode 100644 index 0000000..fa10699 --- /dev/null +++ b/src/usage/RateUsageInfo.ts @@ -0,0 +1,4 @@ +export interface RateUsageInfo { + delay: number; + next: number; +} diff --git a/src/usage/UsageInfo.ts b/src/usage/UsageInfo.ts new file mode 100644 index 0000000..910930e --- /dev/null +++ b/src/usage/UsageInfo.ts @@ -0,0 +1,11 @@ +import { MeteredUsageInfo } from "./MeteredUsageInfo"; +import { LimitUsageInfo } from "./LimitUsageInfo"; +import { CreditsUsageInfo } from "./CreditsUsageInfo"; +import { RateUsageInfo } from "./RateUsageInfo"; + +export interface UsageInfo { + credits?: CreditsUsageInfo; + metered?: MeteredUsageInfo; + rate?: RateUsageInfo; + limit?: LimitUsageInfo; +} diff --git a/src/usage/index.ts b/src/usage/index.ts new file mode 100644 index 0000000..b866566 --- /dev/null +++ b/src/usage/index.ts @@ -0,0 +1,5 @@ +export * from "./CreditsUsageInfo"; +export * from "./LimitUsageInfo"; +export * from "./MeteredUsageInfo"; +export * from "./RateUsageInfo"; +export * from "./UsageInfo"; \ No newline at end of file