Skip to content

Commit

Permalink
move some types here
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Oct 14, 2024
1 parent a49d4b4 commit 29e4efd
Show file tree
Hide file tree
Showing 44 changed files with 205 additions and 4 deletions.
8 changes: 8 additions & 0 deletions dist/generate/DuplicateSource.d.ts
Original file line number Diff line number Diff line change
@@ -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"
}
13 changes: 13 additions & 0 deletions dist/generate/DuplicateSource.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/generate/DuplicateSource.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions dist/generate/GenerateRequest.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions dist/generate/GenerateRequest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/generate/GenerateRequest.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions dist/generate/GenerateResult.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions dist/generate/GenerateResult.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/generate/GenerateResult.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/generate/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export * from "./DelayInfo";
export * from "./GenerateType";
export * from "./RateLimitInfo";
export * from "./DuplicateSource";
export * from "./GenerateRequest";
export * from "./GenerateResult";
3 changes: 3 additions & 0 deletions dist/generate/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/generate/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from "./minecraft";
export * from "./subscription";
export * from "./error";
export * from "./billing";
export * from "./usage";
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/usage/CreditsUsageInfo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { CreditType } from "../billing";
export interface CreditsUsageInfo {
type: CreditType;
used: number;
remaining: number;
}
3 changes: 3 additions & 0 deletions dist/usage/CreditsUsageInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/CreditsUsageInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/usage/LimitUsageInfo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface LimitUsageInfo {
limit: number;
remaining: number;
}
3 changes: 3 additions & 0 deletions dist/usage/LimitUsageInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/LimitUsageInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/usage/MeteredUsageInfo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface MeteredUsageInfo {
used: number;
}
3 changes: 3 additions & 0 deletions dist/usage/MeteredUsageInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/MeteredUsageInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/usage/RateUsageInfo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface RateUsageInfo {
delay: number;
next: number;
}
3 changes: 3 additions & 0 deletions dist/usage/RateUsageInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/RateUsageInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/usage/UsageInfo.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions dist/usage/UsageInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/UsageInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/usage/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from "./CreditsUsageInfo";
export * from "./LimitUsageInfo";
export * from "./MeteredUsageInfo";
export * from "./RateUsageInfo";
export * from "./UsageInfo";
22 changes: 22 additions & 0 deletions dist/usage/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/usage/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/generate/DuplicateSource.ts
Original file line number Diff line number Diff line change
@@ -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"
}
13 changes: 13 additions & 0 deletions src/generate/GenerateRequest.ts
Original file line number Diff line number Diff line change
@@ -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;
}
9 changes: 9 additions & 0 deletions src/generate/GenerateResult.ts
Original file line number Diff line number Diff line change
@@ -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;
}
5 changes: 4 additions & 1 deletion src/generate/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export * from "./DelayInfo";
export * from "./GenerateType";
export * from "./RateLimitInfo";
export * from "./RateLimitInfo";
export * from"./DuplicateSource"
export * from "./GenerateRequest";
export * from "./GenerateResult";
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export * from "./user"
export * from "./minecraft"
export * from "./subscription"
export * from "./error"
export * from "./billing"
export * from "./billing"
export * from "./usage"
7 changes: 7 additions & 0 deletions src/usage/CreditsUsageInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { CreditType } from "../billing";

export interface CreditsUsageInfo {
type: CreditType;
used: number;
remaining: number;
}
4 changes: 4 additions & 0 deletions src/usage/LimitUsageInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface LimitUsageInfo {
limit: number;
remaining: number;
}
3 changes: 3 additions & 0 deletions src/usage/MeteredUsageInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface MeteredUsageInfo {
used: number;
}
4 changes: 4 additions & 0 deletions src/usage/RateUsageInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface RateUsageInfo {
delay: number;
next: number;
}
11 changes: 11 additions & 0 deletions src/usage/UsageInfo.ts
Original file line number Diff line number Diff line change
@@ -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;
}
5 changes: 5 additions & 0 deletions src/usage/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from "./CreditsUsageInfo";
export * from "./LimitUsageInfo";
export * from "./MeteredUsageInfo";
export * from "./RateUsageInfo";
export * from "./UsageInfo";

0 comments on commit 29e4efd

Please sign in to comment.