@xivdyetools/types 1.7.0 → 1.9.0

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.
Files changed (45) hide show
  1. package/LICENSE +37 -37
  2. package/README.md +290 -291
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.d.ts.map +1 -1
  5. package/dist/api/response.d.ts +1 -39
  6. package/dist/api/response.d.ts.map +1 -1
  7. package/dist/api/response.js +1 -1
  8. package/dist/auth/discord-snowflake.d.ts +71 -0
  9. package/dist/auth/discord-snowflake.d.ts.map +1 -0
  10. package/dist/auth/discord-snowflake.js +70 -0
  11. package/dist/auth/discord-snowflake.js.map +1 -0
  12. package/dist/auth/index.d.ts +2 -0
  13. package/dist/auth/index.d.ts.map +1 -1
  14. package/dist/auth/index.js +1 -1
  15. package/dist/auth/index.js.map +1 -1
  16. package/dist/auth/response.d.ts +7 -0
  17. package/dist/auth/response.d.ts.map +1 -1
  18. package/dist/character/index.d.ts +4 -0
  19. package/dist/character/index.d.ts.map +1 -1
  20. package/dist/character/index.js.map +1 -1
  21. package/dist/color/colorblind.d.ts +1 -0
  22. package/dist/color/colorblind.d.ts.map +1 -1
  23. package/dist/dye/database.d.ts +1 -0
  24. package/dist/dye/database.d.ts.map +1 -1
  25. package/dist/dye/dye.d.ts +1 -0
  26. package/dist/dye/dye.d.ts.map +1 -1
  27. package/dist/error/app-error.js +2 -0
  28. package/dist/error/app-error.js.map +1 -1
  29. package/dist/index.d.ts +7 -8
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/preset/community.d.ts +0 -9
  34. package/dist/preset/community.d.ts.map +1 -1
  35. package/dist/preset/core.d.ts +0 -10
  36. package/dist/preset/core.d.ts.map +1 -1
  37. package/dist/preset/index.d.ts +2 -2
  38. package/dist/preset/index.d.ts.map +1 -1
  39. package/dist/preset/response.d.ts +11 -0
  40. package/dist/preset/response.d.ts.map +1 -1
  41. package/package.json +80 -81
  42. package/dist/utility/index.d.ts +0 -71
  43. package/dist/utility/index.d.ts.map +0 -1
  44. package/dist/utility/index.js +0 -20
  45. package/dist/utility/index.js.map +0 -1
@@ -24,6 +24,7 @@ export interface PresetListResponse {
24
24
  }
25
25
  /**
26
26
  * Successful preset creation response
27
+ * @internal Not for direct consumer import — use `PresetSubmitResponse` union instead
27
28
  */
28
29
  export interface PresetSubmitCreatedResponse {
29
30
  /** Operation succeeded */
@@ -35,6 +36,7 @@ export interface PresetSubmitCreatedResponse {
35
36
  }
36
37
  /**
37
38
  * Duplicate preset found response
39
+ * @internal Not for direct consumer import — use `PresetSubmitResponse` union instead
38
40
  */
39
41
  export interface PresetSubmitDuplicateResponse {
40
42
  /** Operation succeeded (duplicate handling is not an error) */
@@ -46,6 +48,7 @@ export interface PresetSubmitDuplicateResponse {
46
48
  }
47
49
  /**
48
50
  * Failed preset submission response
51
+ * @internal Not for direct consumer import — use `PresetSubmitResponse` union instead
49
52
  */
50
53
  export interface PresetSubmitErrorResponse {
51
54
  /** Operation failed */
@@ -64,6 +67,7 @@ export interface PresetSubmitErrorResponse {
64
67
  export type PresetSubmitResponse = PresetSubmitCreatedResponse | PresetSubmitDuplicateResponse | PresetSubmitErrorResponse;
65
68
  /**
66
69
  * Duplicate preset info for edit conflict
70
+ * @internal Not for direct consumer import — use `PresetEditResponse` union instead
67
71
  */
68
72
  export interface PresetEditDuplicateInfo {
69
73
  id: string;
@@ -72,6 +76,7 @@ export interface PresetEditDuplicateInfo {
72
76
  }
73
77
  /**
74
78
  * Successful preset edit response
79
+ * @internal Not for direct consumer import — use `PresetEditResponse` union instead
75
80
  */
76
81
  export interface PresetEditSuccessResponse {
77
82
  /** Operation succeeded */
@@ -83,6 +88,7 @@ export interface PresetEditSuccessResponse {
83
88
  }
84
89
  /**
85
90
  * Preset edit blocked due to duplicate
91
+ * @internal Not for direct consumer import — use `PresetEditResponse` union instead
86
92
  */
87
93
  export interface PresetEditDuplicateResponse {
88
94
  /** Operation failed due to duplicate */
@@ -94,6 +100,7 @@ export interface PresetEditDuplicateResponse {
94
100
  }
95
101
  /**
96
102
  * Failed preset edit response
103
+ * @internal Not for direct consumer import — use `PresetEditResponse` union instead
97
104
  */
98
105
  export interface PresetEditErrorResponse {
99
106
  /** Operation failed */
@@ -109,6 +116,7 @@ export interface PresetEditErrorResponse {
109
116
  export type PresetEditResponse = PresetEditSuccessResponse | PresetEditDuplicateResponse | PresetEditErrorResponse;
110
117
  /**
111
118
  * Successful vote response
119
+ * @internal Not for direct consumer import — use `VoteResponse` union instead
112
120
  */
113
121
  export interface VoteSuccessResponse {
114
122
  /** Operation succeeded */
@@ -120,6 +128,7 @@ export interface VoteSuccessResponse {
120
128
  }
121
129
  /**
122
130
  * Failed vote response
131
+ * @internal Not for direct consumer import — use `VoteResponse` union instead
123
132
  */
124
133
  export interface VoteErrorResponse {
125
134
  /** Operation failed */
@@ -135,6 +144,7 @@ export interface VoteErrorResponse {
135
144
  export type VoteResponse = VoteSuccessResponse | VoteErrorResponse;
136
145
  /**
137
146
  * Successful moderation response
147
+ * @internal Not for direct consumer import — use `ModerationResponse` union instead
138
148
  */
139
149
  export interface ModerationSuccessResponse {
140
150
  /** Operation succeeded */
@@ -144,6 +154,7 @@ export interface ModerationSuccessResponse {
144
154
  }
145
155
  /**
146
156
  * Failed moderation response
157
+ * @internal Not for direct consumer import — use `ModerationResponse` union instead
147
158
  */
148
159
  export interface ModerationErrorResponse {
149
160
  /** Operation failed */
@@ -1 +1 @@
1
- {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/preset/response.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,OAAO,EAAE,eAAe,EAAE,CAA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AAG,yBAAyB,GAAG,uBAAuB,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,iCAAiC;IACjC,UAAU,EAAE,YAAY,EAAE,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,82 +1,81 @@
1
- {
2
- "name": "@xivdyetools/types",
3
- "version": "1.7.0",
4
- "description": "Shared TypeScript type definitions for the xivdyetools ecosystem",
5
- "author": "XIV Dye Tools",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "dist/index.js",
9
- "types": "dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js"
14
- },
15
- "./color": {
16
- "types": "./dist/color/index.d.ts",
17
- "import": "./dist/color/index.js"
18
- },
19
- "./dye": {
20
- "types": "./dist/dye/index.d.ts",
21
- "import": "./dist/dye/index.js"
22
- },
23
- "./character": {
24
- "types": "./dist/character/index.d.ts",
25
- "import": "./dist/character/index.js"
26
- },
27
- "./preset": {
28
- "types": "./dist/preset/index.d.ts",
29
- "import": "./dist/preset/index.js"
30
- },
31
- "./auth": {
32
- "types": "./dist/auth/index.d.ts",
33
- "import": "./dist/auth/index.js"
34
- },
35
- "./api": {
36
- "types": "./dist/api/index.d.ts",
37
- "import": "./dist/api/index.js"
38
- },
39
- "./error": {
40
- "types": "./dist/error/index.d.ts",
41
- "import": "./dist/error/index.js"
42
- },
43
- "./localization": {
44
- "types": "./dist/localization/index.d.ts",
45
- "import": "./dist/localization/index.js"
46
- }
47
- },
48
- "files": [
49
- "dist",
50
- "README.md"
51
- ],
52
- "sideEffects": false,
53
- "scripts": {
54
- "build": "tsc -p tsconfig.build.json",
55
- "type-check": "tsc --noEmit",
56
- "clean": "rimraf dist",
57
- "prepublishOnly": "npm run clean && npm run build",
58
- "test": "vitest run",
59
- "test:watch": "vitest",
60
- "test:coverage": "vitest run --coverage"
61
- },
62
- "devDependencies": {
63
- "@vitest/coverage-v8": "^4.0.15",
64
- "rimraf": "^5.0.5",
65
- "typescript": "^5.9.3",
66
- "vitest": "^4.0.15"
67
- },
68
- "engines": {
69
- "node": ">=18.0.0"
70
- },
71
- "keywords": [
72
- "xivdyetools",
73
- "ffxiv",
74
- "dyes",
75
- "typescript",
76
- "types"
77
- ],
78
- "repository": {
79
- "type": "git",
80
- "url": "https://github.com/xivdyetools/xivdyetools-types.git"
81
- }
1
+ {
2
+ "name": "@xivdyetools/types",
3
+ "version": "1.9.0",
4
+ "description": "Shared TypeScript type definitions for the xivdyetools ecosystem",
5
+ "author": "XIV Dye Tools",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./color": {
16
+ "types": "./dist/color/index.d.ts",
17
+ "import": "./dist/color/index.js"
18
+ },
19
+ "./dye": {
20
+ "types": "./dist/dye/index.d.ts",
21
+ "import": "./dist/dye/index.js"
22
+ },
23
+ "./character": {
24
+ "types": "./dist/character/index.d.ts",
25
+ "import": "./dist/character/index.js"
26
+ },
27
+ "./preset": {
28
+ "types": "./dist/preset/index.d.ts",
29
+ "import": "./dist/preset/index.js"
30
+ },
31
+ "./auth": {
32
+ "types": "./dist/auth/index.d.ts",
33
+ "import": "./dist/auth/index.js"
34
+ },
35
+ "./api": {
36
+ "types": "./dist/api/index.d.ts",
37
+ "import": "./dist/api/index.js"
38
+ },
39
+ "./error": {
40
+ "types": "./dist/error/index.d.ts",
41
+ "import": "./dist/error/index.js"
42
+ },
43
+ "./localization": {
44
+ "types": "./dist/localization/index.d.ts",
45
+ "import": "./dist/localization/index.js"
46
+ }
47
+ },
48
+ "files": [
49
+ "dist",
50
+ "README.md"
51
+ ],
52
+ "sideEffects": false,
53
+ "devDependencies": {
54
+ "@vitest/coverage-v8": "^4.0.18",
55
+ "vitest": "^4.0.18"
56
+ },
57
+ "engines": {
58
+ "node": ">=18.0.0"
59
+ },
60
+ "keywords": [
61
+ "xivdyetools",
62
+ "ffxiv",
63
+ "dyes",
64
+ "typescript",
65
+ "types"
66
+ ],
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "https://github.com/FlashGalatine/xivdyetools.git",
70
+ "directory": "packages/types"
71
+ },
72
+ "scripts": {
73
+ "build": "tsc -p tsconfig.build.json",
74
+ "type-check": "tsc --noEmit",
75
+ "clean": "rimraf dist",
76
+ "lint": "eslint src",
77
+ "test": "vitest run",
78
+ "test:watch": "vitest",
79
+ "test:coverage": "vitest run --coverage"
80
+ }
82
81
  }
@@ -1,71 +0,0 @@
1
- /**
2
- * @xivdyetools/types - Utility Types
3
- *
4
- * Generic utility types for common patterns.
5
- *
6
- * @module utility
7
- */
8
- import type { AppError } from '../error/app-error.js';
9
- /**
10
- * Generic result type for operations that might fail
11
- *
12
- * Use this for functions that can return either a value or an error,
13
- * avoiding exceptions for expected failure cases.
14
- *
15
- * @example
16
- * ```typescript
17
- * function parseColor(hex: string): Result<RGB> {
18
- * if (!isValidHex(hex)) {
19
- * return { ok: false, error: new AppError('INVALID_HEX', 'Invalid hex color') };
20
- * }
21
- * return { ok: true, value: hexToRgb(hex) };
22
- * }
23
- *
24
- * const result = parseColor('#ff0000');
25
- * if (result.ok) {
26
- * console.log(result.value); // RGB object
27
- * } else {
28
- * console.error(result.error.message);
29
- * }
30
- * ```
31
- */
32
- export type Result<T, E = AppError> = {
33
- ok: true;
34
- value: T;
35
- } | {
36
- ok: false;
37
- error: E;
38
- };
39
- /**
40
- * Async result type
41
- *
42
- * Promise wrapper around Result for async operations.
43
- */
44
- export type AsyncResult<T, E = AppError> = Promise<Result<T, E>>;
45
- /**
46
- * Nullable type
47
- *
48
- * Value that can be T or null.
49
- */
50
- export type Nullable<T> = T | null;
51
- /**
52
- * Optional type
53
- *
54
- * Value that can be T or undefined.
55
- */
56
- export type Optional<T> = T | undefined;
57
- /**
58
- * Type guard for checking if a Result is successful
59
- */
60
- export declare function isOk<T, E>(result: Result<T, E>): result is {
61
- ok: true;
62
- value: T;
63
- };
64
- /**
65
- * Type guard for checking if a Result is an error
66
- */
67
- export declare function isErr<T, E>(result: Result<T, E>): result is {
68
- ok: false;
69
- error: E;
70
- };
71
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,IAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACtB;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAE5B;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAEnC;;;;GAIG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;AAExC;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAEjF;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAEnF"}
@@ -1,20 +0,0 @@
1
- /**
2
- * @xivdyetools/types - Utility Types
3
- *
4
- * Generic utility types for common patterns.
5
- *
6
- * @module utility
7
- */
8
- /**
9
- * Type guard for checking if a Result is successful
10
- */
11
- export function isOk(result) {
12
- return result.ok;
13
- }
14
- /**
15
- * Type guard for checking if a Result is an error
16
- */
17
- export function isErr(result) {
18
- return !result.ok;
19
- }
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoDH;;GAEG;AACH,MAAM,UAAU,IAAI,CAAO,MAAoB;IAC7C,OAAO,MAAM,CAAC,EAAE,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAO,MAAoB;IAC9C,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;AACpB,CAAC"}