@taskeren/bungie-api-ts 5.10.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 (164) hide show
  1. package/.babelrc +4 -0
  2. package/.gitattributes +2 -0
  3. package/.github/workflows/pr-build.yml +50 -0
  4. package/.github/workflows/publish.yml +48 -0
  5. package/.github/workflows/update.yml +55 -0
  6. package/.gitmodules +3 -0
  7. package/.nvmrc +1 -0
  8. package/.prettierrc +10 -0
  9. package/.vscode/extensions.json +8 -0
  10. package/.vscode/settings.json +7 -0
  11. package/LICENSE.md +21 -0
  12. package/README.md +97 -0
  13. package/api-src/.github/workflows/close-inactive.yml +24 -0
  14. package/api-src/CHANGELOG.md +271 -0
  15. package/api-src/CONTRIBUTING.md +19 -0
  16. package/api-src/LICENSE +28 -0
  17. package/api-src/README.md +378 -0
  18. package/api-src/openapi-2.json +44518 -0
  19. package/api-src/openapi.json +46467 -0
  20. package/build.sh +30 -0
  21. package/bungie-api-LICENSE +29 -0
  22. package/generated-src/app/api.ts +50 -0
  23. package/generated-src/app/index.ts +17 -0
  24. package/generated-src/app/interfaces.ts +119 -0
  25. package/generated-src/common.ts +985 -0
  26. package/generated-src/communitycontent/api.ts +36 -0
  27. package/generated-src/communitycontent/index.ts +16 -0
  28. package/generated-src/content/api.ts +142 -0
  29. package/generated-src/content/index.ts +17 -0
  30. package/generated-src/content/interfaces.ts +225 -0
  31. package/generated-src/core/api.ts +57 -0
  32. package/generated-src/core/index.ts +17 -0
  33. package/generated-src/core/interfaces.ts +151 -0
  34. package/generated-src/destiny2/api.ts +821 -0
  35. package/generated-src/destiny2/index.ts +17 -0
  36. package/generated-src/destiny2/interfaces.ts +15714 -0
  37. package/generated-src/destiny2/manifest.ts +341 -0
  38. package/generated-src/fireteam/api.ts +151 -0
  39. package/generated-src/fireteam/index.ts +17 -0
  40. package/generated-src/fireteam/interfaces.ts +183 -0
  41. package/generated-src/forum/api.ts +197 -0
  42. package/generated-src/forum/index.ts +17 -0
  43. package/generated-src/forum/interfaces.ts +171 -0
  44. package/generated-src/groupv2/api.ts +515 -0
  45. package/generated-src/groupv2/index.ts +17 -0
  46. package/generated-src/groupv2/interfaces.ts +773 -0
  47. package/generated-src/http.ts +52 -0
  48. package/generated-src/index.ts +37 -0
  49. package/generated-src/package.json.notyet +99 -0
  50. package/generated-src/platform.ts +39 -0
  51. package/generated-src/social/api.ts +115 -0
  52. package/generated-src/social/index.ts +17 -0
  53. package/generated-src/social/interfaces.ts +89 -0
  54. package/generated-src/tokens/api.ts +126 -0
  55. package/generated-src/tokens/index.ts +17 -0
  56. package/generated-src/tokens/interfaces.ts +102 -0
  57. package/generated-src/trending/api.ts +62 -0
  58. package/generated-src/trending/index.ts +17 -0
  59. package/generated-src/trending/interfaces.ts +188 -0
  60. package/generated-src/user/api.ts +130 -0
  61. package/generated-src/user/index.ts +17 -0
  62. package/generated-src/user/interfaces.ts +338 -0
  63. package/generator/generate-api.ts +254 -0
  64. package/generator/generate-common.ts +123 -0
  65. package/generator/generate-index.ts +45 -0
  66. package/generator/generate-interfaces.ts +173 -0
  67. package/generator/generate-manifest.ts +217 -0
  68. package/generator/generate-package-json.ts +45 -0
  69. package/generator/generate.ts +54 -0
  70. package/generator/http.ts +52 -0
  71. package/generator/missing-props.ts +11 -0
  72. package/generator/type-index.ts +184 -0
  73. package/generator/util.ts +131 -0
  74. package/lib/README.md +97 -0
  75. package/lib/app/api.d.ts +36 -0
  76. package/lib/app/api.js +15 -0
  77. package/lib/app/index.d.ts +16 -0
  78. package/lib/app/index.js +5 -0
  79. package/lib/app/interfaces.d.ts +108 -0
  80. package/lib/app/interfaces.js +17 -0
  81. package/lib/bungie-api-LICENSE +29 -0
  82. package/lib/common.d.ts +979 -0
  83. package/lib/common.js +923 -0
  84. package/lib/communitycontent/api.d.ts +31 -0
  85. package/lib/communitycontent/api.js +7 -0
  86. package/lib/communitycontent/index.d.ts +15 -0
  87. package/lib/communitycontent/index.js +4 -0
  88. package/lib/content/api.d.ts +111 -0
  89. package/lib/content/api.js +75 -0
  90. package/lib/content/index.d.ts +16 -0
  91. package/lib/content/index.js +5 -0
  92. package/lib/content/interfaces.d.ts +214 -0
  93. package/lib/content/interfaces.js +17 -0
  94. package/lib/core/api.d.ts +45 -0
  95. package/lib/core/api.js +18 -0
  96. package/lib/core/index.d.ts +16 -0
  97. package/lib/core/index.js +5 -0
  98. package/lib/core/interfaces.d.ts +144 -0
  99. package/lib/core/interfaces.js +10 -0
  100. package/lib/destiny2/api.d.ts +765 -0
  101. package/lib/destiny2/api.js +295 -0
  102. package/lib/destiny2/index.d.ts +16 -0
  103. package/lib/destiny2/index.js +5 -0
  104. package/lib/destiny2/interfaces.d.ts +15340 -0
  105. package/lib/destiny2/interfaces.js +826 -0
  106. package/lib/destiny2/manifest.d.ts +465 -0
  107. package/lib/destiny2/manifest.js +56 -0
  108. package/lib/fireteam/api.d.ts +131 -0
  109. package/lib/fireteam/api.js +50 -0
  110. package/lib/fireteam/index.d.ts +16 -0
  111. package/lib/fireteam/index.js +5 -0
  112. package/lib/fireteam/interfaces.d.ts +166 -0
  113. package/lib/fireteam/interfaces.js +33 -0
  114. package/lib/forum/api.d.ts +165 -0
  115. package/lib/forum/api.js +79 -0
  116. package/lib/forum/index.d.ts +16 -0
  117. package/lib/forum/index.js +5 -0
  118. package/lib/forum/interfaces.d.ts +147 -0
  119. package/lib/forum/interfaces.js +61 -0
  120. package/lib/groupv2/api.d.ts +484 -0
  121. package/lib/groupv2/api.js +154 -0
  122. package/lib/groupv2/index.d.ts +16 -0
  123. package/lib/groupv2/index.js +5 -0
  124. package/lib/groupv2/interfaces.d.ts +718 -0
  125. package/lib/groupv2/interfaces.js +100 -0
  126. package/lib/http.d.ts +18 -0
  127. package/lib/http.js +20 -0
  128. package/lib/index.d.ts +35 -0
  129. package/lib/index.js +24 -0
  130. package/lib/package.json +99 -0
  131. package/lib/platform.d.ts +36 -0
  132. package/lib/platform.js +9 -0
  133. package/lib/social/api.d.ts +101 -0
  134. package/lib/social/api.js +26 -0
  135. package/lib/social/index.d.ts +16 -0
  136. package/lib/social/index.js +5 -0
  137. package/lib/social/interfaces.d.ts +75 -0
  138. package/lib/social/interfaces.js +22 -0
  139. package/lib/tokens/api.d.ts +120 -0
  140. package/lib/tokens/api.js +38 -0
  141. package/lib/tokens/index.d.ts +16 -0
  142. package/lib/tokens/index.js +5 -0
  143. package/lib/tokens/interfaces.d.ts +88 -0
  144. package/lib/tokens/interfaces.js +5 -0
  145. package/lib/trending/api.d.ts +53 -0
  146. package/lib/trending/api.js +11 -0
  147. package/lib/trending/index.d.ts +16 -0
  148. package/lib/trending/index.js +5 -0
  149. package/lib/trending/interfaces.d.ts +171 -0
  150. package/lib/trending/interfaces.js +14 -0
  151. package/lib/user/api.d.ts +117 -0
  152. package/lib/user/api.js +35 -0
  153. package/lib/user/index.d.ts +16 -0
  154. package/lib/user/index.js +5 -0
  155. package/lib/user/interfaces.d.ts +320 -0
  156. package/lib/user/interfaces.js +28 -0
  157. package/package.json +60 -0
  158. package/test-consumer.ts +5 -0
  159. package/tests/__snapshots__/config-builders.test.ts.snap +343 -0
  160. package/tests/config-builders.test.ts +145 -0
  161. package/tests/manifest-fetcher.test.ts +43 -0
  162. package/tests/test-manifest.js +69 -0
  163. package/tsconfig-package.json +14 -0
  164. package/tsconfig.json +17 -0
@@ -0,0 +1,515 @@
1
+ /**
2
+ * Bungie.Net API
3
+ * These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
4
+ *
5
+ * OpenAPI spec version: 2.21.9
6
+ * Contact: support@bungie.com
7
+ *
8
+ * NOTE: This class is auto generated by the bungie-api-ts code generator program.
9
+ * https://github.com/DestinyItemManager/bungie-api-ts
10
+ * Do not edit these files manually.
11
+ */
12
+
13
+ import { HttpClient, get, post } from '../http.js';
14
+
15
+ import {
16
+ BungieMembershipType,
17
+ ServerResponse
18
+ } from '../common.js';
19
+ import {
20
+ ClanBanner,
21
+ EntityActionResult,
22
+ GetGroupsForMemberResponse,
23
+ GroupApplicationListRequest,
24
+ GroupApplicationRequest,
25
+ GroupApplicationResponse,
26
+ GroupBanRequest,
27
+ GroupDateRange,
28
+ GroupEditAction,
29
+ GroupMemberLeaveResult,
30
+ GroupMembershipSearchResponse,
31
+ GroupNameSearchRequest,
32
+ GroupOptionalConversation,
33
+ GroupOptionalConversationAddRequest,
34
+ GroupOptionalConversationEditRequest,
35
+ GroupOptionsEditAction,
36
+ GroupPotentialMemberStatus,
37
+ GroupPotentialMembershipSearchResponse,
38
+ GroupQuery,
39
+ GroupResponse,
40
+ GroupSearchResponse,
41
+ GroupTheme,
42
+ GroupType,
43
+ GroupV2Card,
44
+ GroupsForMemberFilter,
45
+ RuntimeGroupMemberType,
46
+ SearchResultOfGroupBan,
47
+ SearchResultOfGroupEditHistory,
48
+ SearchResultOfGroupMember,
49
+ SearchResultOfGroupMemberApplication
50
+ } from './interfaces.js';
51
+
52
+ const API_BASE = "https://www.bungie.net/Platform/GroupV2/";
53
+
54
+ /** Returns a list of all available group avatars for the signed-in user. */
55
+ export function getAvailableAvatars(http: HttpClient): Promise<ServerResponse<{ [key: number]: string }>> {
56
+ return get(http, `${API_BASE}GetAvailableAvatars/`);
57
+ }
58
+
59
+ /** Returns a list of all available group themes. */
60
+ export function getAvailableThemes(http: HttpClient): Promise<ServerResponse<GroupTheme[]>> {
61
+ return get(http, `${API_BASE}GetAvailableThemes/`);
62
+ }
63
+
64
+ export interface GetUserClanInviteSettingParams {
65
+ /** The Destiny membership type of the account we wish to access settings. */
66
+ mType: BungieMembershipType;
67
+ }
68
+
69
+ /**
70
+ * Gets the state of the user's clan invite preferences for a particular membership
71
+ * type - true if they wish to be invited to clans, false otherwise.
72
+ */
73
+ export function getUserClanInviteSetting(http: HttpClient, params: GetUserClanInviteSettingParams): Promise<ServerResponse<boolean>> {
74
+ return get(http, `${API_BASE}GetUserClanInviteSetting/${params.mType}/`);
75
+ }
76
+
77
+ export interface GetRecommendedGroupsParams {
78
+ /** Requested range in which to pull recommended groups */
79
+ createDateRange: GroupDateRange;
80
+ /** Type of groups requested */
81
+ groupType: GroupType;
82
+ }
83
+
84
+ /**
85
+ * Gets groups recommended for you based on the groups to whom those you follow
86
+ * belong.
87
+ */
88
+ export function getRecommendedGroups(http: HttpClient, params: GetRecommendedGroupsParams): Promise<ServerResponse<GroupV2Card[]>> {
89
+ return post(http, `${API_BASE}Recommended/${params.groupType}/${params.createDateRange}/`);
90
+ }
91
+
92
+ /** Search for Groups. */
93
+ export function groupSearch(http: HttpClient, body: GroupQuery): Promise<ServerResponse<GroupSearchResponse>> {
94
+ return post(http, `${API_BASE}Search/`, body);
95
+ }
96
+
97
+ export interface GetGroupParams {
98
+ /** Requested group's id. */
99
+ groupId: string;
100
+ }
101
+
102
+ /** Get information about a specific group of the given ID. */
103
+ export function getGroup(http: HttpClient, params: GetGroupParams): Promise<ServerResponse<GroupResponse>> {
104
+ return get(http, `${API_BASE}${params.groupId}/`);
105
+ }
106
+
107
+ export interface GetGroupByNameParams {
108
+ /** Exact name of the group to find. */
109
+ groupName: string;
110
+ /** Type of group to find. */
111
+ groupType: GroupType;
112
+ }
113
+
114
+ /** Get information about a specific group with the given name and type. */
115
+ export function getGroupByName(http: HttpClient, params: GetGroupByNameParams): Promise<ServerResponse<GroupResponse>> {
116
+ return get(http, `${API_BASE}Name/${params.groupName}/${params.groupType}/`);
117
+ }
118
+
119
+ /**
120
+ * Get information about a specific group with the given name and type. The POST
121
+ * version.
122
+ */
123
+ export function getGroupByNameV2(http: HttpClient, body: GroupNameSearchRequest): Promise<ServerResponse<GroupResponse>> {
124
+ return post(http, `${API_BASE}NameV2/`, body);
125
+ }
126
+
127
+ export interface GetGroupOptionalConversationsParams {
128
+ /** Requested group's id. */
129
+ groupId: string;
130
+ }
131
+
132
+ /** Gets a list of available optional conversation channels and their settings. */
133
+ export function getGroupOptionalConversations(http: HttpClient, params: GetGroupOptionalConversationsParams): Promise<ServerResponse<GroupOptionalConversation[]>> {
134
+ return get(http, `${API_BASE}${params.groupId}/OptionalConversations/`);
135
+ }
136
+
137
+ export interface EditGroupParams {
138
+ /** Group ID of the group to edit. */
139
+ groupId: string;
140
+ }
141
+
142
+ /**
143
+ * Edit an existing group. You must have suitable permissions in the group to
144
+ * perform this operation. This latest revision will only edit the fields you pass
145
+ * in - pass null for properties you want to leave unaltered.
146
+ */
147
+ export function editGroup(http: HttpClient, params: EditGroupParams, body: GroupEditAction): Promise<ServerResponse<number>> {
148
+ return post(http, `${API_BASE}${params.groupId}/Edit/`, body);
149
+ }
150
+
151
+ export interface EditClanBannerParams {
152
+ /** Group ID of the group to edit. */
153
+ groupId: string;
154
+ }
155
+
156
+ /**
157
+ * Edit an existing group's clan banner. You must have suitable permissions in the
158
+ * group to perform this operation. All fields are required.
159
+ */
160
+ export function editClanBanner(http: HttpClient, params: EditClanBannerParams, body: ClanBanner): Promise<ServerResponse<number>> {
161
+ return post(http, `${API_BASE}${params.groupId}/EditClanBanner/`, body);
162
+ }
163
+
164
+ export interface EditFounderOptionsParams {
165
+ /** Group ID of the group to edit. */
166
+ groupId: string;
167
+ }
168
+
169
+ /**
170
+ * Edit group options only available to a founder. You must have suitable
171
+ * permissions in the group to perform this operation.
172
+ */
173
+ export function editFounderOptions(http: HttpClient, params: EditFounderOptionsParams, body: GroupOptionsEditAction): Promise<ServerResponse<number>> {
174
+ return post(http, `${API_BASE}${params.groupId}/EditFounderOptions/`, body);
175
+ }
176
+
177
+ export interface AddOptionalConversationParams {
178
+ /** Group ID of the group to edit. */
179
+ groupId: string;
180
+ }
181
+
182
+ /**
183
+ * Add a new optional conversation/chat channel. Requires admin permissions to the
184
+ * group.
185
+ */
186
+ export function addOptionalConversation(http: HttpClient, params: AddOptionalConversationParams, body: GroupOptionalConversationAddRequest): Promise<ServerResponse<string>> {
187
+ return post(http, `${API_BASE}${params.groupId}/OptionalConversations/Add/`, body);
188
+ }
189
+
190
+ export interface EditOptionalConversationParams {
191
+ /** Conversation Id of the channel being edited. */
192
+ conversationId: string;
193
+ /** Group ID of the group to edit. */
194
+ groupId: string;
195
+ }
196
+
197
+ /**
198
+ * Edit the settings of an optional conversation/chat channel. Requires admin
199
+ * permissions to the group.
200
+ */
201
+ export function editOptionalConversation(http: HttpClient, params: EditOptionalConversationParams, body: GroupOptionalConversationEditRequest): Promise<ServerResponse<string>> {
202
+ return post(http, `${API_BASE}${params.groupId}/OptionalConversations/Edit/${params.conversationId}/`, body);
203
+ }
204
+
205
+ export interface GetMembersOfGroupParams {
206
+ /** Page number (starting with 1). Each page has a fixed size of 50 items per page. */
207
+ currentpage: number;
208
+ /** The ID of the group. */
209
+ groupId: string;
210
+ /** Filter out other member types. Use None for all members. */
211
+ memberType?: RuntimeGroupMemberType;
212
+ /**
213
+ * The name fragment upon which a search should be executed for members with
214
+ * matching display or unique names.
215
+ */
216
+ nameSearch?: string;
217
+ }
218
+
219
+ /** Get the list of members in a given group. */
220
+ export function getMembersOfGroup(http: HttpClient, params: GetMembersOfGroupParams): Promise<ServerResponse<SearchResultOfGroupMember>> {
221
+ const strParams: Record<string, string> = {};
222
+ if (params.memberType !== undefined) { strParams.memberType = params.memberType.toString(); }
223
+ if (params.nameSearch !== undefined) { strParams.nameSearch = params.nameSearch; }
224
+ return get(http, `${API_BASE}${params.groupId}/Members/`, strParams);
225
+ }
226
+
227
+ export interface GetAdminsAndFounderOfGroupParams {
228
+ /** Page number (starting with 1). Each page has a fixed size of 50 items per page. */
229
+ currentpage: number;
230
+ /** The ID of the group. */
231
+ groupId: string;
232
+ }
233
+
234
+ /** Get the list of members in a given group who are of admin level or higher. */
235
+ export function getAdminsAndFounderOfGroup(http: HttpClient, params: GetAdminsAndFounderOfGroupParams): Promise<ServerResponse<SearchResultOfGroupMember>> {
236
+ return get(http, `${API_BASE}${params.groupId}/AdminsAndFounder/`);
237
+ }
238
+
239
+ export interface EditGroupMembershipParams {
240
+ /** ID of the group to which the member belongs. */
241
+ groupId: string;
242
+ /** Membership ID to modify. */
243
+ membershipId: string;
244
+ /** Membership type of the provide membership ID. */
245
+ membershipType: BungieMembershipType;
246
+ /** New membertype for the specified member. */
247
+ memberType: RuntimeGroupMemberType;
248
+ }
249
+
250
+ /**
251
+ * Edit the membership type of a given member. You must have suitable permissions
252
+ * in the group to perform this operation.
253
+ */
254
+ export function editGroupMembership(http: HttpClient, params: EditGroupMembershipParams): Promise<ServerResponse<number>> {
255
+ return post(http, `${API_BASE}${params.groupId}/Members/${params.membershipType}/${params.membershipId}/SetMembershipType/${params.memberType}/`);
256
+ }
257
+
258
+ export interface KickMemberParams {
259
+ /** Group ID to kick the user from. */
260
+ groupId: string;
261
+ /** Membership ID to kick. */
262
+ membershipId: string;
263
+ /** Membership type of the provided membership ID. */
264
+ membershipType: BungieMembershipType;
265
+ }
266
+
267
+ /**
268
+ * Kick a member from the given group, forcing them to reapply if they wish to re-
269
+ * join the group. You must have suitable permissions in the group to perform this
270
+ * operation.
271
+ */
272
+ export function kickMember(http: HttpClient, params: KickMemberParams): Promise<ServerResponse<GroupMemberLeaveResult>> {
273
+ return post(http, `${API_BASE}${params.groupId}/Members/${params.membershipType}/${params.membershipId}/Kick/`);
274
+ }
275
+
276
+ export interface BanMemberParams {
277
+ /** Group ID that has the member to ban. */
278
+ groupId: string;
279
+ /** Membership ID of the member to ban from the group. */
280
+ membershipId: string;
281
+ /** Membership type of the provided membership ID. */
282
+ membershipType: BungieMembershipType;
283
+ }
284
+
285
+ /**
286
+ * Bans the requested member from the requested group for the specified period of
287
+ * time.
288
+ */
289
+ export function banMember(http: HttpClient, params: BanMemberParams, body: GroupBanRequest): Promise<ServerResponse<number>> {
290
+ return post(http, `${API_BASE}${params.groupId}/Members/${params.membershipType}/${params.membershipId}/Ban/`, body);
291
+ }
292
+
293
+ export interface UnbanMemberParams {
294
+ groupId: string;
295
+ /** Membership ID of the member to unban from the group */
296
+ membershipId: string;
297
+ /** Membership type of the provided membership ID. */
298
+ membershipType: BungieMembershipType;
299
+ }
300
+
301
+ /** Unbans the requested member, allowing them to re-apply for membership. */
302
+ export function unbanMember(http: HttpClient, params: UnbanMemberParams): Promise<ServerResponse<number>> {
303
+ return post(http, `${API_BASE}${params.groupId}/Members/${params.membershipType}/${params.membershipId}/Unban/`);
304
+ }
305
+
306
+ export interface GetBannedMembersOfGroupParams {
307
+ /** Page number (starting with 1). Each page has a fixed size of 50 entries. */
308
+ currentpage: number;
309
+ /** Group ID whose banned members you are fetching */
310
+ groupId: string;
311
+ }
312
+
313
+ /**
314
+ * Get the list of banned members in a given group. Only accessible to group Admins
315
+ * and above. Not applicable to all groups. Check group features.
316
+ */
317
+ export function getBannedMembersOfGroup(http: HttpClient, params: GetBannedMembersOfGroupParams): Promise<ServerResponse<SearchResultOfGroupBan>> {
318
+ return get(http, `${API_BASE}${params.groupId}/Banned/`);
319
+ }
320
+
321
+ export interface GetGroupEditHistoryParams {
322
+ /** Page number (starting with 1). Each page has a fixed size of 50 entries. */
323
+ currentpage: number;
324
+ /** Group ID whose edit history you are fetching */
325
+ groupId: string;
326
+ }
327
+
328
+ /**
329
+ * Get the list of edits made to a given group. Only accessible to group Admins and
330
+ * above.
331
+ */
332
+ export function getGroupEditHistory(http: HttpClient, params: GetGroupEditHistoryParams): Promise<ServerResponse<SearchResultOfGroupEditHistory>> {
333
+ return get(http, `${API_BASE}${params.groupId}/EditHistory/`);
334
+ }
335
+
336
+ export interface AbdicateFoundershipParams {
337
+ /** The new founder for this group. Must already be a group admin. */
338
+ founderIdNew: string;
339
+ /** The target group id. */
340
+ groupId: string;
341
+ /** Membership type of the provided founderIdNew. */
342
+ membershipType: BungieMembershipType;
343
+ }
344
+
345
+ /**
346
+ * An administrative method to allow the founder of a group or clan to give up
347
+ * their position to another admin permanently.
348
+ */
349
+ export function abdicateFoundership(http: HttpClient, params: AbdicateFoundershipParams): Promise<ServerResponse<boolean>> {
350
+ return post(http, `${API_BASE}${params.groupId}/Admin/AbdicateFoundership/${params.membershipType}/${params.founderIdNew}/`);
351
+ }
352
+
353
+ export interface GetPendingMembershipsParams {
354
+ /** Page number (starting with 1). Each page has a fixed size of 50 items per page. */
355
+ currentpage: number;
356
+ /** ID of the group. */
357
+ groupId: string;
358
+ }
359
+
360
+ /**
361
+ * Get the list of users who are awaiting a decision on their application to join a
362
+ * given group. Modified to include application info.
363
+ */
364
+ export function getPendingMemberships(http: HttpClient, params: GetPendingMembershipsParams): Promise<ServerResponse<SearchResultOfGroupMemberApplication>> {
365
+ return get(http, `${API_BASE}${params.groupId}/Members/Pending/`);
366
+ }
367
+
368
+ export interface GetInvitedIndividualsParams {
369
+ /** Page number (starting with 1). Each page has a fixed size of 50 items per page. */
370
+ currentpage: number;
371
+ /** ID of the group. */
372
+ groupId: string;
373
+ }
374
+
375
+ /** Get the list of users who have been invited into the group. */
376
+ export function getInvitedIndividuals(http: HttpClient, params: GetInvitedIndividualsParams): Promise<ServerResponse<SearchResultOfGroupMemberApplication>> {
377
+ return get(http, `${API_BASE}${params.groupId}/Members/InvitedIndividuals/`);
378
+ }
379
+
380
+ export interface ApproveAllPendingParams {
381
+ /** ID of the group. */
382
+ groupId: string;
383
+ }
384
+
385
+ /** Approve all of the pending users for the given group. */
386
+ export function approveAllPending(http: HttpClient, params: ApproveAllPendingParams, body: GroupApplicationRequest): Promise<ServerResponse<EntityActionResult[]>> {
387
+ return post(http, `${API_BASE}${params.groupId}/Members/ApproveAll/`, body);
388
+ }
389
+
390
+ export interface DenyAllPendingParams {
391
+ /** ID of the group. */
392
+ groupId: string;
393
+ }
394
+
395
+ /** Deny all of the pending users for the given group. */
396
+ export function denyAllPending(http: HttpClient, params: DenyAllPendingParams, body: GroupApplicationRequest): Promise<ServerResponse<EntityActionResult[]>> {
397
+ return post(http, `${API_BASE}${params.groupId}/Members/DenyAll/`, body);
398
+ }
399
+
400
+ export interface ApprovePendingForListParams {
401
+ /** ID of the group. */
402
+ groupId: string;
403
+ }
404
+
405
+ /** Approve all of the pending users for the given group. */
406
+ export function approvePendingForList(http: HttpClient, params: ApprovePendingForListParams, body: GroupApplicationListRequest): Promise<ServerResponse<EntityActionResult[]>> {
407
+ return post(http, `${API_BASE}${params.groupId}/Members/ApproveList/`, body);
408
+ }
409
+
410
+ export interface ApprovePendingParams {
411
+ /** ID of the group. */
412
+ groupId: string;
413
+ /** The membership id being approved. */
414
+ membershipId: string;
415
+ /** Membership type of the supplied membership ID. */
416
+ membershipType: BungieMembershipType;
417
+ }
418
+
419
+ /**
420
+ * Approve the given membershipId to join the group/clan as long as they have
421
+ * applied.
422
+ */
423
+ export function approvePending(http: HttpClient, params: ApprovePendingParams, body: GroupApplicationRequest): Promise<ServerResponse<boolean>> {
424
+ return post(http, `${API_BASE}${params.groupId}/Members/Approve/${params.membershipType}/${params.membershipId}/`, body);
425
+ }
426
+
427
+ export interface DenyPendingForListParams {
428
+ /** ID of the group. */
429
+ groupId: string;
430
+ }
431
+
432
+ /** Deny all of the pending users for the given group that match the passed-in . */
433
+ export function denyPendingForList(http: HttpClient, params: DenyPendingForListParams, body: GroupApplicationListRequest): Promise<ServerResponse<EntityActionResult[]>> {
434
+ return post(http, `${API_BASE}${params.groupId}/Members/DenyList/`, body);
435
+ }
436
+
437
+ export interface GetGroupsForMemberParams {
438
+ /** Filter apply to list of joined groups. */
439
+ filter: GroupsForMemberFilter;
440
+ /** Type of group the supplied member founded. */
441
+ groupType: GroupType;
442
+ /** Membership ID to for which to find founded groups. */
443
+ membershipId: string;
444
+ /** Membership type of the supplied membership ID. */
445
+ membershipType: BungieMembershipType;
446
+ }
447
+
448
+ /** Get information about the groups that a given member has joined. */
449
+ export function getGroupsForMember(http: HttpClient, params: GetGroupsForMemberParams): Promise<ServerResponse<GetGroupsForMemberResponse>> {
450
+ return get(http, `${API_BASE}User/${params.membershipType}/${params.membershipId}/${params.filter}/${params.groupType}/`);
451
+ }
452
+
453
+ export interface RecoverGroupForFounderParams {
454
+ /** Type of group the supplied member founded. */
455
+ groupType: GroupType;
456
+ /** Membership ID to for which to find founded groups. */
457
+ membershipId: string;
458
+ /** Membership type of the supplied membership ID. */
459
+ membershipType: BungieMembershipType;
460
+ }
461
+
462
+ /**
463
+ * Allows a founder to manually recover a group they can see in game but not on
464
+ * bungie.net
465
+ */
466
+ export function recoverGroupForFounder(http: HttpClient, params: RecoverGroupForFounderParams): Promise<ServerResponse<GroupMembershipSearchResponse>> {
467
+ return get(http, `${API_BASE}Recover/${params.membershipType}/${params.membershipId}/${params.groupType}/`);
468
+ }
469
+
470
+ export interface GetPotentialGroupsForMemberParams {
471
+ /** Filter apply to list of potential joined groups. */
472
+ filter: GroupPotentialMemberStatus;
473
+ /** Type of group the supplied member applied. */
474
+ groupType: GroupType;
475
+ /** Membership ID to for which to find applied groups. */
476
+ membershipId: string;
477
+ /** Membership type of the supplied membership ID. */
478
+ membershipType: BungieMembershipType;
479
+ }
480
+
481
+ /**
482
+ * Get information about the groups that a given member has applied to or been
483
+ * invited to.
484
+ */
485
+ export function getPotentialGroupsForMember(http: HttpClient, params: GetPotentialGroupsForMemberParams): Promise<ServerResponse<GroupPotentialMembershipSearchResponse>> {
486
+ return get(http, `${API_BASE}User/Potential/${params.membershipType}/${params.membershipId}/${params.filter}/${params.groupType}/`);
487
+ }
488
+
489
+ export interface IndividualGroupInviteParams {
490
+ /** ID of the group you would like to join. */
491
+ groupId: string;
492
+ /** Membership id of the account being invited. */
493
+ membershipId: string;
494
+ /** MembershipType of the account being invited. */
495
+ membershipType: BungieMembershipType;
496
+ }
497
+
498
+ /** Invite a user to join this group. */
499
+ export function individualGroupInvite(http: HttpClient, params: IndividualGroupInviteParams, body: GroupApplicationRequest): Promise<ServerResponse<GroupApplicationResponse>> {
500
+ return post(http, `${API_BASE}${params.groupId}/Members/IndividualInvite/${params.membershipType}/${params.membershipId}/`, body);
501
+ }
502
+
503
+ export interface IndividualGroupInviteCancelParams {
504
+ /** ID of the group you would like to join. */
505
+ groupId: string;
506
+ /** Membership id of the account being cancelled. */
507
+ membershipId: string;
508
+ /** MembershipType of the account being cancelled. */
509
+ membershipType: BungieMembershipType;
510
+ }
511
+
512
+ /** Cancels a pending invitation to join a group. */
513
+ export function individualGroupInviteCancel(http: HttpClient, params: IndividualGroupInviteCancelParams): Promise<ServerResponse<GroupApplicationResponse>> {
514
+ return post(http, `${API_BASE}${params.groupId}/Members/IndividualInviteCancel/${params.membershipType}/${params.membershipId}/`);
515
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Bungie.Net API
3
+ * These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
4
+ *
5
+ * OpenAPI spec version: 2.21.9
6
+ * Contact: support@bungie.com
7
+ *
8
+ * NOTE: This class is auto generated by the bungie-api-ts code generator program.
9
+ * https://github.com/DestinyItemManager/bungie-api-ts
10
+ * Do not edit these files manually.
11
+ */
12
+
13
+ export * from '../common.js';
14
+ export * from '../platform.js';
15
+ export type {HttpClientConfig, HttpClient} from '../http.js';
16
+ export * from './api.js';
17
+ export * from './interfaces.js';