@globalscoutme/api-client 1.1.29 → 1.2.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.
- package/README.md +334 -303
- package/client/client.gen.ts +0 -1
- package/dist/client/client.gen.js +0 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/sdk.gen.d.ts +17 -1
- package/dist/sdk.gen.js +63 -0
- package/dist/types.gen.d.ts +154 -0
- package/index.ts +37 -0
- package/package.json +1 -1
- package/sdk.gen.ts +146 -0
- package/tsconfig.json +2 -1
- package/types.gen.ts +198 -0
package/sdk.gen.ts
CHANGED
|
@@ -73,6 +73,10 @@ import type {
|
|
|
73
73
|
GetApiDocumentsMeData,
|
|
74
74
|
GetApiDocumentsMeErrors,
|
|
75
75
|
GetApiDocumentsMeResponses,
|
|
76
|
+
GetApiGlobalChatMessagesData,
|
|
77
|
+
GetApiGlobalChatMessagesResponses,
|
|
78
|
+
GetApiGlobalChatStatusData,
|
|
79
|
+
GetApiGlobalChatStatusResponses,
|
|
76
80
|
GetApiIndexByTableNameData,
|
|
77
81
|
GetApiIndexByTableNameErrors,
|
|
78
82
|
GetApiIndexByTableNameResponses,
|
|
@@ -81,6 +85,8 @@ import type {
|
|
|
81
85
|
GetApiIndexCountriesResponses,
|
|
82
86
|
GetApiInvitationsData,
|
|
83
87
|
GetApiInvitationsResponses,
|
|
88
|
+
GetApiKycMobileReturnData,
|
|
89
|
+
GetApiKycMobileReturnResponses,
|
|
84
90
|
GetApiKycStatusByUserIdData,
|
|
85
91
|
GetApiKycStatusByUserIdErrors,
|
|
86
92
|
GetApiKycStatusByUserIdResponses,
|
|
@@ -159,6 +165,10 @@ import type {
|
|
|
159
165
|
PatchApiClubsMeByIdData,
|
|
160
166
|
PatchApiClubsMeByIdErrors,
|
|
161
167
|
PatchApiClubsMeByIdResponses,
|
|
168
|
+
PatchApiGlobalChatNotificationsData,
|
|
169
|
+
PatchApiGlobalChatNotificationsResponses,
|
|
170
|
+
PatchApiGlobalChatReadData,
|
|
171
|
+
PatchApiGlobalChatReadResponses,
|
|
162
172
|
PatchApiNotificationsPreferencesData,
|
|
163
173
|
PatchApiNotificationsPreferencesResponses,
|
|
164
174
|
PatchApiOffersConversationsByIdReadData,
|
|
@@ -196,6 +206,14 @@ import type {
|
|
|
196
206
|
PostApiDocumentsData,
|
|
197
207
|
PostApiDocumentsErrors,
|
|
198
208
|
PostApiDocumentsResponses,
|
|
209
|
+
PostApiGlobalChatJoinData,
|
|
210
|
+
PostApiGlobalChatJoinResponses,
|
|
211
|
+
PostApiGlobalChatLeaveData,
|
|
212
|
+
PostApiGlobalChatLeaveResponses,
|
|
213
|
+
PostApiGlobalChatMessagesByMessageIdReportData,
|
|
214
|
+
PostApiGlobalChatMessagesByMessageIdReportResponses,
|
|
215
|
+
PostApiGlobalChatMessagesData,
|
|
216
|
+
PostApiGlobalChatMessagesResponses,
|
|
199
217
|
PostApiInvitationsAcceptData,
|
|
200
218
|
PostApiInvitationsAcceptResponses,
|
|
201
219
|
PostApiInvitationsByIdResendData,
|
|
@@ -1216,6 +1234,19 @@ export class Invitations extends HeyApiClient {
|
|
|
1216
1234
|
}
|
|
1217
1235
|
|
|
1218
1236
|
export class Kyc extends HeyApiClient {
|
|
1237
|
+
/**
|
|
1238
|
+
* Return a Smile Link browser session to the mobile app
|
|
1239
|
+
*/
|
|
1240
|
+
public returnToMobileKyc<ThrowOnError extends boolean = false>(
|
|
1241
|
+
options: Options<GetApiKycMobileReturnData, ThrowOnError>
|
|
1242
|
+
) {
|
|
1243
|
+
return (options.client ?? this.client).get<
|
|
1244
|
+
GetApiKycMobileReturnResponses,
|
|
1245
|
+
unknown,
|
|
1246
|
+
ThrowOnError
|
|
1247
|
+
>({ url: '/api/kyc/mobile-return', ...options });
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1219
1250
|
/**
|
|
1220
1251
|
* Start or resume a KYC verification job
|
|
1221
1252
|
*/
|
|
@@ -1685,6 +1716,116 @@ export class Subscriptions extends HeyApiClient {
|
|
|
1685
1716
|
}
|
|
1686
1717
|
}
|
|
1687
1718
|
|
|
1719
|
+
export class GlobalChat extends HeyApiClient {
|
|
1720
|
+
public getGlobalChatStatus<ThrowOnError extends boolean = false>(
|
|
1721
|
+
options?: Options<GetApiGlobalChatStatusData, ThrowOnError>
|
|
1722
|
+
) {
|
|
1723
|
+
return (options?.client ?? this.client).get<
|
|
1724
|
+
GetApiGlobalChatStatusResponses,
|
|
1725
|
+
unknown,
|
|
1726
|
+
ThrowOnError
|
|
1727
|
+
>({ url: '/api/global-chat/status', ...options });
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
public joinGlobalChat<ThrowOnError extends boolean = false>(
|
|
1731
|
+
options: Options<PostApiGlobalChatJoinData, ThrowOnError>
|
|
1732
|
+
) {
|
|
1733
|
+
return (options.client ?? this.client).post<
|
|
1734
|
+
PostApiGlobalChatJoinResponses,
|
|
1735
|
+
unknown,
|
|
1736
|
+
ThrowOnError
|
|
1737
|
+
>({
|
|
1738
|
+
url: '/api/global-chat/join',
|
|
1739
|
+
...options,
|
|
1740
|
+
headers: {
|
|
1741
|
+
'Content-Type': 'application/json',
|
|
1742
|
+
...options.headers,
|
|
1743
|
+
},
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
public leaveGlobalChat<ThrowOnError extends boolean = false>(
|
|
1748
|
+
options?: Options<PostApiGlobalChatLeaveData, ThrowOnError>
|
|
1749
|
+
) {
|
|
1750
|
+
return (options?.client ?? this.client).post<
|
|
1751
|
+
PostApiGlobalChatLeaveResponses,
|
|
1752
|
+
unknown,
|
|
1753
|
+
ThrowOnError
|
|
1754
|
+
>({ url: '/api/global-chat/leave', ...options });
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
public listGlobalChatMessages<ThrowOnError extends boolean = false>(
|
|
1758
|
+
options?: Options<GetApiGlobalChatMessagesData, ThrowOnError>
|
|
1759
|
+
) {
|
|
1760
|
+
return (options?.client ?? this.client).get<
|
|
1761
|
+
GetApiGlobalChatMessagesResponses,
|
|
1762
|
+
unknown,
|
|
1763
|
+
ThrowOnError
|
|
1764
|
+
>({ url: '/api/global-chat/messages', ...options });
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
public sendGlobalChatMessage<ThrowOnError extends boolean = false>(
|
|
1768
|
+
options: Options<PostApiGlobalChatMessagesData, ThrowOnError>
|
|
1769
|
+
) {
|
|
1770
|
+
return (options.client ?? this.client).post<
|
|
1771
|
+
PostApiGlobalChatMessagesResponses,
|
|
1772
|
+
unknown,
|
|
1773
|
+
ThrowOnError
|
|
1774
|
+
>({
|
|
1775
|
+
url: '/api/global-chat/messages',
|
|
1776
|
+
...options,
|
|
1777
|
+
headers: {
|
|
1778
|
+
'Content-Type': 'application/json',
|
|
1779
|
+
...options.headers,
|
|
1780
|
+
},
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
public markGlobalChatRead<ThrowOnError extends boolean = false>(
|
|
1785
|
+
options: Options<PatchApiGlobalChatReadData, ThrowOnError>
|
|
1786
|
+
) {
|
|
1787
|
+
return (options.client ?? this.client).patch<
|
|
1788
|
+
PatchApiGlobalChatReadResponses,
|
|
1789
|
+
unknown,
|
|
1790
|
+
ThrowOnError
|
|
1791
|
+
>({
|
|
1792
|
+
url: '/api/global-chat/read',
|
|
1793
|
+
...options,
|
|
1794
|
+
headers: {
|
|
1795
|
+
'Content-Type': 'application/json',
|
|
1796
|
+
...options.headers,
|
|
1797
|
+
},
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
public reportGlobalChatMessage<ThrowOnError extends boolean = false>(
|
|
1802
|
+
options: Options<PostApiGlobalChatMessagesByMessageIdReportData, ThrowOnError>
|
|
1803
|
+
) {
|
|
1804
|
+
return (options.client ?? this.client).post<
|
|
1805
|
+
PostApiGlobalChatMessagesByMessageIdReportResponses,
|
|
1806
|
+
unknown,
|
|
1807
|
+
ThrowOnError
|
|
1808
|
+
>({ url: '/api/global-chat/messages/{messageId}/report', ...options });
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
public updateGlobalChatNotifications<ThrowOnError extends boolean = false>(
|
|
1812
|
+
options: Options<PatchApiGlobalChatNotificationsData, ThrowOnError>
|
|
1813
|
+
) {
|
|
1814
|
+
return (options.client ?? this.client).patch<
|
|
1815
|
+
PatchApiGlobalChatNotificationsResponses,
|
|
1816
|
+
unknown,
|
|
1817
|
+
ThrowOnError
|
|
1818
|
+
>({
|
|
1819
|
+
url: '/api/global-chat/notifications',
|
|
1820
|
+
...options,
|
|
1821
|
+
headers: {
|
|
1822
|
+
'Content-Type': 'application/json',
|
|
1823
|
+
...options.headers,
|
|
1824
|
+
},
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1688
1829
|
export class GlobalScoutMeClient extends HeyApiClient {
|
|
1689
1830
|
public static readonly __registry = new HeyApiRegistry<GlobalScoutMeClient>();
|
|
1690
1831
|
|
|
@@ -1817,4 +1958,9 @@ export class GlobalScoutMeClient extends HeyApiClient {
|
|
|
1817
1958
|
get subscriptions(): Subscriptions {
|
|
1818
1959
|
return (this._subscriptions ??= new Subscriptions({ client: this.client }));
|
|
1819
1960
|
}
|
|
1961
|
+
|
|
1962
|
+
private _globalChat?: GlobalChat;
|
|
1963
|
+
get globalChat(): GlobalChat {
|
|
1964
|
+
return (this._globalChat ??= new GlobalChat({ client: this.client }));
|
|
1965
|
+
}
|
|
1820
1966
|
}
|
package/tsconfig.json
CHANGED
package/types.gen.ts
CHANGED
|
@@ -2684,6 +2684,73 @@ export type PortalResultDto = {
|
|
|
2684
2684
|
url: string;
|
|
2685
2685
|
};
|
|
2686
2686
|
|
|
2687
|
+
export type GlobalChatMessageDto = {
|
|
2688
|
+
id: string;
|
|
2689
|
+
senderId: string;
|
|
2690
|
+
senderDisplayName: string;
|
|
2691
|
+
senderAvatarUrl: string | null;
|
|
2692
|
+
body: string;
|
|
2693
|
+
createdAt: string;
|
|
2694
|
+
isOwnMessage: boolean;
|
|
2695
|
+
clientMessageId: string;
|
|
2696
|
+
};
|
|
2697
|
+
|
|
2698
|
+
export type GlobalChatStatusDto = {
|
|
2699
|
+
available: boolean;
|
|
2700
|
+
eligibility: 'eligible' | 'underage' | 'incomplete' | 'wrong_role' | 'inactive';
|
|
2701
|
+
membership: 'not_joined' | 'active' | 'left' | 'excluded' | 'rules_required';
|
|
2702
|
+
rulesVersion: number;
|
|
2703
|
+
notificationsEnabled: boolean;
|
|
2704
|
+
masterPushEnabled: boolean;
|
|
2705
|
+
unreadCount: number;
|
|
2706
|
+
latestMessage: GlobalChatMessageDto | null;
|
|
2707
|
+
};
|
|
2708
|
+
|
|
2709
|
+
export type JoinGlobalChatDto = {
|
|
2710
|
+
acceptedRulesVersion?: number;
|
|
2711
|
+
rulesLocale?: string;
|
|
2712
|
+
notificationsEnabled: boolean;
|
|
2713
|
+
};
|
|
2714
|
+
|
|
2715
|
+
export type JoinGlobalChatResultDto = {
|
|
2716
|
+
available: boolean;
|
|
2717
|
+
eligibility: 'eligible' | 'underage' | 'incomplete' | 'wrong_role' | 'inactive';
|
|
2718
|
+
membership: 'not_joined' | 'active' | 'left' | 'excluded' | 'rules_required';
|
|
2719
|
+
rulesVersion: number;
|
|
2720
|
+
notificationsEnabled: boolean;
|
|
2721
|
+
masterPushEnabled: boolean;
|
|
2722
|
+
unreadCount: number;
|
|
2723
|
+
latestMessage: GlobalChatMessageDto | null;
|
|
2724
|
+
becameActive: boolean;
|
|
2725
|
+
};
|
|
2726
|
+
|
|
2727
|
+
export type GlobalChatActionDto = {
|
|
2728
|
+
ok: boolean;
|
|
2729
|
+
};
|
|
2730
|
+
|
|
2731
|
+
export type GlobalChatMessageCursorDto = {
|
|
2732
|
+
createdAt: string;
|
|
2733
|
+
id: string;
|
|
2734
|
+
};
|
|
2735
|
+
|
|
2736
|
+
export type GlobalChatMessagePageDto = {
|
|
2737
|
+
messages: Array<GlobalChatMessageDto>;
|
|
2738
|
+
nextCursor: GlobalChatMessageCursorDto | null;
|
|
2739
|
+
};
|
|
2740
|
+
|
|
2741
|
+
export type SendGlobalChatMessageDto = {
|
|
2742
|
+
body: string;
|
|
2743
|
+
clientMessageId: string;
|
|
2744
|
+
};
|
|
2745
|
+
|
|
2746
|
+
export type MarkGlobalChatReadDto = {
|
|
2747
|
+
messageId: string;
|
|
2748
|
+
};
|
|
2749
|
+
|
|
2750
|
+
export type UpdateGlobalChatNotificationsDto = {
|
|
2751
|
+
notificationsEnabled: boolean;
|
|
2752
|
+
};
|
|
2753
|
+
|
|
2687
2754
|
export type GetApiAuthMeData = {
|
|
2688
2755
|
body?: never;
|
|
2689
2756
|
path?: never;
|
|
@@ -4206,6 +4273,19 @@ export type PostApiInvitationsAcceptResponses = {
|
|
|
4206
4273
|
export type PostApiInvitationsAcceptResponse =
|
|
4207
4274
|
PostApiInvitationsAcceptResponses[keyof PostApiInvitationsAcceptResponses];
|
|
4208
4275
|
|
|
4276
|
+
export type GetApiKycMobileReturnData = {
|
|
4277
|
+
body?: never;
|
|
4278
|
+
path?: never;
|
|
4279
|
+
query: {
|
|
4280
|
+
status: string;
|
|
4281
|
+
};
|
|
4282
|
+
url: '/api/kyc/mobile-return';
|
|
4283
|
+
};
|
|
4284
|
+
|
|
4285
|
+
export type GetApiKycMobileReturnResponses = {
|
|
4286
|
+
200: unknown;
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4209
4289
|
export type PostApiKycStartData = {
|
|
4210
4290
|
body: StartKycRequestDto;
|
|
4211
4291
|
path?: never;
|
|
@@ -4992,3 +5072,121 @@ export type PostApiSubscriptionsWebhookResponses = {
|
|
|
4992
5072
|
*/
|
|
4993
5073
|
200: unknown;
|
|
4994
5074
|
};
|
|
5075
|
+
|
|
5076
|
+
export type GetApiGlobalChatStatusData = {
|
|
5077
|
+
body?: never;
|
|
5078
|
+
path?: never;
|
|
5079
|
+
query?: never;
|
|
5080
|
+
url: '/api/global-chat/status';
|
|
5081
|
+
};
|
|
5082
|
+
|
|
5083
|
+
export type GetApiGlobalChatStatusResponses = {
|
|
5084
|
+
200: GlobalChatStatusDto;
|
|
5085
|
+
};
|
|
5086
|
+
|
|
5087
|
+
export type GetApiGlobalChatStatusResponse =
|
|
5088
|
+
GetApiGlobalChatStatusResponses[keyof GetApiGlobalChatStatusResponses];
|
|
5089
|
+
|
|
5090
|
+
export type PostApiGlobalChatJoinData = {
|
|
5091
|
+
body: JoinGlobalChatDto;
|
|
5092
|
+
path?: never;
|
|
5093
|
+
query?: never;
|
|
5094
|
+
url: '/api/global-chat/join';
|
|
5095
|
+
};
|
|
5096
|
+
|
|
5097
|
+
export type PostApiGlobalChatJoinResponses = {
|
|
5098
|
+
201: JoinGlobalChatResultDto;
|
|
5099
|
+
};
|
|
5100
|
+
|
|
5101
|
+
export type PostApiGlobalChatJoinResponse =
|
|
5102
|
+
PostApiGlobalChatJoinResponses[keyof PostApiGlobalChatJoinResponses];
|
|
5103
|
+
|
|
5104
|
+
export type PostApiGlobalChatLeaveData = {
|
|
5105
|
+
body?: never;
|
|
5106
|
+
path?: never;
|
|
5107
|
+
query?: never;
|
|
5108
|
+
url: '/api/global-chat/leave';
|
|
5109
|
+
};
|
|
5110
|
+
|
|
5111
|
+
export type PostApiGlobalChatLeaveResponses = {
|
|
5112
|
+
201: GlobalChatActionDto;
|
|
5113
|
+
};
|
|
5114
|
+
|
|
5115
|
+
export type PostApiGlobalChatLeaveResponse =
|
|
5116
|
+
PostApiGlobalChatLeaveResponses[keyof PostApiGlobalChatLeaveResponses];
|
|
5117
|
+
|
|
5118
|
+
export type GetApiGlobalChatMessagesData = {
|
|
5119
|
+
body?: never;
|
|
5120
|
+
path?: never;
|
|
5121
|
+
query?: {
|
|
5122
|
+
limit?: number;
|
|
5123
|
+
cursorId?: string;
|
|
5124
|
+
cursorCreatedAt?: string;
|
|
5125
|
+
};
|
|
5126
|
+
url: '/api/global-chat/messages';
|
|
5127
|
+
};
|
|
5128
|
+
|
|
5129
|
+
export type GetApiGlobalChatMessagesResponses = {
|
|
5130
|
+
200: GlobalChatMessagePageDto;
|
|
5131
|
+
};
|
|
5132
|
+
|
|
5133
|
+
export type GetApiGlobalChatMessagesResponse =
|
|
5134
|
+
GetApiGlobalChatMessagesResponses[keyof GetApiGlobalChatMessagesResponses];
|
|
5135
|
+
|
|
5136
|
+
export type PostApiGlobalChatMessagesData = {
|
|
5137
|
+
body: SendGlobalChatMessageDto;
|
|
5138
|
+
path?: never;
|
|
5139
|
+
query?: never;
|
|
5140
|
+
url: '/api/global-chat/messages';
|
|
5141
|
+
};
|
|
5142
|
+
|
|
5143
|
+
export type PostApiGlobalChatMessagesResponses = {
|
|
5144
|
+
201: GlobalChatMessageDto;
|
|
5145
|
+
};
|
|
5146
|
+
|
|
5147
|
+
export type PostApiGlobalChatMessagesResponse =
|
|
5148
|
+
PostApiGlobalChatMessagesResponses[keyof PostApiGlobalChatMessagesResponses];
|
|
5149
|
+
|
|
5150
|
+
export type PatchApiGlobalChatReadData = {
|
|
5151
|
+
body: MarkGlobalChatReadDto;
|
|
5152
|
+
path?: never;
|
|
5153
|
+
query?: never;
|
|
5154
|
+
url: '/api/global-chat/read';
|
|
5155
|
+
};
|
|
5156
|
+
|
|
5157
|
+
export type PatchApiGlobalChatReadResponses = {
|
|
5158
|
+
200: GlobalChatActionDto;
|
|
5159
|
+
};
|
|
5160
|
+
|
|
5161
|
+
export type PatchApiGlobalChatReadResponse =
|
|
5162
|
+
PatchApiGlobalChatReadResponses[keyof PatchApiGlobalChatReadResponses];
|
|
5163
|
+
|
|
5164
|
+
export type PostApiGlobalChatMessagesByMessageIdReportData = {
|
|
5165
|
+
body?: never;
|
|
5166
|
+
path: {
|
|
5167
|
+
messageId: string;
|
|
5168
|
+
};
|
|
5169
|
+
query?: never;
|
|
5170
|
+
url: '/api/global-chat/messages/{messageId}/report';
|
|
5171
|
+
};
|
|
5172
|
+
|
|
5173
|
+
export type PostApiGlobalChatMessagesByMessageIdReportResponses = {
|
|
5174
|
+
201: GlobalChatActionDto;
|
|
5175
|
+
};
|
|
5176
|
+
|
|
5177
|
+
export type PostApiGlobalChatMessagesByMessageIdReportResponse =
|
|
5178
|
+
PostApiGlobalChatMessagesByMessageIdReportResponses[keyof PostApiGlobalChatMessagesByMessageIdReportResponses];
|
|
5179
|
+
|
|
5180
|
+
export type PatchApiGlobalChatNotificationsData = {
|
|
5181
|
+
body: UpdateGlobalChatNotificationsDto;
|
|
5182
|
+
path?: never;
|
|
5183
|
+
query?: never;
|
|
5184
|
+
url: '/api/global-chat/notifications';
|
|
5185
|
+
};
|
|
5186
|
+
|
|
5187
|
+
export type PatchApiGlobalChatNotificationsResponses = {
|
|
5188
|
+
200: GlobalChatStatusDto;
|
|
5189
|
+
};
|
|
5190
|
+
|
|
5191
|
+
export type PatchApiGlobalChatNotificationsResponse =
|
|
5192
|
+
PatchApiGlobalChatNotificationsResponses[keyof PatchApiGlobalChatNotificationsResponses];
|