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