@ifunny/ifunny-api-types 0.6.8 → 0.7.1
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/CHANGELOG.md +39 -0
- package/dist/rest/endpoints.js +156 -0
- package/dist/rest/endpoints.js.map +1 -0
- package/dist/rest/index.js +1 -0
- package/dist/rest/index.js.map +1 -1
- package/package.json +1 -1
- package/types/rest/endpoints.d.ts +118 -0
- package/types/rest/endpoints.d.ts.map +1 -0
- package/types/rest/index.d.ts +1 -0
- package/types/rest/index.d.ts.map +1 -1
- package/types/utils/errors.d.ts +1 -1
- package/types/utils/errors.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,45 @@
|
|
|
2
2
|
> All notable changes to this project will be documented in this file.
|
|
3
3
|
> This Changelog adheres to the [Semantic Versioning]("https://semver.org/")
|
|
4
4
|
|
|
5
|
+
## [v0.7.1](https://github.com/ifunny-co/ifunny-api-types/compare/v0.7.0...v0.7.1) - 2022-08-25
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Fixes
|
|
9
|
+
|
|
10
|
+
* Updated exports to reflect endpoints @MakeShiftArtist ([`49c70fd`](https://github.com/ifunny-co/ifunny-api-types/commit/49c70fd9604e1561cd372c98dc6f3171fb945e1c))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
* Update CHANGELOG.md @MakeShiftArtist ([`4ef5690`](https://github.com/ifunny-co/ifunny-api-types/commit/4ef56906067a61045cd21b1287f7bba589d1a0fb))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [v0.7.0](https://github.com/ifunny-co/ifunny-api-types/compare/v0.6.9...v0.7.0) - 2022-08-25
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Add endpoints.ts @MakeShiftArtist ([`e39adf6`](https://github.com/ifunny-co/ifunny-api-types/commit/e39adf6adde6699dd0630dbfaaae960ba939177d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Documentation
|
|
27
|
+
|
|
28
|
+
* Update CHANGELOG.md @MakeShiftArtist ([`13a6361`](https://github.com/ifunny-co/ifunny-api-types/commit/13a63613724d515986b87a746b674fd5d2446d9b))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [v0.6.9](https://github.com/ifunny-co/ifunny-api-types/compare/v0.6.8...v0.6.9) - 2022-08-25
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Fixes
|
|
35
|
+
|
|
36
|
+
* Typo in InvalidEmailError @MakeShiftArtist ([`7cfb791`](https://github.com/ifunny-co/ifunny-api-types/commit/7cfb791cbbaa2e31f38f24f697bf35a16764ee5c))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Documentation
|
|
40
|
+
|
|
41
|
+
* Update CHANGELOG.md @MakeShiftArtist ([`35d4a6d`](https://github.com/ifunny-co/ifunny-api-types/commit/35d4a6dba29fdbfdaaeee74c320ddc14152c4da4))
|
|
42
|
+
|
|
43
|
+
|
|
5
44
|
## [v0.6.8](https://github.com/ifunny-co/ifunny-api-types/compare/v0.6.7...v0.6.8) - 2022-08-25
|
|
6
45
|
|
|
7
46
|
### Features
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Endpoints = void 0;
|
|
4
|
+
class Endpoints {
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* "/timelines/users/:userId"
|
|
8
|
+
* "/timelines/users/by_nick/:userNick"
|
|
9
|
+
*/
|
|
10
|
+
static userTimeline(query, byNick = false) {
|
|
11
|
+
return this.timelines + this.user(query, byNick);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @param query The user id or nick
|
|
15
|
+
* @param byNick Whether to search by nick (Default: false)
|
|
16
|
+
* @example
|
|
17
|
+
* "/users"
|
|
18
|
+
* "/users/:userId"
|
|
19
|
+
* "/users/by_nick/:userNick"
|
|
20
|
+
*/
|
|
21
|
+
static user(query, byNick = false) {
|
|
22
|
+
let users = "/users";
|
|
23
|
+
if (!query)
|
|
24
|
+
return users;
|
|
25
|
+
return users + (byNick ? `/by_nick/${query}` : `/query`);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @param user The user id or nick
|
|
29
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
30
|
+
* @example
|
|
31
|
+
* "/users/:userId/guests"
|
|
32
|
+
* "/users/by_nick/:userNick/guests"
|
|
33
|
+
*/
|
|
34
|
+
static guests(user, byNick = false) {
|
|
35
|
+
return this.user(user, byNick) + "/guests";
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @param user The user id or nick
|
|
39
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
40
|
+
* @example
|
|
41
|
+
* "/users/:userId/blocked"
|
|
42
|
+
* "/users/by_nick/:userNick/blocked"
|
|
43
|
+
*/
|
|
44
|
+
static blocked(user, byNick = false) {
|
|
45
|
+
return this.user(user, byNick) + "/blocked";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @param user The user id or nick
|
|
49
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
50
|
+
* @example
|
|
51
|
+
* "/users/:userId/subscribers"
|
|
52
|
+
* "/users/by_nick/:userNick/subscribers"
|
|
53
|
+
*/
|
|
54
|
+
static subscribers(user, byNick = false) {
|
|
55
|
+
return this.user(user, byNick) + "/subscribers";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @param user The user id or nick
|
|
59
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
60
|
+
* @example
|
|
61
|
+
* "/users/:userId/subscriptions"
|
|
62
|
+
*/
|
|
63
|
+
static subscriptions(user, byNick = false) {
|
|
64
|
+
return this.user(user, byNick) + "/subscriptions";
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @example
|
|
68
|
+
* "/content"
|
|
69
|
+
* "/content/:contentId"
|
|
70
|
+
*/
|
|
71
|
+
static content(id) {
|
|
72
|
+
return "/content" + (id ? `/${id}` : "");
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @param contentId The content id or array of content ids if adding to reads
|
|
76
|
+
* @example
|
|
77
|
+
* "/content/:contentId/smiles"
|
|
78
|
+
*/
|
|
79
|
+
static smiles(contentId) {
|
|
80
|
+
return this.content(contentId) + "/smiles";
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @param contentId The content id
|
|
84
|
+
* @example
|
|
85
|
+
* "/content/:contentId/republished"
|
|
86
|
+
*/
|
|
87
|
+
static republishes(id) {
|
|
88
|
+
return this.content(id) + "/republished";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @example
|
|
92
|
+
* "/content/:contentId/comments"
|
|
93
|
+
*/
|
|
94
|
+
static comments(contentId) {
|
|
95
|
+
return this.content(contentId) + "/comments";
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @param contentId The content id
|
|
99
|
+
* @param commentId The comment id
|
|
100
|
+
* @example
|
|
101
|
+
* "/content/:contentId/comments/:commentId/replies"
|
|
102
|
+
*/
|
|
103
|
+
static replies(contentId, commentId) {
|
|
104
|
+
return this.comments(contentId) + `/${commentId}/replies`;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @param contentId The content id
|
|
108
|
+
* @example
|
|
109
|
+
* "/content/:contentId/comments/attached_content"
|
|
110
|
+
*/
|
|
111
|
+
static commentAttachment(contentId) {
|
|
112
|
+
return this.comments(contentId) + "/attached_content";
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param contentId The content id or array of content ids if adding to reads
|
|
116
|
+
* @example
|
|
117
|
+
* "/reads"
|
|
118
|
+
* "/reads/:contentId"
|
|
119
|
+
* "/reads/:contentId1,contentId2..."
|
|
120
|
+
*/
|
|
121
|
+
static reads(contentId) {
|
|
122
|
+
if (Array.isArray(contentId)) {
|
|
123
|
+
contentId = contentId.join(",");
|
|
124
|
+
}
|
|
125
|
+
return "/reads" + (contentId ? `/${contentId}` : "");
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @param userId The id of the user the ban belongs to
|
|
129
|
+
* @param banId The id of the Ban
|
|
130
|
+
* @example
|
|
131
|
+
* "/users/:userId/bans"
|
|
132
|
+
* "/users/:userId/bans/:banId"
|
|
133
|
+
*/
|
|
134
|
+
static bans(userId, banId) {
|
|
135
|
+
return `/users/${userId}/bans` + (banId ? `/${banId}` : "");
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.Endpoints = Endpoints;
|
|
139
|
+
Endpoints.base = "api.ifunny.mobi";
|
|
140
|
+
Endpoints.account = "/account";
|
|
141
|
+
Endpoints.collective = "/feeds/collective";
|
|
142
|
+
Endpoints.counters = "/counters";
|
|
143
|
+
Endpoints.featured = "/feeds/featured";
|
|
144
|
+
Endpoints.feeds = "/feeds";
|
|
145
|
+
Endpoints.oauth2 = "/oauth2";
|
|
146
|
+
Endpoints.projectElements = "/feeds/project_elements";
|
|
147
|
+
Endpoints.subscriptionFeed = "/timelines/home";
|
|
148
|
+
Endpoints.timelines = "/timelines";
|
|
149
|
+
Endpoints.token = "/oauth2/token";
|
|
150
|
+
Endpoints.myComments = "users/my/comments";
|
|
151
|
+
Endpoints.chatInvites = "users/my/chat_invitations";
|
|
152
|
+
Endpoints.mySmiles = "/users/my/content_smiles";
|
|
153
|
+
Endpoints.myAppeals = "users/my/appeals";
|
|
154
|
+
Endpoints.unreadChatMessages = "users/my/unread_chat_messages";
|
|
155
|
+
Endpoints.myNews = "news/my";
|
|
156
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/rest/endpoints.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;IAoBrB;;;;OAIG;IACH,MAAM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iB,CAAC;AACzB,iBAAO,GAAG,UAAU,CAAC;AACrB,oBAAU,GAAG,mBAAmB,CAAC;AACjC,kBAAQ,GAAG,WAAW,CAAC;AACvB,kBAAQ,GAAG,iBAAiB,CAAC;AAC7B,eAAK,GAAG,QAAQ,CAAC;AACjB,gBAAM,GAAG,SAAS,CAAC;AACnB,yBAAe,GAAG,yBAAyB,CAAC;AAC5C,0BAAgB,GAAG,iBAAiB,CAAC;AACrC,mBAAS,GAAG,YAAY,CAAC;AACzB,eAAK,GAAG,eAAe,CAAC;AAExB,oBAAU,GAAG,mBAAmB,CAAC;AACjC,qBAAW,GAAG,2BAA2B,CAAC;AAC1C,kBAAQ,GAAG,0BAA0B,CAAC;AACtC,mBAAS,GAAG,kBAAkB,CAAC;AAC/B,4BAAkB,GAAG,+BAA+B,CAAC;AACrD,gBAAM,GAAG,SAAS,CAAC"}
|
package/dist/rest/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./explore"), exports);
|
|
|
19
19
|
__exportStar(require("./issues"), exports);
|
|
20
20
|
__exportStar(require("./oauth2"), exports);
|
|
21
21
|
__exportStar(require("./content"), exports);
|
|
22
|
+
__exportStar(require("./endpoints"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/rest/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export declare class Endpoints {
|
|
2
|
+
static readonly base = "api.ifunny.mobi";
|
|
3
|
+
static readonly account = "/account";
|
|
4
|
+
static readonly collective = "/feeds/collective";
|
|
5
|
+
static readonly counters = "/counters";
|
|
6
|
+
static readonly featured = "/feeds/featured";
|
|
7
|
+
static readonly feeds = "/feeds";
|
|
8
|
+
static readonly oauth2 = "/oauth2";
|
|
9
|
+
static readonly projectElements = "/feeds/project_elements";
|
|
10
|
+
static readonly subscriptionFeed = "/timelines/home";
|
|
11
|
+
static readonly timelines = "/timelines";
|
|
12
|
+
static readonly token = "/oauth2/token";
|
|
13
|
+
static readonly myComments = "users/my/comments";
|
|
14
|
+
static readonly chatInvites = "users/my/chat_invitations";
|
|
15
|
+
static readonly mySmiles = "/users/my/content_smiles";
|
|
16
|
+
static readonly myAppeals = "users/my/appeals";
|
|
17
|
+
static readonly unreadChatMessages = "users/my/unread_chat_messages";
|
|
18
|
+
static readonly myNews = "news/my";
|
|
19
|
+
/**
|
|
20
|
+
* @example
|
|
21
|
+
* "/timelines/users/:userId"
|
|
22
|
+
* "/timelines/users/by_nick/:userNick"
|
|
23
|
+
*/
|
|
24
|
+
static userTimeline(query: string, byNick?: boolean): string;
|
|
25
|
+
/**
|
|
26
|
+
* @param query The user id or nick
|
|
27
|
+
* @param byNick Whether to search by nick (Default: false)
|
|
28
|
+
* @example
|
|
29
|
+
* "/users"
|
|
30
|
+
* "/users/:userId"
|
|
31
|
+
* "/users/by_nick/:userNick"
|
|
32
|
+
*/
|
|
33
|
+
static user(query?: string, byNick?: boolean): string;
|
|
34
|
+
/**
|
|
35
|
+
* @param user The user id or nick
|
|
36
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
37
|
+
* @example
|
|
38
|
+
* "/users/:userId/guests"
|
|
39
|
+
* "/users/by_nick/:userNick/guests"
|
|
40
|
+
*/
|
|
41
|
+
static guests(user: string, byNick?: boolean): string;
|
|
42
|
+
/**
|
|
43
|
+
* @param user The user id or nick
|
|
44
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
45
|
+
* @example
|
|
46
|
+
* "/users/:userId/blocked"
|
|
47
|
+
* "/users/by_nick/:userNick/blocked"
|
|
48
|
+
*/
|
|
49
|
+
static blocked(user: string, byNick?: boolean): string;
|
|
50
|
+
/**
|
|
51
|
+
* @param user The user id or nick
|
|
52
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
53
|
+
* @example
|
|
54
|
+
* "/users/:userId/subscribers"
|
|
55
|
+
* "/users/by_nick/:userNick/subscribers"
|
|
56
|
+
*/
|
|
57
|
+
static subscribers(user: string, byNick?: boolean): string;
|
|
58
|
+
/**
|
|
59
|
+
* @param user The user id or nick
|
|
60
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
61
|
+
* @example
|
|
62
|
+
* "/users/:userId/subscriptions"
|
|
63
|
+
*/
|
|
64
|
+
static subscriptions(user: string, byNick?: boolean): string;
|
|
65
|
+
/**
|
|
66
|
+
* @example
|
|
67
|
+
* "/content"
|
|
68
|
+
* "/content/:contentId"
|
|
69
|
+
*/
|
|
70
|
+
static content(id?: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* @param contentId The content id or array of content ids if adding to reads
|
|
73
|
+
* @example
|
|
74
|
+
* "/content/:contentId/smiles"
|
|
75
|
+
*/
|
|
76
|
+
static smiles(contentId: string): string;
|
|
77
|
+
/**
|
|
78
|
+
* @param contentId The content id
|
|
79
|
+
* @example
|
|
80
|
+
* "/content/:contentId/republished"
|
|
81
|
+
*/
|
|
82
|
+
static republishes(id: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* @example
|
|
85
|
+
* "/content/:contentId/comments"
|
|
86
|
+
*/
|
|
87
|
+
static comments(contentId: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* @param contentId The content id
|
|
90
|
+
* @param commentId The comment id
|
|
91
|
+
* @example
|
|
92
|
+
* "/content/:contentId/comments/:commentId/replies"
|
|
93
|
+
*/
|
|
94
|
+
static replies(contentId: string, commentId: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* @param contentId The content id
|
|
97
|
+
* @example
|
|
98
|
+
* "/content/:contentId/comments/attached_content"
|
|
99
|
+
*/
|
|
100
|
+
static commentAttachment(contentId: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* @param contentId The content id or array of content ids if adding to reads
|
|
103
|
+
* @example
|
|
104
|
+
* "/reads"
|
|
105
|
+
* "/reads/:contentId"
|
|
106
|
+
* "/reads/:contentId1,contentId2..."
|
|
107
|
+
*/
|
|
108
|
+
static reads(contentId?: string | string[]): string;
|
|
109
|
+
/**
|
|
110
|
+
* @param userId The id of the user the ban belongs to
|
|
111
|
+
* @param banId The id of the Ban
|
|
112
|
+
* @example
|
|
113
|
+
* "/users/:userId/bans"
|
|
114
|
+
* "/users/:userId/bans/:banId"
|
|
115
|
+
*/
|
|
116
|
+
static bans(userId: string, banId?: string): string;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/rest/endpoints.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,qBAAqB;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAc;IACrC,MAAM,CAAC,QAAQ,CAAC,UAAU,uBAAuB;IACjD,MAAM,CAAC,QAAQ,CAAC,QAAQ,eAAe;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,qBAAqB;IAC7C,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IACjC,MAAM,CAAC,QAAQ,CAAC,MAAM,aAAa;IACnC,MAAM,CAAC,QAAQ,CAAC,eAAe,6BAA6B;IAC5D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,qBAAqB;IACrD,MAAM,CAAC,QAAQ,CAAC,SAAS,gBAAgB;IACzC,MAAM,CAAC,QAAQ,CAAC,KAAK,mBAAmB;IAExC,MAAM,CAA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AAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IAI5D;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAInD;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAOnD;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;CAG1C"}
|
package/types/rest/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
package/types/utils/errors.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface RESTAPICaptchaError extends RESTAPIError {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface RESTAPIInvalidEmailError {
|
|
28
28
|
error: IFUNNY_ERRORS.INVALID_EMAIL;
|
|
29
|
-
|
|
29
|
+
error_description: string;
|
|
30
30
|
status: 403;
|
|
31
31
|
}
|
|
32
32
|
export interface RESTAPIEmailExistsError {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5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