@smartbear/mcp 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +19 -2
  2. package/dist/api-hub/client/api.js +198 -23
  3. package/dist/api-hub/client/registry-types.js +22 -0
  4. package/dist/api-hub/client/tools.js +19 -1
  5. package/dist/api-hub/client.js +9 -0
  6. package/dist/bugsnag/client/api/CurrentUser.js +13 -50
  7. package/dist/bugsnag/client/api/Error.js +30 -155
  8. package/dist/bugsnag/client/api/Project.js +56 -124
  9. package/dist/bugsnag/client/api/api.js +3743 -0
  10. package/dist/bugsnag/client/api/base.js +107 -32
  11. package/dist/bugsnag/client/api/configuration.js +26 -0
  12. package/dist/bugsnag/client/api/index.js +2 -0
  13. package/dist/bugsnag/client/filters.js +28 -0
  14. package/dist/bugsnag/client.js +157 -325
  15. package/dist/common/server.js +29 -4
  16. package/dist/common/types.js +6 -1
  17. package/dist/index.js +8 -1
  18. package/dist/pactflow/client/prompt-utils.js +2 -1
  19. package/dist/pactflow/client/tools.js +9 -9
  20. package/dist/pactflow/client/utils.js +5 -4
  21. package/dist/pactflow/client.js +16 -14
  22. package/dist/qmetry/client/api/client-api.js +21 -16
  23. package/dist/qmetry/client/api/error-handler.js +329 -0
  24. package/dist/qmetry/client/auto-resolve.js +74 -0
  25. package/dist/qmetry/client/handlers.js +19 -2
  26. package/dist/qmetry/client/issues.js +26 -0
  27. package/dist/qmetry/client/project.js +56 -0
  28. package/dist/qmetry/client/requirement.js +76 -0
  29. package/dist/qmetry/client/testcase.js +46 -8
  30. package/dist/qmetry/client/testsuite.js +117 -0
  31. package/dist/qmetry/client/tools.js +1455 -4
  32. package/dist/qmetry/client/utils.js +16 -0
  33. package/dist/qmetry/client.js +19 -16
  34. package/dist/qmetry/config/constants.js +14 -0
  35. package/dist/qmetry/config/rest-endpoints.js +20 -0
  36. package/dist/qmetry/types/common.js +313 -8
  37. package/dist/qmetry/types/issues.js +6 -0
  38. package/dist/qmetry/types/project.js +10 -0
  39. package/dist/qmetry/types/requirements.js +19 -0
  40. package/dist/qmetry/types/testcase.js +14 -0
  41. package/dist/qmetry/types/testsuite.js +26 -0
  42. package/dist/reflect/client.js +7 -6
  43. package/dist/zephyr/client.js +16 -0
  44. package/dist/zephyr/common/api-client.js +27 -0
  45. package/dist/zephyr/common/auth-service.js +15 -0
  46. package/dist/zephyr/common/types.js +35 -0
  47. package/dist/zephyr/tool/project/get-projects.js +54 -0
  48. package/dist/zephyr/tool/zephyr-tool.js +1 -0
  49. package/package.json +3 -2
  50. package/dist/bugsnag/client/api/filters.js +0 -167
  51. package/dist/bugsnag/client/configuration.js +0 -10
  52. package/dist/bugsnag/client/index.js +0 -2
@@ -0,0 +1,3743 @@
1
+ /** biome-ignore-all lint/complexity/useLiteralKeys: auto-generated code */
2
+ /** biome-ignore-all lint/correctness/noUnusedVariables: auto-generated code */
3
+ /** biome-ignore-all lint/complexity/useOptionalChain: auto-generated code */
4
+ /** biome-ignore-all lint/style/useLiteralEnumMembers: auto-generated code */
5
+ /** biome-ignore-all lint/suspicious/noEmptyInterface: auto-generated code */
6
+ // tslint:disable
7
+ /**
8
+ * BugSnag - Data Access API
9
+ *
10
+ * The following code is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ *
13
+ * To update, download the latest Node client from API Hub and replace the code below, running `npx tsr --write` (https://github.com/line/tsr) to strip unused exports.
14
+ */
15
+ import * as url from "node:url";
16
+ /**
17
+ *
18
+ * @export
19
+ * @class RequiredError
20
+ * @extends {Error}
21
+ */
22
+ class RequiredError extends Error {
23
+ field;
24
+ name = "RequiredError";
25
+ constructor(field, msg) {
26
+ super(msg);
27
+ this.field = field;
28
+ }
29
+ }
30
+ /**
31
+ * @export
32
+ * @namespace Breadcrumb
33
+ */
34
+ var Breadcrumb;
35
+ (function (Breadcrumb) {
36
+ /**
37
+ * @export
38
+ * @enum {string}
39
+ */
40
+ let TypeEnum;
41
+ (function (TypeEnum) {
42
+ TypeEnum[TypeEnum["Navigation"] = "navigation"] = "Navigation";
43
+ TypeEnum[TypeEnum["Request"] = "request"] = "Request";
44
+ TypeEnum[TypeEnum["Process"] = "process"] = "Process";
45
+ TypeEnum[TypeEnum["Log"] = "log"] = "Log";
46
+ TypeEnum[TypeEnum["User"] = "user"] = "User";
47
+ TypeEnum[TypeEnum["State"] = "state"] = "State";
48
+ TypeEnum[TypeEnum["Error"] = "error"] = "Error";
49
+ TypeEnum[TypeEnum["Manual"] = "manual"] = "Manual";
50
+ })(TypeEnum = Breadcrumb.TypeEnum || (Breadcrumb.TypeEnum = {}));
51
+ })(Breadcrumb || (Breadcrumb = {}));
52
+ /**
53
+ * @export
54
+ * @namespace ErrorApiView
55
+ */
56
+ var ErrorApiView;
57
+ (function (ErrorApiView) {
58
+ /**
59
+ * @export
60
+ * @enum {string}
61
+ */
62
+ let GroupingReasonEnum;
63
+ (function (GroupingReasonEnum) {
64
+ GroupingReasonEnum[GroupingReasonEnum["FrameCode"] = "frame-code"] = "FrameCode";
65
+ GroupingReasonEnum[GroupingReasonEnum["FrameInner"] = "frame-inner"] = "FrameInner";
66
+ GroupingReasonEnum[GroupingReasonEnum["ContextInner"] = "context-inner"] = "ContextInner";
67
+ GroupingReasonEnum[GroupingReasonEnum["ErrorClassInner"] = "error_class-inner"] = "ErrorClassInner";
68
+ GroupingReasonEnum[GroupingReasonEnum["UserDefined"] = "user_defined"] = "UserDefined";
69
+ GroupingReasonEnum[GroupingReasonEnum["JsBlob"] = "js-blob"] = "JsBlob";
70
+ GroupingReasonEnum[GroupingReasonEnum["JsTag"] = "js-tag"] = "JsTag";
71
+ GroupingReasonEnum[GroupingReasonEnum["JsHtml"] = "js-html"] = "JsHtml";
72
+ GroupingReasonEnum[GroupingReasonEnum["JsEval"] = "js-eval"] = "JsEval";
73
+ GroupingReasonEnum[GroupingReasonEnum["JsStructure"] = "js-structure"] = "JsStructure";
74
+ GroupingReasonEnum[GroupingReasonEnum["JsCodebase"] = "js-codebase"] = "JsCodebase";
75
+ GroupingReasonEnum[GroupingReasonEnum["JsLocation"] = "js-location"] = "JsLocation";
76
+ })(GroupingReasonEnum = ErrorApiView.GroupingReasonEnum || (ErrorApiView.GroupingReasonEnum = {}));
77
+ })(ErrorApiView || (ErrorApiView = {}));
78
+ /**
79
+ * @export
80
+ * @namespace ErrorAssignmentRulePatternApiView
81
+ */
82
+ var ErrorAssignmentRulePatternApiView;
83
+ (function (ErrorAssignmentRulePatternApiView) {
84
+ /**
85
+ * @export
86
+ * @enum {string}
87
+ */
88
+ let TypeEnum;
89
+ (function (TypeEnum) {
90
+ TypeEnum[TypeEnum["PayloadPath"] = "payload_path"] = "PayloadPath";
91
+ TypeEnum[TypeEnum["FilePath"] = "file_path"] = "FilePath";
92
+ TypeEnum[TypeEnum["CodeMethod"] = "code_method"] = "CodeMethod";
93
+ })(TypeEnum = ErrorAssignmentRulePatternApiView.TypeEnum || (ErrorAssignmentRulePatternApiView.TypeEnum = {}));
94
+ /**
95
+ * @export
96
+ * @enum {string}
97
+ */
98
+ let MatchFrameEnum;
99
+ (function (MatchFrameEnum) {
100
+ MatchFrameEnum[MatchFrameEnum["Any"] = "any"] = "Any";
101
+ MatchFrameEnum[MatchFrameEnum["First"] = "first"] = "First";
102
+ })(MatchFrameEnum = ErrorAssignmentRulePatternApiView.MatchFrameEnum || (ErrorAssignmentRulePatternApiView.MatchFrameEnum = {}));
103
+ })(ErrorAssignmentRulePatternApiView || (ErrorAssignmentRulePatternApiView = {}));
104
+ /**
105
+ * @export
106
+ * @namespace ErrorAssignmentRulesAssignee
107
+ */
108
+ var ErrorAssignmentRulesAssignee;
109
+ (function (ErrorAssignmentRulesAssignee) {
110
+ /**
111
+ * @export
112
+ * @enum {string}
113
+ */
114
+ let TypeEnum;
115
+ (function (TypeEnum) {
116
+ TypeEnum[TypeEnum["User"] = "user"] = "User";
117
+ TypeEnum[TypeEnum["Team"] = "team"] = "Team";
118
+ })(TypeEnum = ErrorAssignmentRulesAssignee.TypeEnum || (ErrorAssignmentRulesAssignee.TypeEnum = {}));
119
+ })(ErrorAssignmentRulesAssignee || (ErrorAssignmentRulesAssignee = {}));
120
+ /**
121
+ * @export
122
+ * @namespace ErrorReopenRules
123
+ */
124
+ var ErrorReopenRules;
125
+ (function (ErrorReopenRules) {
126
+ /**
127
+ * @export
128
+ * @enum {string}
129
+ */
130
+ let ReopenIfEnum;
131
+ (function (ReopenIfEnum) {
132
+ ReopenIfEnum[ReopenIfEnum["NAdditionalOccurrences"] = "n_additional_occurrences"] = "NAdditionalOccurrences";
133
+ ReopenIfEnum[ReopenIfEnum["NOccurrencesInMHours"] = "n_occurrences_in_m_hours"] = "NOccurrencesInMHours";
134
+ ReopenIfEnum[ReopenIfEnum["OccursAfter"] = "occurs_after"] = "OccursAfter";
135
+ })(ReopenIfEnum = ErrorReopenRules.ReopenIfEnum || (ErrorReopenRules.ReopenIfEnum = {}));
136
+ })(ErrorReopenRules || (ErrorReopenRules = {}));
137
+ /**
138
+ *
139
+ * @export
140
+ * @enum {string}
141
+ */
142
+ var ErrorStatus;
143
+ (function (ErrorStatus) {
144
+ ErrorStatus[ErrorStatus["Open"] = "open"] = "Open";
145
+ ErrorStatus[ErrorStatus["InProgress"] = "in progress"] = "InProgress";
146
+ ErrorStatus[ErrorStatus["ForReview"] = "for_review"] = "ForReview";
147
+ ErrorStatus[ErrorStatus["Fixed"] = "fixed"] = "Fixed";
148
+ ErrorStatus[ErrorStatus["Snoozed"] = "snoozed"] = "Snoozed";
149
+ ErrorStatus[ErrorStatus["Ignored"] = "ignored"] = "Ignored";
150
+ })(ErrorStatus || (ErrorStatus = {}));
151
+ /**
152
+ * @export
153
+ * @namespace ErrorUpdateReopenRules
154
+ */
155
+ var ErrorUpdateReopenRules;
156
+ (function (ErrorUpdateReopenRules) {
157
+ /**
158
+ * @export
159
+ * @enum {string}
160
+ */
161
+ let ReopenIfEnum;
162
+ (function (ReopenIfEnum) {
163
+ ReopenIfEnum[ReopenIfEnum["OccursAfter"] = "occurs_after"] = "OccursAfter";
164
+ ReopenIfEnum[ReopenIfEnum["NOccurrencesInMHours"] = "n_occurrences_in_m_hours"] = "NOccurrencesInMHours";
165
+ ReopenIfEnum[ReopenIfEnum["NAdditionalOccurrences"] = "n_additional_occurrences"] = "NAdditionalOccurrences";
166
+ ReopenIfEnum[ReopenIfEnum["NAdditionalUsers"] = "n_additional_users"] = "NAdditionalUsers";
167
+ })(ReopenIfEnum = ErrorUpdateReopenRules.ReopenIfEnum || (ErrorUpdateReopenRules.ReopenIfEnum = {}));
168
+ })(ErrorUpdateReopenRules || (ErrorUpdateReopenRules = {}));
169
+ /**
170
+ * @export
171
+ * @namespace ErrorUpdateRequest
172
+ */
173
+ export var ErrorUpdateRequest;
174
+ (function (ErrorUpdateRequest) {
175
+ /**
176
+ * @export
177
+ * @enum {string}
178
+ */
179
+ let OperationEnum;
180
+ (function (OperationEnum) {
181
+ OperationEnum[OperationEnum["OverrideSeverity"] = "override_severity"] = "OverrideSeverity";
182
+ OperationEnum[OperationEnum["Assign"] = "assign"] = "Assign";
183
+ OperationEnum[OperationEnum["CreateIssue"] = "create_issue"] = "CreateIssue";
184
+ OperationEnum[OperationEnum["LinkIssue"] = "link_issue"] = "LinkIssue";
185
+ OperationEnum[OperationEnum["UnlinkIssue"] = "unlink_issue"] = "UnlinkIssue";
186
+ OperationEnum[OperationEnum["Open"] = "open"] = "Open";
187
+ OperationEnum[OperationEnum["Snooze"] = "snooze"] = "Snooze";
188
+ OperationEnum[OperationEnum["Fix"] = "fix"] = "Fix";
189
+ OperationEnum[OperationEnum["Ignore"] = "ignore"] = "Ignore";
190
+ OperationEnum[OperationEnum["Delete"] = "delete"] = "Delete";
191
+ OperationEnum[OperationEnum["Discard"] = "discard"] = "Discard";
192
+ OperationEnum[OperationEnum["Undiscard"] = "undiscard"] = "Undiscard";
193
+ })(OperationEnum = ErrorUpdateRequest.OperationEnum || (ErrorUpdateRequest.OperationEnum = {}));
194
+ })(ErrorUpdateRequest || (ErrorUpdateRequest = {}));
195
+ /**
196
+ * @export
197
+ * @namespace EventApp
198
+ */
199
+ var EventApp;
200
+ (function (EventApp) {
201
+ /**
202
+ * @export
203
+ * @enum {string}
204
+ */
205
+ let BinaryArchEnum;
206
+ (function (BinaryArchEnum) {
207
+ BinaryArchEnum[BinaryArchEnum["X86"] = "x86"] = "X86";
208
+ BinaryArchEnum[BinaryArchEnum["X8664"] = "x86_64"] = "X8664";
209
+ BinaryArchEnum[BinaryArchEnum["Arm32"] = "arm32"] = "Arm32";
210
+ BinaryArchEnum[BinaryArchEnum["Arm64"] = "arm64"] = "Arm64";
211
+ BinaryArchEnum[BinaryArchEnum["Amd64"] = "amd64"] = "Amd64";
212
+ })(BinaryArchEnum = EventApp.BinaryArchEnum || (EventApp.BinaryArchEnum = {}));
213
+ })(EventApp || (EventApp = {}));
214
+ /**
215
+ * only include event fields that pertain to the user such as event.user, event.device, and event.request; you may need to remove/redact some fields before giving this data to your users that request it
216
+ * @export
217
+ * @enum {string}
218
+ */
219
+ var EventDataRequestReportType;
220
+ (function (EventDataRequestReportType) {
221
+ EventDataRequestReportType[EventDataRequestReportType["Gdpr"] = "gdpr"] = "Gdpr";
222
+ })(EventDataRequestReportType || (EventDataRequestReportType = {}));
223
+ /**
224
+ * @export
225
+ * @namespace EventField
226
+ */
227
+ var EventField;
228
+ (function (EventField) {
229
+ /**
230
+ * @export
231
+ * @enum {string}
232
+ */
233
+ let MatchTypesEnum;
234
+ (function (MatchTypesEnum) {
235
+ MatchTypesEnum[MatchTypesEnum["Eq"] = "eq"] = "Eq";
236
+ MatchTypesEnum[MatchTypesEnum["Ne"] = "ne"] = "Ne";
237
+ })(MatchTypesEnum = EventField.MatchTypesEnum || (EventField.MatchTypesEnum = {}));
238
+ })(EventField || (EventField = {}));
239
+ /**
240
+ * - eq - Filter for items that \"match\" (exact match or substring match depending on the field) the value - ne - Filter for items that don't match the value
241
+ * @export
242
+ * @enum {string}
243
+ */
244
+ var FilterMatchType;
245
+ (function (FilterMatchType) {
246
+ FilterMatchType[FilterMatchType["Eq"] = "eq"] = "Eq";
247
+ FilterMatchType[FilterMatchType["Ne"] = "ne"] = "Ne";
248
+ })(FilterMatchType || (FilterMatchType = {}));
249
+ /**
250
+ * @export
251
+ * @namespace FiltersBrowserName
252
+ */
253
+ var FiltersBrowserName;
254
+ (function (FiltersBrowserName) {
255
+ /**
256
+ * @export
257
+ * @enum {string}
258
+ */
259
+ let ValueEnum;
260
+ (function (ValueEnum) {
261
+ ValueEnum[ValueEnum["Chrome"] = "Chrome"] = "Chrome";
262
+ ValueEnum[ValueEnum["Firefox"] = "Firefox"] = "Firefox";
263
+ ValueEnum[ValueEnum["Safari"] = "Safari"] = "Safari";
264
+ ValueEnum[ValueEnum["Opera"] = "Opera"] = "Opera";
265
+ })(ValueEnum = FiltersBrowserName.ValueEnum || (FiltersBrowserName.ValueEnum = {}));
266
+ })(FiltersBrowserName || (FiltersBrowserName = {}));
267
+ /**
268
+ *
269
+ * @export
270
+ * @enum {string}
271
+ */
272
+ var PerformanceDisplayType;
273
+ (function (PerformanceDisplayType) {
274
+ PerformanceDisplayType[PerformanceDisplayType["Js"] = "js"] = "Js";
275
+ PerformanceDisplayType[PerformanceDisplayType["Mobile"] = "mobile"] = "Mobile";
276
+ PerformanceDisplayType[PerformanceDisplayType["Server"] = "server"] = "Server";
277
+ PerformanceDisplayType[PerformanceDisplayType["WebserverBackend"] = "webserver_backend"] = "WebserverBackend";
278
+ PerformanceDisplayType[PerformanceDisplayType["WebserverFrontend"] = "webserver_frontend"] = "WebserverFrontend";
279
+ PerformanceDisplayType[PerformanceDisplayType["WebserverMixed"] = "webserver_mixed"] = "WebserverMixed";
280
+ PerformanceDisplayType[PerformanceDisplayType["Unsupported"] = "unsupported"] = "Unsupported";
281
+ })(PerformanceDisplayType || (PerformanceDisplayType = {}));
282
+ /**
283
+ * @export
284
+ * @namespace PerformanceFilterValue
285
+ */
286
+ var PerformanceFilterValue;
287
+ (function (PerformanceFilterValue) {
288
+ /**
289
+ * @export
290
+ * @enum {string}
291
+ */
292
+ let MatchTypeEnum;
293
+ (function (MatchTypeEnum) {
294
+ MatchTypeEnum[MatchTypeEnum["Eq"] = "eq"] = "Eq";
295
+ MatchTypeEnum[MatchTypeEnum["Ne"] = "ne"] = "Ne";
296
+ MatchTypeEnum[MatchTypeEnum["Lt"] = "lt"] = "Lt";
297
+ MatchTypeEnum[MatchTypeEnum["Gt"] = "gt"] = "Gt";
298
+ MatchTypeEnum[MatchTypeEnum["Empty"] = "empty"] = "Empty";
299
+ })(MatchTypeEnum = PerformanceFilterValue.MatchTypeEnum || (PerformanceFilterValue.MatchTypeEnum = {}));
300
+ })(PerformanceFilterValue || (PerformanceFilterValue = {}));
301
+ /**
302
+ * used for Projects that use a framework other than those listed above
303
+ * @export
304
+ * @enum {string}
305
+ */
306
+ var ProjectType;
307
+ (function (ProjectType) {
308
+ ProjectType[ProjectType["Android"] = "android"] = "Android";
309
+ ProjectType[ProjectType["Angular"] = "angular"] = "Angular";
310
+ ProjectType[ProjectType["Asgi"] = "asgi"] = "Asgi";
311
+ ProjectType[ProjectType["Aspnet"] = "aspnet"] = "Aspnet";
312
+ ProjectType[ProjectType["AspnetCore"] = "aspnet_core"] = "AspnetCore";
313
+ ProjectType[ProjectType["Backbone"] = "backbone"] = "Backbone";
314
+ ProjectType[ProjectType["Bottle"] = "bottle"] = "Bottle";
315
+ ProjectType[ProjectType["Cocos2dx"] = "cocos2dx"] = "Cocos2dx";
316
+ ProjectType[ProjectType["Connect"] = "connect"] = "Connect";
317
+ ProjectType[ProjectType["Django"] = "django"] = "Django";
318
+ ProjectType[ProjectType["Dotnet"] = "dotnet"] = "Dotnet";
319
+ ProjectType[ProjectType["DotnetDesktop"] = "dotnet_desktop"] = "DotnetDesktop";
320
+ ProjectType[ProjectType["DotnetMvc"] = "dotnet_mvc"] = "DotnetMvc";
321
+ ProjectType[ProjectType["Electron"] = "electron"] = "Electron";
322
+ ProjectType[ProjectType["Ember"] = "ember"] = "Ember";
323
+ ProjectType[ProjectType["Eventmachine"] = "eventmachine"] = "Eventmachine";
324
+ ProjectType[ProjectType["Expo"] = "expo"] = "Expo";
325
+ ProjectType[ProjectType["Express"] = "express"] = "Express";
326
+ ProjectType[ProjectType["Flask"] = "flask"] = "Flask";
327
+ ProjectType[ProjectType["Flutter"] = "flutter"] = "Flutter";
328
+ ProjectType[ProjectType["Gin"] = "gin"] = "Gin";
329
+ ProjectType[ProjectType["Go"] = "go"] = "Go";
330
+ ProjectType[ProjectType["GoNetHttp"] = "go_net_http"] = "GoNetHttp";
331
+ ProjectType[ProjectType["Heroku"] = "heroku"] = "Heroku";
332
+ ProjectType[ProjectType["Ios"] = "ios"] = "Ios";
333
+ ProjectType[ProjectType["Java"] = "java"] = "Java";
334
+ ProjectType[ProjectType["JavaDesktop"] = "java_desktop"] = "JavaDesktop";
335
+ ProjectType[ProjectType["Js"] = "js"] = "Js";
336
+ ProjectType[ProjectType["Koa"] = "koa"] = "Koa";
337
+ ProjectType[ProjectType["Laravel"] = "laravel"] = "Laravel";
338
+ ProjectType[ProjectType["Lumen"] = "lumen"] = "Lumen";
339
+ ProjectType[ProjectType["Magento"] = "magento"] = "Magento";
340
+ ProjectType[ProjectType["Martini"] = "martini"] = "Martini";
341
+ ProjectType[ProjectType["Minidump"] = "minidump"] = "Minidump";
342
+ ProjectType[ProjectType["Ndk"] = "ndk"] = "Ndk";
343
+ ProjectType[ProjectType["Negroni"] = "negroni"] = "Negroni";
344
+ ProjectType[ProjectType["NintendoSwitch"] = "nintendo_switch"] = "NintendoSwitch";
345
+ ProjectType[ProjectType["Node"] = "node"] = "Node";
346
+ ProjectType[ProjectType["Osx"] = "osx"] = "Osx";
347
+ ProjectType[ProjectType["OtherDesktop"] = "other_desktop"] = "OtherDesktop";
348
+ ProjectType[ProjectType["OtherMobile"] = "other_mobile"] = "OtherMobile";
349
+ ProjectType[ProjectType["OtherTv"] = "other_tv"] = "OtherTv";
350
+ ProjectType[ProjectType["Php"] = "php"] = "Php";
351
+ ProjectType[ProjectType["Python"] = "python"] = "Python";
352
+ ProjectType[ProjectType["Rack"] = "rack"] = "Rack";
353
+ ProjectType[ProjectType["Rails"] = "rails"] = "Rails";
354
+ ProjectType[ProjectType["React"] = "react"] = "React";
355
+ ProjectType[ProjectType["Reactnative"] = "reactnative"] = "Reactnative";
356
+ ProjectType[ProjectType["Restify"] = "restify"] = "Restify";
357
+ ProjectType[ProjectType["Revel"] = "revel"] = "Revel";
358
+ ProjectType[ProjectType["Ruby"] = "ruby"] = "Ruby";
359
+ ProjectType[ProjectType["Silex"] = "silex"] = "Silex";
360
+ ProjectType[ProjectType["Sinatra"] = "sinatra"] = "Sinatra";
361
+ ProjectType[ProjectType["Spring"] = "spring"] = "Spring";
362
+ ProjectType[ProjectType["Symfony"] = "symfony"] = "Symfony";
363
+ ProjectType[ProjectType["Tornado"] = "tornado"] = "Tornado";
364
+ ProjectType[ProjectType["Tvos"] = "tvos"] = "Tvos";
365
+ ProjectType[ProjectType["Unity"] = "unity"] = "Unity";
366
+ ProjectType[ProjectType["Unrealengine"] = "unrealengine"] = "Unrealengine";
367
+ ProjectType[ProjectType["Vue"] = "vue"] = "Vue";
368
+ ProjectType[ProjectType["Watchos"] = "watchos"] = "Watchos";
369
+ ProjectType[ProjectType["Webapi"] = "webapi"] = "Webapi";
370
+ ProjectType[ProjectType["Wordpress"] = "wordpress"] = "Wordpress";
371
+ ProjectType[ProjectType["Wpf"] = "wpf"] = "Wpf";
372
+ ProjectType[ProjectType["Wsgi"] = "wsgi"] = "Wsgi";
373
+ ProjectType[ProjectType["Other"] = "other"] = "Other";
374
+ })(ProjectType || (ProjectType = {}));
375
+ /**
376
+ * - unknown_source - source is unknown - event - originated from an event - session - originated from a session - api - obtained from an API request - deploy - obtained from a deploy request - error - obtained from an error (with complete information) - error_incomplete_build - obtained from an error (but the build information is incomplete)
377
+ * @export
378
+ * @enum {string}
379
+ */
380
+ var ReleaseRequestSource;
381
+ (function (ReleaseRequestSource) {
382
+ ReleaseRequestSource[ReleaseRequestSource["UnknownSource"] = "unknown_source"] = "UnknownSource";
383
+ ReleaseRequestSource[ReleaseRequestSource["Event"] = "event"] = "Event";
384
+ ReleaseRequestSource[ReleaseRequestSource["Session"] = "session"] = "Session";
385
+ ReleaseRequestSource[ReleaseRequestSource["Api"] = "api"] = "Api";
386
+ ReleaseRequestSource[ReleaseRequestSource["Deploy"] = "deploy"] = "Deploy";
387
+ ReleaseRequestSource[ReleaseRequestSource["Error"] = "error"] = "Error";
388
+ ReleaseRequestSource[ReleaseRequestSource["ErrorIncompleteBuild"] = "error_incomplete_build"] = "ErrorIncompleteBuild";
389
+ })(ReleaseRequestSource || (ReleaseRequestSource = {}));
390
+ /**
391
+ *
392
+ * @export
393
+ * @enum {string}
394
+ */
395
+ var SearchSort;
396
+ (function (SearchSort) {
397
+ SearchSort[SearchSort["FirstSeen"] = "first_seen"] = "FirstSeen";
398
+ SearchSort[SearchSort["Users"] = "users"] = "Users";
399
+ SearchSort[SearchSort["Events"] = "events"] = "Events";
400
+ SearchSort[SearchSort["LastSeen"] = "last_seen"] = "LastSeen";
401
+ })(SearchSort || (SearchSort = {}));
402
+ /**
403
+ * - info - can be used in manual Bugsnag.notify calls - warning - the default severity when Bugsnag.notify is called manually - error - the default severity for uncaught exceptions and crashes
404
+ * @export
405
+ * @enum {string}
406
+ */
407
+ var SeverityOptions;
408
+ (function (SeverityOptions) {
409
+ SeverityOptions[SeverityOptions["Info"] = "info"] = "Info";
410
+ SeverityOptions[SeverityOptions["Warning"] = "warning"] = "Warning";
411
+ SeverityOptions[SeverityOptions["Error"] = "error"] = "Error";
412
+ })(SeverityOptions || (SeverityOptions = {}));
413
+ /**
414
+ * CurrentUserApi - fetch parameter creator
415
+ * @export
416
+ */
417
+ export const CurrentUserApiFetchParamCreator = (configuration) => ({
418
+ /**
419
+ *
420
+ * @summary Create a Saved Search
421
+ * @param {SavedSearchCreateRequest} [body]
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ createSavedSearch(body, options = {}) {
426
+ const localVarPath = `/saved_searches`;
427
+ const localVarUrlObj = url.parse(localVarPath, true);
428
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
429
+ const localVarHeaderParameter = {};
430
+ const localVarQueryParameter = {};
431
+ // authentication tokenAuth required
432
+ if (configuration && configuration.apiKey) {
433
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
434
+ ? configuration.apiKey("Authorization")
435
+ : configuration.apiKey;
436
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
437
+ }
438
+ localVarHeaderParameter["Content-Type"] = "application/json";
439
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
440
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
441
+ localVarUrlObj.search = null;
442
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
443
+ const needsSerialization = "SavedSearchCreateRequest" !== "string" ||
444
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
445
+ localVarRequestOptions.body = needsSerialization
446
+ ? JSON.stringify(body || {})
447
+ : body || "";
448
+ return {
449
+ url: url.format(localVarUrlObj),
450
+ options: localVarRequestOptions,
451
+ };
452
+ },
453
+ /**
454
+ *
455
+ * @summary Delete a Saved Search
456
+ * @param {string} id The ID of the saved search
457
+ * @param {*} [options] Override http request option.
458
+ * @throws {RequiredError}
459
+ */
460
+ deleteSavedSearchById(id, options = {}) {
461
+ // verify required parameter 'id' is not null or undefined
462
+ if (id === null || id === undefined) {
463
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling deleteSavedSearchById.");
464
+ }
465
+ const localVarPath = `/saved_searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
466
+ const localVarUrlObj = url.parse(localVarPath, true);
467
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
468
+ const localVarHeaderParameter = {};
469
+ const localVarQueryParameter = {};
470
+ // authentication tokenAuth required
471
+ if (configuration && configuration.apiKey) {
472
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
473
+ ? configuration.apiKey("Authorization")
474
+ : configuration.apiKey;
475
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
476
+ }
477
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
478
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
479
+ localVarUrlObj.search = null;
480
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
481
+ return {
482
+ url: url.format(localVarUrlObj),
483
+ options: localVarRequestOptions,
484
+ };
485
+ },
486
+ /**
487
+ * Returns a list of projects for the given organization.
488
+ * @summary List an Organization's Projects
489
+ * @param {string} organizationId the ID of the organization
490
+ * @param {string} [q] Search projects with names matching parameter
491
+ * @param {string} [sort] Which field to sort the results by
492
+ * @param {string} [direction] Which direction to sort the results by. Defaults to `desc` for all sorts except `favorite`. Defaults to `asc` if sorting by `favorite` (cannot sort `favorite`s `desc`).
493
+ * @param {number} [perPage] How many results to return per page
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ getOrganizationProjects(organizationId, q, sort, direction, perPage, options = {}) {
498
+ // verify required parameter 'organizationId' is not null or undefined
499
+ if (organizationId === null || organizationId === undefined) {
500
+ throw new RequiredError("organizationId", "Required parameter organizationId was null or undefined when calling getOrganizationProjects.");
501
+ }
502
+ const localVarPath = `/organizations/{organization_id}/projects`.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
503
+ const localVarUrlObj = url.parse(localVarPath, true);
504
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
505
+ const localVarHeaderParameter = {};
506
+ const localVarQueryParameter = {};
507
+ // authentication tokenAuth required
508
+ if (configuration && configuration.apiKey) {
509
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
510
+ ? configuration.apiKey("Authorization")
511
+ : configuration.apiKey;
512
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
513
+ }
514
+ if (q !== undefined) {
515
+ localVarQueryParameter["q"] = q;
516
+ }
517
+ if (sort !== undefined) {
518
+ localVarQueryParameter["sort"] = sort;
519
+ }
520
+ if (direction !== undefined) {
521
+ localVarQueryParameter["direction"] = direction;
522
+ }
523
+ if (perPage !== undefined) {
524
+ localVarQueryParameter["per_page"] = perPage;
525
+ }
526
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
527
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
528
+ localVarUrlObj.search = null;
529
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
530
+ return {
531
+ url: url.format(localVarUrlObj),
532
+ options: localVarRequestOptions,
533
+ };
534
+ },
535
+ /**
536
+ *
537
+ * @summary Get a Saved Search
538
+ * @param {string} id The ID of the saved search
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ getSavedSearchById(id, options = {}) {
543
+ // verify required parameter 'id' is not null or undefined
544
+ if (id === null || id === undefined) {
545
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getSavedSearchById.");
546
+ }
547
+ const localVarPath = `/saved_searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
548
+ const localVarUrlObj = url.parse(localVarPath, true);
549
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
550
+ const localVarHeaderParameter = {};
551
+ const localVarQueryParameter = {};
552
+ // authentication tokenAuth required
553
+ if (configuration && configuration.apiKey) {
554
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
555
+ ? configuration.apiKey("Authorization")
556
+ : configuration.apiKey;
557
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
558
+ }
559
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
560
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
561
+ localVarUrlObj.search = null;
562
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
563
+ return {
564
+ url: url.format(localVarUrlObj),
565
+ options: localVarRequestOptions,
566
+ };
567
+ },
568
+ /**
569
+ * Returns a short usage summary for a saved search.
570
+ * @summary Get the Usage Summary for a Saved Search
571
+ * @param {string} id the ID of the saved search to get a summary for
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ getSavedSearchUsageSummary(id, options = {}) {
576
+ // verify required parameter 'id' is not null or undefined
577
+ if (id === null || id === undefined) {
578
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getSavedSearchUsageSummary.");
579
+ }
580
+ const localVarPath = `/saved_searches/{id}/usage_summary`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
581
+ const localVarUrlObj = url.parse(localVarPath, true);
582
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
583
+ const localVarHeaderParameter = {};
584
+ const localVarQueryParameter = {};
585
+ // authentication tokenAuth required
586
+ if (configuration && configuration.apiKey) {
587
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
588
+ ? configuration.apiKey("Authorization")
589
+ : configuration.apiKey;
590
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
591
+ }
592
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
593
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
594
+ localVarUrlObj.search = null;
595
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
596
+ return {
597
+ url: url.format(localVarUrlObj),
598
+ options: localVarRequestOptions,
599
+ };
600
+ },
601
+ /**
602
+ * Returns the saved searches for a given project sorted by name in lexographic order.
603
+ * @summary List Saved Searches on a Project
604
+ * @param {string} projectId
605
+ * @param {string} [shared] Limit Saved Searches returned to only those with this `shared` property
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ listProjectSavedSearches(projectId, shared, options = {}) {
610
+ // verify required parameter 'projectId' is not null or undefined
611
+ if (projectId === null || projectId === undefined) {
612
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectSavedSearches.");
613
+ }
614
+ const localVarPath = `/projects/{project_id}/saved_searches`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
615
+ const localVarUrlObj = url.parse(localVarPath, true);
616
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
617
+ const localVarHeaderParameter = {};
618
+ const localVarQueryParameter = {};
619
+ // authentication tokenAuth required
620
+ if (configuration && configuration.apiKey) {
621
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
622
+ ? configuration.apiKey("Authorization")
623
+ : configuration.apiKey;
624
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
625
+ }
626
+ if (shared !== undefined) {
627
+ localVarQueryParameter["shared"] = shared;
628
+ }
629
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
630
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
631
+ localVarUrlObj.search = null;
632
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
633
+ return {
634
+ url: url.format(localVarUrlObj),
635
+ options: localVarRequestOptions,
636
+ };
637
+ },
638
+ /**
639
+ *
640
+ * @summary List the Current User's Organizations
641
+ * @param {boolean} [admin] `true` if only Organizations the Current User is an admin of should be returned
642
+ * @param {number} [perPage] Number of results per page
643
+ * @param {*} [options] Override http request option.
644
+ * @throws {RequiredError}
645
+ */
646
+ listUserOrganizations(admin, perPage, options = {}) {
647
+ const localVarPath = `/user/organizations`;
648
+ const localVarUrlObj = url.parse(localVarPath, true);
649
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
650
+ const localVarHeaderParameter = {};
651
+ const localVarQueryParameter = {};
652
+ // authentication tokenAuth required
653
+ if (configuration && configuration.apiKey) {
654
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
655
+ ? configuration.apiKey("Authorization")
656
+ : configuration.apiKey;
657
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
658
+ }
659
+ if (admin !== undefined) {
660
+ localVarQueryParameter["admin"] = admin;
661
+ }
662
+ if (perPage !== undefined) {
663
+ localVarQueryParameter["per_page"] = perPage;
664
+ }
665
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
666
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
667
+ localVarUrlObj.search = null;
668
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
669
+ return {
670
+ url: url.format(localVarUrlObj),
671
+ options: localVarRequestOptions,
672
+ };
673
+ },
674
+ /**
675
+ *
676
+ * @summary Update a Saved Search
677
+ * @param {string} id The ID of the saved search
678
+ * @param {SavedSearchUpdateRequest} [body]
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ */
682
+ updateSavedSearchById(id, body, options = {}) {
683
+ // verify required parameter 'id' is not null or undefined
684
+ if (id === null || id === undefined) {
685
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling updateSavedSearchById.");
686
+ }
687
+ const localVarPath = `/saved_searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
688
+ const localVarUrlObj = url.parse(localVarPath, true);
689
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
690
+ const localVarHeaderParameter = {};
691
+ const localVarQueryParameter = {};
692
+ // authentication tokenAuth required
693
+ if (configuration && configuration.apiKey) {
694
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
695
+ ? configuration.apiKey("Authorization")
696
+ : configuration.apiKey;
697
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
698
+ }
699
+ localVarHeaderParameter["Content-Type"] = "application/json";
700
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
701
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
702
+ localVarUrlObj.search = null;
703
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
704
+ const needsSerialization = "SavedSearchUpdateRequest" !== "string" ||
705
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
706
+ localVarRequestOptions.body = needsSerialization
707
+ ? JSON.stringify(body || {})
708
+ : body || "";
709
+ return {
710
+ url: url.format(localVarUrlObj),
711
+ options: localVarRequestOptions,
712
+ };
713
+ },
714
+ });
715
+ /**
716
+ * ErrorsApi - fetch parameter creator
717
+ * @export
718
+ */
719
+ export const ErrorsApiFetchParamCreator = (configuration) => ({
720
+ /**
721
+ *
722
+ * @summary Bulk Update Errors
723
+ * @param {ErrorUpdateRequest} body
724
+ * @param {string} projectId
725
+ * @param {Array<string>} errorIds
726
+ * @param {*} [options] Override http request option.
727
+ * @throws {RequiredError}
728
+ */
729
+ bulkUpdateErrors(body, projectId, errorIds, options = {}) {
730
+ // verify required parameter 'body' is not null or undefined
731
+ if (body === null || body === undefined) {
732
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling bulkUpdateErrors.");
733
+ }
734
+ // verify required parameter 'projectId' is not null or undefined
735
+ if (projectId === null || projectId === undefined) {
736
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling bulkUpdateErrors.");
737
+ }
738
+ // verify required parameter 'errorIds' is not null or undefined
739
+ if (errorIds === null || errorIds === undefined) {
740
+ throw new RequiredError("errorIds", "Required parameter errorIds was null or undefined when calling bulkUpdateErrors.");
741
+ }
742
+ const localVarPath = `/projects/{project_id}/errors`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
743
+ const localVarUrlObj = url.parse(localVarPath, true);
744
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
745
+ const localVarHeaderParameter = {};
746
+ const localVarQueryParameter = {};
747
+ // authentication tokenAuth required
748
+ if (configuration && configuration.apiKey) {
749
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
750
+ ? configuration.apiKey("Authorization")
751
+ : configuration.apiKey;
752
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
753
+ }
754
+ if (errorIds) {
755
+ localVarQueryParameter["error_ids"] = errorIds;
756
+ }
757
+ localVarHeaderParameter["Content-Type"] = "application/json";
758
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
759
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
760
+ localVarUrlObj.search = null;
761
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
762
+ const needsSerialization = "ErrorUpdateRequest" !== "string" ||
763
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
764
+ localVarRequestOptions.body = needsSerialization
765
+ ? JSON.stringify(body || {})
766
+ : body || "";
767
+ return {
768
+ url: url.format(localVarUrlObj),
769
+ options: localVarRequestOptions,
770
+ };
771
+ },
772
+ /**
773
+ * Deletes all Error and Event data in a project. Use with caution. This action cannot be reversed.
774
+ * @summary Delete all Errors in a Project
775
+ * @param {string} projectId
776
+ * @param {*} [options] Override http request option.
777
+ * @throws {RequiredError}
778
+ */
779
+ deleteAllErrorsInProject(projectId, options = {}) {
780
+ // verify required parameter 'projectId' is not null or undefined
781
+ if (projectId === null || projectId === undefined) {
782
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteAllErrorsInProject.");
783
+ }
784
+ const localVarPath = `/projects/{project_id}/errors`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
785
+ const localVarUrlObj = url.parse(localVarPath, true);
786
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
787
+ const localVarHeaderParameter = {};
788
+ const localVarQueryParameter = {};
789
+ // authentication tokenAuth required
790
+ if (configuration && configuration.apiKey) {
791
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
792
+ ? configuration.apiKey("Authorization")
793
+ : configuration.apiKey;
794
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
795
+ }
796
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
797
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
798
+ localVarUrlObj.search = null;
799
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
800
+ return {
801
+ url: url.format(localVarUrlObj),
802
+ options: localVarRequestOptions,
803
+ };
804
+ },
805
+ /**
806
+ *
807
+ * @summary Delete an Error
808
+ * @param {string} projectId
809
+ * @param {string} errorId
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ */
813
+ deleteErrorOnProject(projectId, errorId, options = {}) {
814
+ // verify required parameter 'projectId' is not null or undefined
815
+ if (projectId === null || projectId === undefined) {
816
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteErrorOnProject.");
817
+ }
818
+ // verify required parameter 'errorId' is not null or undefined
819
+ if (errorId === null || errorId === undefined) {
820
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling deleteErrorOnProject.");
821
+ }
822
+ const localVarPath = `/projects/{project_id}/errors/{error_id}`
823
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
824
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
825
+ const localVarUrlObj = url.parse(localVarPath, true);
826
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
827
+ const localVarHeaderParameter = {};
828
+ const localVarQueryParameter = {};
829
+ // authentication tokenAuth required
830
+ if (configuration && configuration.apiKey) {
831
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
832
+ ? configuration.apiKey("Authorization")
833
+ : configuration.apiKey;
834
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
835
+ }
836
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
837
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
838
+ localVarUrlObj.search = null;
839
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
840
+ return {
841
+ url: url.format(localVarUrlObj),
842
+ options: localVarRequestOptions,
843
+ };
844
+ },
845
+ /**
846
+ *
847
+ * @summary Delete an Event
848
+ * @param {string} projectId
849
+ * @param {string} eventId
850
+ * @param {*} [options] Override http request option.
851
+ * @throws {RequiredError}
852
+ */
853
+ deleteEventById(projectId, eventId, options = {}) {
854
+ // verify required parameter 'projectId' is not null or undefined
855
+ if (projectId === null || projectId === undefined) {
856
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteEventById.");
857
+ }
858
+ // verify required parameter 'eventId' is not null or undefined
859
+ if (eventId === null || eventId === undefined) {
860
+ throw new RequiredError("eventId", "Required parameter eventId was null or undefined when calling deleteEventById.");
861
+ }
862
+ const localVarPath = `/projects/{project_id}/events/{event_id}`
863
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
864
+ .replace(`{${"event_id"}}`, encodeURIComponent(String(eventId)));
865
+ const localVarUrlObj = url.parse(localVarPath, true);
866
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
867
+ const localVarHeaderParameter = {};
868
+ const localVarQueryParameter = {};
869
+ // authentication tokenAuth required
870
+ if (configuration && configuration.apiKey) {
871
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
872
+ ? configuration.apiKey("Authorization")
873
+ : configuration.apiKey;
874
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
875
+ }
876
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
877
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
878
+ localVarUrlObj.search = null;
879
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
880
+ return {
881
+ url: url.format(localVarUrlObj),
882
+ options: localVarRequestOptions,
883
+ };
884
+ },
885
+ /**
886
+ * Counts for an Error in a given time range, suitable for drawing histograms. Will return a maximum of 50 buckets (when using `buckets_count`) or 2000 data points (when using `resolution`).
887
+ * @summary List the Trends for an Error
888
+ * @param {string} projectId ID of the Project
889
+ * @param {string} errorId ID of the error
890
+ * @param {Filters} [filters] Search filters to restrict the events reported in the trend
891
+ * @param {number} [bucketsCount] Number of buckets to group trend data into (max 50)
892
+ * @param {string} [resolution] The trend data will be grouped so that each bucket spans the given time period
893
+ * @param {*} [options] Override http request option.
894
+ * @throws {RequiredError}
895
+ */
896
+ getBucketedAndUnbucketedTrendsOnError(projectId, errorId, filters, bucketsCount, resolution, options = {}) {
897
+ // verify required parameter 'projectId' is not null or undefined
898
+ if (projectId === null || projectId === undefined) {
899
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getBucketedAndUnbucketedTrendsOnError.");
900
+ }
901
+ // verify required parameter 'errorId' is not null or undefined
902
+ if (errorId === null || errorId === undefined) {
903
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling getBucketedAndUnbucketedTrendsOnError.");
904
+ }
905
+ const localVarPath = `/projects/{project_id}/errors/{error_id}/trends`
906
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
907
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
908
+ const localVarUrlObj = url.parse(localVarPath, true);
909
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
910
+ const localVarHeaderParameter = {};
911
+ const localVarQueryParameter = {};
912
+ // authentication tokenAuth required
913
+ if (configuration && configuration.apiKey) {
914
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
915
+ ? configuration.apiKey("Authorization")
916
+ : configuration.apiKey;
917
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
918
+ }
919
+ if (filters !== undefined) {
920
+ localVarQueryParameter["filters"] = filters;
921
+ }
922
+ if (bucketsCount !== undefined) {
923
+ localVarQueryParameter["buckets_count"] = bucketsCount;
924
+ }
925
+ if (resolution !== undefined) {
926
+ localVarQueryParameter["resolution"] = resolution;
927
+ }
928
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
929
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
930
+ localVarUrlObj.search = null;
931
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
932
+ return {
933
+ url: url.format(localVarUrlObj),
934
+ options: localVarRequestOptions,
935
+ };
936
+ },
937
+ /**
938
+ * Counts for a Project in a given time range, suitable for drawing histograms. Will return a maximum of 50 buckets (when using `buckets_count`) or 2000 data points (when using `resolution`).
939
+ * @summary List the Trends for a Project
940
+ * @param {string} projectId ID of the project
941
+ * @param {Filters} [filters] Search filters to restrict the events reported in the trend
942
+ * @param {number} [bucketsCount] Number of buckets to group trend data into (max 50)
943
+ * @param {string} [resolution] The trend data will be grouped so that each bucket spans the given time period
944
+ * @param {*} [options] Override http request option.
945
+ * @throws {RequiredError}
946
+ */
947
+ getBucketedAndUnbucketedTrendsOnProject(projectId, filters, bucketsCount, resolution, options = {}) {
948
+ // verify required parameter 'projectId' is not null or undefined
949
+ if (projectId === null || projectId === undefined) {
950
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getBucketedAndUnbucketedTrendsOnProject.");
951
+ }
952
+ const localVarPath = `/projects/{project_id}/trends`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
953
+ const localVarUrlObj = url.parse(localVarPath, true);
954
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
955
+ const localVarHeaderParameter = {};
956
+ const localVarQueryParameter = {};
957
+ // authentication tokenAuth required
958
+ if (configuration && configuration.apiKey) {
959
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
960
+ ? configuration.apiKey("Authorization")
961
+ : configuration.apiKey;
962
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
963
+ }
964
+ if (filters !== undefined) {
965
+ localVarQueryParameter["filters"] = filters;
966
+ }
967
+ if (bucketsCount !== undefined) {
968
+ localVarQueryParameter["buckets_count"] = bucketsCount;
969
+ }
970
+ if (resolution !== undefined) {
971
+ localVarQueryParameter["resolution"] = resolution;
972
+ }
973
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
974
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
975
+ localVarUrlObj.search = null;
976
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
977
+ return {
978
+ url: url.format(localVarUrlObj),
979
+ options: localVarRequestOptions,
980
+ };
981
+ },
982
+ /**
983
+ *
984
+ * @summary List values of a Pivot on a Project
985
+ * @param {string} projectId
986
+ * @param {string} eventFieldDisplayId
987
+ * @param {Filters} [filters]
988
+ * @param {string} [sort]
989
+ * @param {Date} [base]
990
+ * @param {number} [perPage]
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ getPivotValuesOnAProject(projectId, eventFieldDisplayId, filters, sort, base, perPage, options = {}) {
995
+ // verify required parameter 'projectId' is not null or undefined
996
+ if (projectId === null || projectId === undefined) {
997
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getPivotValuesOnAProject.");
998
+ }
999
+ // verify required parameter 'eventFieldDisplayId' is not null or undefined
1000
+ if (eventFieldDisplayId === null || eventFieldDisplayId === undefined) {
1001
+ throw new RequiredError("eventFieldDisplayId", "Required parameter eventFieldDisplayId was null or undefined when calling getPivotValuesOnAProject.");
1002
+ }
1003
+ const localVarPath = `/projects/{project_id}/pivots/{event_field_display_id}/values`
1004
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1005
+ .replace(`{${"event_field_display_id"}}`, encodeURIComponent(String(eventFieldDisplayId)));
1006
+ const localVarUrlObj = url.parse(localVarPath, true);
1007
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1008
+ const localVarHeaderParameter = {};
1009
+ const localVarQueryParameter = {};
1010
+ // authentication tokenAuth required
1011
+ if (configuration && configuration.apiKey) {
1012
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1013
+ ? configuration.apiKey("Authorization")
1014
+ : configuration.apiKey;
1015
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1016
+ }
1017
+ if (filters !== undefined) {
1018
+ localVarQueryParameter["filters"] = filters;
1019
+ }
1020
+ if (sort !== undefined) {
1021
+ localVarQueryParameter["sort"] = sort;
1022
+ }
1023
+ if (base !== undefined) {
1024
+ localVarQueryParameter["base"] = base.toISOString();
1025
+ }
1026
+ if (perPage !== undefined) {
1027
+ localVarQueryParameter["per_page"] = perPage;
1028
+ }
1029
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1030
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1031
+ localVarUrlObj.search = null;
1032
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1033
+ return {
1034
+ url: url.format(localVarUrlObj),
1035
+ options: localVarRequestOptions,
1036
+ };
1037
+ },
1038
+ /**
1039
+ *
1040
+ * @summary List values of a Pivot on an Error
1041
+ * @param {string} projectId
1042
+ * @param {string} errorId
1043
+ * @param {string} eventFieldDisplayId
1044
+ * @param {Filters} [filters]
1045
+ * @param {string} [sort]
1046
+ * @param {Date} [base]
1047
+ * @param {number} [perPage]
1048
+ * @param {*} [options] Override http request option.
1049
+ * @throws {RequiredError}
1050
+ */
1051
+ getPivotValuesOnAnError(projectId, errorId, eventFieldDisplayId, filters, sort, base, perPage, options = {}) {
1052
+ // verify required parameter 'projectId' is not null or undefined
1053
+ if (projectId === null || projectId === undefined) {
1054
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getPivotValuesOnAnError.");
1055
+ }
1056
+ // verify required parameter 'errorId' is not null or undefined
1057
+ if (errorId === null || errorId === undefined) {
1058
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling getPivotValuesOnAnError.");
1059
+ }
1060
+ // verify required parameter 'eventFieldDisplayId' is not null or undefined
1061
+ if (eventFieldDisplayId === null || eventFieldDisplayId === undefined) {
1062
+ throw new RequiredError("eventFieldDisplayId", "Required parameter eventFieldDisplayId was null or undefined when calling getPivotValuesOnAnError.");
1063
+ }
1064
+ const localVarPath = `/projects/{project_id}/errors/{error_id}/pivots/{event_field_display_id}/values`
1065
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1066
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)))
1067
+ .replace(`{${"event_field_display_id"}}`, encodeURIComponent(String(eventFieldDisplayId)));
1068
+ const localVarUrlObj = url.parse(localVarPath, true);
1069
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1070
+ const localVarHeaderParameter = {};
1071
+ const localVarQueryParameter = {};
1072
+ // authentication tokenAuth required
1073
+ if (configuration && configuration.apiKey) {
1074
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1075
+ ? configuration.apiKey("Authorization")
1076
+ : configuration.apiKey;
1077
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1078
+ }
1079
+ if (filters !== undefined) {
1080
+ localVarQueryParameter["filters"] = filters;
1081
+ }
1082
+ if (sort !== undefined) {
1083
+ localVarQueryParameter["sort"] = sort;
1084
+ }
1085
+ if (base !== undefined) {
1086
+ localVarQueryParameter["base"] = base.toISOString();
1087
+ }
1088
+ if (perPage !== undefined) {
1089
+ localVarQueryParameter["per_page"] = perPage;
1090
+ }
1091
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1092
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1093
+ localVarUrlObj.search = null;
1094
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1095
+ return {
1096
+ url: url.format(localVarUrlObj),
1097
+ options: localVarRequestOptions,
1098
+ };
1099
+ },
1100
+ /**
1101
+ *
1102
+ * @summary List Pivots on a Project
1103
+ * @param {string} projectId
1104
+ * @param {Filters} [filters]
1105
+ * @param {number} [summarySize]
1106
+ * @param {Array<string>} [pivots]
1107
+ * @param {*} [options] Override http request option.
1108
+ * @throws {RequiredError}
1109
+ */
1110
+ getPivotsOnAProject(projectId, filters, summarySize, pivots, options = {}) {
1111
+ // verify required parameter 'projectId' is not null or undefined
1112
+ if (projectId === null || projectId === undefined) {
1113
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getPivotsOnAProject.");
1114
+ }
1115
+ const localVarPath = `/projects/{project_id}/pivots`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1116
+ const localVarUrlObj = url.parse(localVarPath, true);
1117
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1118
+ const localVarHeaderParameter = {};
1119
+ const localVarQueryParameter = {};
1120
+ // authentication tokenAuth required
1121
+ if (configuration && configuration.apiKey) {
1122
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1123
+ ? configuration.apiKey("Authorization")
1124
+ : configuration.apiKey;
1125
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1126
+ }
1127
+ if (filters !== undefined) {
1128
+ localVarQueryParameter["filters"] = filters;
1129
+ }
1130
+ if (summarySize !== undefined) {
1131
+ localVarQueryParameter["summary_size"] = summarySize;
1132
+ }
1133
+ if (pivots) {
1134
+ localVarQueryParameter["pivots"] = pivots;
1135
+ }
1136
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1137
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1138
+ localVarUrlObj.search = null;
1139
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1140
+ return {
1141
+ url: url.format(localVarUrlObj),
1142
+ options: localVarRequestOptions,
1143
+ };
1144
+ },
1145
+ /**
1146
+ * Get a list of the events of an error. If you require a feed of all new events as they are reported consider setting up a webhook integration instead.
1147
+ * @summary List the Events on an Error
1148
+ * @param {string} projectId
1149
+ * @param {string} errorId
1150
+ * @param {Date} [base]
1151
+ * @param {string} [sort]
1152
+ * @param {string} [direction]
1153
+ * @param {number} [perPage]
1154
+ * @param {Filters} [filters]
1155
+ * @param {boolean} [fullReports]
1156
+ * @param {*} [options] Override http request option.
1157
+ * @throws {RequiredError}
1158
+ */
1159
+ listEventsOnError(projectId, errorId, base, sort, direction, perPage, filters, fullReports, options = {}) {
1160
+ // verify required parameter 'projectId' is not null or undefined
1161
+ if (projectId === null || projectId === undefined) {
1162
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listEventsOnError.");
1163
+ }
1164
+ // verify required parameter 'errorId' is not null or undefined
1165
+ if (errorId === null || errorId === undefined) {
1166
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling listEventsOnError.");
1167
+ }
1168
+ const localVarPath = `/projects/{project_id}/errors/{error_id}/events`
1169
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1170
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
1171
+ const localVarUrlObj = url.parse(localVarPath, true);
1172
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1173
+ const localVarHeaderParameter = {};
1174
+ const localVarQueryParameter = {};
1175
+ // authentication tokenAuth required
1176
+ if (configuration && configuration.apiKey) {
1177
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1178
+ ? configuration.apiKey("Authorization")
1179
+ : configuration.apiKey;
1180
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1181
+ }
1182
+ if (base !== undefined) {
1183
+ localVarQueryParameter["base"] = base.toISOString();
1184
+ }
1185
+ if (sort !== undefined) {
1186
+ localVarQueryParameter["sort"] = sort;
1187
+ }
1188
+ if (direction !== undefined) {
1189
+ localVarQueryParameter["direction"] = direction;
1190
+ }
1191
+ if (perPage !== undefined) {
1192
+ localVarQueryParameter["per_page"] = perPage;
1193
+ }
1194
+ if (filters !== undefined) {
1195
+ localVarQueryParameter["filters"] = filters;
1196
+ }
1197
+ if (fullReports !== undefined) {
1198
+ localVarQueryParameter["full_reports"] = fullReports;
1199
+ }
1200
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1201
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1202
+ localVarUrlObj.search = null;
1203
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1204
+ return {
1205
+ url: url.format(localVarUrlObj),
1206
+ options: localVarRequestOptions,
1207
+ };
1208
+ },
1209
+ /**
1210
+ *
1211
+ * @summary List the Events on a Project
1212
+ * @param {string} projectId
1213
+ * @param {Date} [base]
1214
+ * @param {string} [sort]
1215
+ * @param {string} [direction]
1216
+ * @param {number} [perPage]
1217
+ * @param {Filters} [filters]
1218
+ * @param {boolean} [fullReports]
1219
+ * @param {*} [options] Override http request option.
1220
+ * @throws {RequiredError}
1221
+ */
1222
+ listEventsOnProject(projectId, base, sort, direction, perPage, filters, fullReports, options = {}) {
1223
+ // verify required parameter 'projectId' is not null or undefined
1224
+ if (projectId === null || projectId === undefined) {
1225
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listEventsOnProject.");
1226
+ }
1227
+ const localVarPath = `/projects/{project_id}/events`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1228
+ const localVarUrlObj = url.parse(localVarPath, true);
1229
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1230
+ const localVarHeaderParameter = {};
1231
+ const localVarQueryParameter = {};
1232
+ // authentication tokenAuth required
1233
+ if (configuration && configuration.apiKey) {
1234
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1235
+ ? configuration.apiKey("Authorization")
1236
+ : configuration.apiKey;
1237
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1238
+ }
1239
+ if (base !== undefined) {
1240
+ localVarQueryParameter["base"] = base.toISOString();
1241
+ }
1242
+ if (sort !== undefined) {
1243
+ localVarQueryParameter["sort"] = sort;
1244
+ }
1245
+ if (direction !== undefined) {
1246
+ localVarQueryParameter["direction"] = direction;
1247
+ }
1248
+ if (perPage !== undefined) {
1249
+ localVarQueryParameter["per_page"] = perPage;
1250
+ }
1251
+ if (filters !== undefined) {
1252
+ localVarQueryParameter["filters"] = filters;
1253
+ }
1254
+ if (fullReports !== undefined) {
1255
+ localVarQueryParameter["full_reports"] = fullReports;
1256
+ }
1257
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1258
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1259
+ localVarUrlObj.search = null;
1260
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1261
+ return {
1262
+ url: url.format(localVarUrlObj),
1263
+ options: localVarRequestOptions,
1264
+ };
1265
+ },
1266
+ /**
1267
+ *
1268
+ * @summary List Pivots on an Error
1269
+ * @param {string} projectId
1270
+ * @param {string} errorId
1271
+ * @param {Filters} [filters]
1272
+ * @param {number} [summarySize]
1273
+ * @param {Array<string>} [pivots]
1274
+ * @param {number} [perPage]
1275
+ * @param {*} [options] Override http request option.
1276
+ * @throws {RequiredError}
1277
+ */
1278
+ listPivotsOnAnError(projectId, errorId, filters, summarySize, pivots, perPage, options = {}) {
1279
+ // verify required parameter 'projectId' is not null or undefined
1280
+ if (projectId === null || projectId === undefined) {
1281
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listPivotsOnAnError.");
1282
+ }
1283
+ // verify required parameter 'errorId' is not null or undefined
1284
+ if (errorId === null || errorId === undefined) {
1285
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling listPivotsOnAnError.");
1286
+ }
1287
+ const localVarPath = `/projects/{project_id}/errors/{error_id}/pivots`
1288
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1289
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
1290
+ const localVarUrlObj = url.parse(localVarPath, true);
1291
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1292
+ const localVarHeaderParameter = {};
1293
+ const localVarQueryParameter = {};
1294
+ // authentication tokenAuth required
1295
+ if (configuration && configuration.apiKey) {
1296
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1297
+ ? configuration.apiKey("Authorization")
1298
+ : configuration.apiKey;
1299
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1300
+ }
1301
+ if (filters !== undefined) {
1302
+ localVarQueryParameter["filters"] = filters;
1303
+ }
1304
+ if (summarySize !== undefined) {
1305
+ localVarQueryParameter["summary_size"] = summarySize;
1306
+ }
1307
+ if (pivots) {
1308
+ localVarQueryParameter["pivots"] = pivots;
1309
+ }
1310
+ if (perPage !== undefined) {
1311
+ localVarQueryParameter["per_page"] = perPage;
1312
+ }
1313
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1314
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1315
+ localVarUrlObj.search = null;
1316
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1317
+ return {
1318
+ url: url.format(localVarUrlObj),
1319
+ options: localVarRequestOptions,
1320
+ };
1321
+ },
1322
+ /**
1323
+ * Get a list of the errors on a project. If you require a feed of all new errors as they are reported consider setting up a webhook integration instead.
1324
+ * @summary List the Errors on a Project
1325
+ * @param {string} projectId
1326
+ * @param {Date} [base]
1327
+ * @param {string} [sort]
1328
+ * @param {string} [direction]
1329
+ * @param {number} [perPage]
1330
+ * @param {Filters} [filters]
1331
+ * @param {*} [options] Override http request option.
1332
+ * @throws {RequiredError}
1333
+ */
1334
+ listProjectErrors(projectId, base, sort, direction, perPage, filters, options = {}) {
1335
+ // verify required parameter 'projectId' is not null or undefined
1336
+ if (projectId === null || projectId === undefined) {
1337
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectErrors.");
1338
+ }
1339
+ const localVarPath = `/projects/{project_id}/errors`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1340
+ const localVarUrlObj = url.parse(localVarPath, true);
1341
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1342
+ const localVarHeaderParameter = {};
1343
+ const localVarQueryParameter = {};
1344
+ // authentication tokenAuth required
1345
+ if (configuration && configuration.apiKey) {
1346
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1347
+ ? configuration.apiKey("Authorization")
1348
+ : configuration.apiKey;
1349
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1350
+ }
1351
+ if (base !== undefined) {
1352
+ localVarQueryParameter["base"] = base.toISOString();
1353
+ }
1354
+ if (sort !== undefined) {
1355
+ localVarQueryParameter["sort"] = sort;
1356
+ }
1357
+ if (direction !== undefined) {
1358
+ localVarQueryParameter["direction"] = direction;
1359
+ }
1360
+ if (perPage !== undefined) {
1361
+ localVarQueryParameter["per_page"] = perPage;
1362
+ }
1363
+ if (filters !== undefined) {
1364
+ localVarQueryParameter["filters"] = filters;
1365
+ }
1366
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1367
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1368
+ localVarUrlObj.search = null;
1369
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1370
+ return {
1371
+ url: url.format(localVarUrlObj),
1372
+ options: localVarRequestOptions,
1373
+ };
1374
+ },
1375
+ /**
1376
+ *
1377
+ * @summary Update an Error
1378
+ * @param {ErrorUpdateRequest} body
1379
+ * @param {string} projectId
1380
+ * @param {string} errorId
1381
+ * @param {*} [options] Override http request option.
1382
+ * @throws {RequiredError}
1383
+ */
1384
+ updateErrorOnProject(body, projectId, errorId, options = {}) {
1385
+ // verify required parameter 'body' is not null or undefined
1386
+ if (body === null || body === undefined) {
1387
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling updateErrorOnProject.");
1388
+ }
1389
+ // verify required parameter 'projectId' is not null or undefined
1390
+ if (projectId === null || projectId === undefined) {
1391
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling updateErrorOnProject.");
1392
+ }
1393
+ // verify required parameter 'errorId' is not null or undefined
1394
+ if (errorId === null || errorId === undefined) {
1395
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling updateErrorOnProject.");
1396
+ }
1397
+ const localVarPath = `/projects/{project_id}/errors/{error_id}`
1398
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1399
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
1400
+ const localVarUrlObj = url.parse(localVarPath, true);
1401
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
1402
+ const localVarHeaderParameter = {};
1403
+ const localVarQueryParameter = {};
1404
+ // authentication tokenAuth required
1405
+ if (configuration && configuration.apiKey) {
1406
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1407
+ ? configuration.apiKey("Authorization")
1408
+ : configuration.apiKey;
1409
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1410
+ }
1411
+ localVarHeaderParameter["Content-Type"] = "application/json";
1412
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1413
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1414
+ localVarUrlObj.search = null;
1415
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1416
+ const needsSerialization = "ErrorUpdateRequest" !== "string" ||
1417
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1418
+ localVarRequestOptions.body = needsSerialization
1419
+ ? JSON.stringify(body || {})
1420
+ : body || "";
1421
+ return {
1422
+ url: url.format(localVarUrlObj),
1423
+ options: localVarRequestOptions,
1424
+ };
1425
+ },
1426
+ /**
1427
+ *
1428
+ * @summary View an Error
1429
+ * @param {string} projectId
1430
+ * @param {string} errorId
1431
+ * @param {*} [options] Override http request option.
1432
+ * @throws {RequiredError}
1433
+ */
1434
+ viewErrorOnProject(projectId, errorId, options = {}) {
1435
+ // verify required parameter 'projectId' is not null or undefined
1436
+ if (projectId === null || projectId === undefined) {
1437
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling viewErrorOnProject.");
1438
+ }
1439
+ // verify required parameter 'errorId' is not null or undefined
1440
+ if (errorId === null || errorId === undefined) {
1441
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling viewErrorOnProject.");
1442
+ }
1443
+ const localVarPath = `/projects/{project_id}/errors/{error_id}`
1444
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1445
+ .replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
1446
+ const localVarUrlObj = url.parse(localVarPath, true);
1447
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1448
+ const localVarHeaderParameter = {};
1449
+ const localVarQueryParameter = {};
1450
+ // authentication tokenAuth required
1451
+ if (configuration && configuration.apiKey) {
1452
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1453
+ ? configuration.apiKey("Authorization")
1454
+ : configuration.apiKey;
1455
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1456
+ }
1457
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1458
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1459
+ localVarUrlObj.search = null;
1460
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1461
+ return {
1462
+ url: url.format(localVarUrlObj),
1463
+ options: localVarRequestOptions,
1464
+ };
1465
+ },
1466
+ /**
1467
+ * Note that event objects can include custom metadata and diagnostic fields configured directly in your app or added by the notifier library. The API preserves the original casing and key format as received, so any casing, including both snake_case and camelCase, may be valid for some fields.
1468
+ * @summary View an Event
1469
+ * @param {string} projectId
1470
+ * @param {string} eventId
1471
+ * @param {*} [options] Override http request option.
1472
+ * @throws {RequiredError}
1473
+ */
1474
+ viewEventById(projectId, eventId, options = {}) {
1475
+ // verify required parameter 'projectId' is not null or undefined
1476
+ if (projectId === null || projectId === undefined) {
1477
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling viewEventById.");
1478
+ }
1479
+ // verify required parameter 'eventId' is not null or undefined
1480
+ if (eventId === null || eventId === undefined) {
1481
+ throw new RequiredError("eventId", "Required parameter eventId was null or undefined when calling viewEventById.");
1482
+ }
1483
+ const localVarPath = `/projects/{project_id}/events/{event_id}`
1484
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1485
+ .replace(`{${"event_id"}}`, encodeURIComponent(String(eventId)));
1486
+ const localVarUrlObj = url.parse(localVarPath, true);
1487
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1488
+ const localVarHeaderParameter = {};
1489
+ const localVarQueryParameter = {};
1490
+ // authentication tokenAuth required
1491
+ if (configuration && configuration.apiKey) {
1492
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1493
+ ? configuration.apiKey("Authorization")
1494
+ : configuration.apiKey;
1495
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1496
+ }
1497
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1498
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1499
+ localVarUrlObj.search = null;
1500
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1501
+ return {
1502
+ url: url.format(localVarUrlObj),
1503
+ options: localVarRequestOptions,
1504
+ };
1505
+ },
1506
+ /**
1507
+ *
1508
+ * @summary View the latest Event on an Error
1509
+ * @param {string} errorId
1510
+ * @param {*} [options] Override http request option.
1511
+ * @throws {RequiredError}
1512
+ */
1513
+ viewLatestEventOnError(errorId, options = {}) {
1514
+ // verify required parameter 'errorId' is not null or undefined
1515
+ if (errorId === null || errorId === undefined) {
1516
+ throw new RequiredError("errorId", "Required parameter errorId was null or undefined when calling viewLatestEventOnError.");
1517
+ }
1518
+ const localVarPath = `/errors/{error_id}/latest_event`.replace(`{${"error_id"}}`, encodeURIComponent(String(errorId)));
1519
+ const localVarUrlObj = url.parse(localVarPath, true);
1520
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1521
+ const localVarHeaderParameter = {};
1522
+ const localVarQueryParameter = {};
1523
+ // authentication tokenAuth required
1524
+ if (configuration && configuration.apiKey) {
1525
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1526
+ ? configuration.apiKey("Authorization")
1527
+ : configuration.apiKey;
1528
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1529
+ }
1530
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1531
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1532
+ localVarUrlObj.search = null;
1533
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1534
+ return {
1535
+ url: url.format(localVarUrlObj),
1536
+ options: localVarRequestOptions,
1537
+ };
1538
+ },
1539
+ });
1540
+ /**
1541
+ * ProjectsApi - fetch parameter creator
1542
+ * @export
1543
+ */
1544
+ export const ProjectsApiFetchParamCreator = (configuration) => ({
1545
+ /**
1546
+ *
1547
+ * @summary Confirm an event deletion request
1548
+ * @param {string} projectId ID of the project of the deletion request
1549
+ * @param {string} id ID of the deletion request
1550
+ * @param {*} [options] Override http request option.
1551
+ * @throws {RequiredError}
1552
+ */
1553
+ confirmProjectEventDataDeletion(projectId, id, options = {}) {
1554
+ // verify required parameter 'projectId' is not null or undefined
1555
+ if (projectId === null || projectId === undefined) {
1556
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling confirmProjectEventDataDeletion.");
1557
+ }
1558
+ // verify required parameter 'id' is not null or undefined
1559
+ if (id === null || id === undefined) {
1560
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling confirmProjectEventDataDeletion.");
1561
+ }
1562
+ const localVarPath = `/projects/{project_id}/event_data_deletions/{id}/confirm`
1563
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1564
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1565
+ const localVarUrlObj = url.parse(localVarPath, true);
1566
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1567
+ const localVarHeaderParameter = {};
1568
+ const localVarQueryParameter = {};
1569
+ // authentication tokenAuth required
1570
+ if (configuration && configuration.apiKey) {
1571
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1572
+ ? configuration.apiKey("Authorization")
1573
+ : configuration.apiKey;
1574
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1575
+ }
1576
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1577
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1578
+ localVarUrlObj.search = null;
1579
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1580
+ return {
1581
+ url: url.format(localVarUrlObj),
1582
+ options: localVarRequestOptions,
1583
+ };
1584
+ },
1585
+ /**
1586
+ *
1587
+ * @summary Create a Project in an Organization
1588
+ * @param {ProjectCreateRequest} body
1589
+ * @param {string} organizationId ID of the organization
1590
+ * @param {*} [options] Override http request option.
1591
+ * @throws {RequiredError}
1592
+ */
1593
+ createOrganizationProject(body, organizationId, options = {}) {
1594
+ // verify required parameter 'body' is not null or undefined
1595
+ if (body === null || body === undefined) {
1596
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling createOrganizationProject.");
1597
+ }
1598
+ // verify required parameter 'organizationId' is not null or undefined
1599
+ if (organizationId === null || organizationId === undefined) {
1600
+ throw new RequiredError("organizationId", "Required parameter organizationId was null or undefined when calling createOrganizationProject.");
1601
+ }
1602
+ const localVarPath = `/organizations/{organization_id}/projects`.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
1603
+ const localVarUrlObj = url.parse(localVarPath, true);
1604
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1605
+ const localVarHeaderParameter = {};
1606
+ const localVarQueryParameter = {};
1607
+ // authentication tokenAuth required
1608
+ if (configuration && configuration.apiKey) {
1609
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1610
+ ? configuration.apiKey("Authorization")
1611
+ : configuration.apiKey;
1612
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1613
+ }
1614
+ localVarHeaderParameter["Content-Type"] = "application/json";
1615
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1616
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1617
+ localVarUrlObj.search = null;
1618
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1619
+ const needsSerialization = "ProjectCreateRequest" !== "string" ||
1620
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1621
+ localVarRequestOptions.body = needsSerialization
1622
+ ? JSON.stringify(body || {})
1623
+ : body || "";
1624
+ return {
1625
+ url: url.format(localVarUrlObj),
1626
+ options: localVarRequestOptions,
1627
+ };
1628
+ },
1629
+ /**
1630
+ * Creates a request to asynchronously delete events for the project. Note that filters such as `user.email` and `user.name` use substring matching, so using the `user.id` filter will be more appropriate for deleting events for 1 specific user.
1631
+ * @summary Create an event deletion request
1632
+ * @param {ProjectIdEventDataDeletionsBody} body
1633
+ * @param {string} projectId ID of the project to delete events from
1634
+ * @param {*} [options] Override http request option.
1635
+ * @throws {RequiredError}
1636
+ */
1637
+ createProjectEventDataDeletion(body, projectId, options = {}) {
1638
+ // verify required parameter 'body' is not null or undefined
1639
+ if (body === null || body === undefined) {
1640
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling createProjectEventDataDeletion.");
1641
+ }
1642
+ // verify required parameter 'projectId' is not null or undefined
1643
+ if (projectId === null || projectId === undefined) {
1644
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling createProjectEventDataDeletion.");
1645
+ }
1646
+ const localVarPath = `/projects/{project_id}/event_data_deletions`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1647
+ const localVarUrlObj = url.parse(localVarPath, true);
1648
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1649
+ const localVarHeaderParameter = {};
1650
+ const localVarQueryParameter = {};
1651
+ // authentication tokenAuth required
1652
+ if (configuration && configuration.apiKey) {
1653
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1654
+ ? configuration.apiKey("Authorization")
1655
+ : configuration.apiKey;
1656
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1657
+ }
1658
+ localVarHeaderParameter["Content-Type"] = "application/json";
1659
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1660
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1661
+ localVarUrlObj.search = null;
1662
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1663
+ const needsSerialization = "ProjectIdEventDataDeletionsBody" !== "string" ||
1664
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1665
+ localVarRequestOptions.body = needsSerialization
1666
+ ? JSON.stringify(body || {})
1667
+ : body || "";
1668
+ return {
1669
+ url: url.format(localVarUrlObj),
1670
+ options: localVarRequestOptions,
1671
+ };
1672
+ },
1673
+ /**
1674
+ * Request event data for the given project. This request will start an asynchronous job to collate all event data present at the time of the request and return a URL where you can download the data when the job is complete. These endpoints are intended for bulk download of events. If you want to query events, use the Events APIs instead. User data will not be included in the bulk download unless the request's `report_type` attribute is set to `gdpr`. With the `report_type` set to `gdpr` Bugsnag will only return user-related metadata.
1675
+ * @summary Create an event data request
1676
+ * @param {ProjectIdEventDataRequestsBody} body
1677
+ * @param {string} projectId ID of the project to request events for
1678
+ * @param {*} [options] Override http request option.
1679
+ * @throws {RequiredError}
1680
+ */
1681
+ createProjectEventDataRequest(body, projectId, options = {}) {
1682
+ // verify required parameter 'body' is not null or undefined
1683
+ if (body === null || body === undefined) {
1684
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling createProjectEventDataRequest.");
1685
+ }
1686
+ // verify required parameter 'projectId' is not null or undefined
1687
+ if (projectId === null || projectId === undefined) {
1688
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling createProjectEventDataRequest.");
1689
+ }
1690
+ const localVarPath = `/projects/{project_id}/event_data_requests`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1691
+ const localVarUrlObj = url.parse(localVarPath, true);
1692
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1693
+ const localVarHeaderParameter = {};
1694
+ const localVarQueryParameter = {};
1695
+ // authentication tokenAuth required
1696
+ if (configuration && configuration.apiKey) {
1697
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1698
+ ? configuration.apiKey("Authorization")
1699
+ : configuration.apiKey;
1700
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1701
+ }
1702
+ localVarHeaderParameter["Content-Type"] = "application/json";
1703
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1704
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1705
+ localVarUrlObj.search = null;
1706
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1707
+ const needsSerialization = "ProjectIdEventDataRequestsBody" !== "string" ||
1708
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1709
+ localVarRequestOptions.body = needsSerialization
1710
+ ? JSON.stringify(body || {})
1711
+ : body || "";
1712
+ return {
1713
+ url: url.format(localVarUrlObj),
1714
+ options: localVarRequestOptions,
1715
+ };
1716
+ },
1717
+ /**
1718
+ *
1719
+ * @summary Create a custom Event Field
1720
+ * @param {EventFieldCreateRequest} body
1721
+ * @param {string} projectId ID of the Project
1722
+ * @param {*} [options] Override http request option.
1723
+ * @throws {RequiredError}
1724
+ */
1725
+ createProjectEventField(body, projectId, options = {}) {
1726
+ // verify required parameter 'body' is not null or undefined
1727
+ if (body === null || body === undefined) {
1728
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling createProjectEventField.");
1729
+ }
1730
+ // verify required parameter 'projectId' is not null or undefined
1731
+ if (projectId === null || projectId === undefined) {
1732
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling createProjectEventField.");
1733
+ }
1734
+ const localVarPath = `/projects/{project_id}/event_fields`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1735
+ const localVarUrlObj = url.parse(localVarPath, true);
1736
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1737
+ const localVarHeaderParameter = {};
1738
+ const localVarQueryParameter = {};
1739
+ // authentication tokenAuth required
1740
+ if (configuration && configuration.apiKey) {
1741
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1742
+ ? configuration.apiKey("Authorization")
1743
+ : configuration.apiKey;
1744
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1745
+ }
1746
+ localVarHeaderParameter["Content-Type"] = "application/json";
1747
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1748
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1749
+ localVarUrlObj.search = null;
1750
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1751
+ const needsSerialization = "EventFieldCreateRequest" !== "string" ||
1752
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1753
+ localVarRequestOptions.body = needsSerialization
1754
+ ? JSON.stringify(body || {})
1755
+ : body || "";
1756
+ return {
1757
+ url: url.format(localVarUrlObj),
1758
+ options: localVarRequestOptions,
1759
+ };
1760
+ },
1761
+ /**
1762
+ *
1763
+ * @summary Star a Feature Flag
1764
+ * @param {ProjectIdStarredFeatureFlagsBody} body
1765
+ * @param {string} projectId ID of the Project.
1766
+ * @param {*} [options] Override http request option.
1767
+ * @throws {RequiredError}
1768
+ */
1769
+ createUserStarredFeatureFlag(body, projectId, options = {}) {
1770
+ // verify required parameter 'body' is not null or undefined
1771
+ if (body === null || body === undefined) {
1772
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling createUserStarredFeatureFlag.");
1773
+ }
1774
+ // verify required parameter 'projectId' is not null or undefined
1775
+ if (projectId === null || projectId === undefined) {
1776
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling createUserStarredFeatureFlag.");
1777
+ }
1778
+ const localVarPath = `/user/projects/{project_id}/starred_feature_flags`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1779
+ const localVarUrlObj = url.parse(localVarPath, true);
1780
+ const localVarRequestOptions = Object.assign({ method: "POST" }, options);
1781
+ const localVarHeaderParameter = {};
1782
+ const localVarQueryParameter = {};
1783
+ // authentication tokenAuth required
1784
+ if (configuration && configuration.apiKey) {
1785
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1786
+ ? configuration.apiKey("Authorization")
1787
+ : configuration.apiKey;
1788
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1789
+ }
1790
+ localVarHeaderParameter["Content-Type"] = "application/json";
1791
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1792
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1793
+ localVarUrlObj.search = null;
1794
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1795
+ const needsSerialization = "ProjectIdStarredFeatureFlagsBody" !== "string" ||
1796
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
1797
+ localVarRequestOptions.body = needsSerialization
1798
+ ? JSON.stringify(body || {})
1799
+ : body || "";
1800
+ return {
1801
+ url: url.format(localVarUrlObj),
1802
+ options: localVarRequestOptions,
1803
+ };
1804
+ },
1805
+ /**
1806
+ *
1807
+ * @summary Delete a Project
1808
+ * @param {string} projectId ID of the project
1809
+ * @param {*} [options] Override http request option.
1810
+ * @throws {RequiredError}
1811
+ */
1812
+ deleteProject(projectId, options = {}) {
1813
+ // verify required parameter 'projectId' is not null or undefined
1814
+ if (projectId === null || projectId === undefined) {
1815
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteProject.");
1816
+ }
1817
+ const localVarPath = `/projects/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
1818
+ const localVarUrlObj = url.parse(localVarPath, true);
1819
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
1820
+ const localVarHeaderParameter = {};
1821
+ const localVarQueryParameter = {};
1822
+ // authentication tokenAuth required
1823
+ if (configuration && configuration.apiKey) {
1824
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1825
+ ? configuration.apiKey("Authorization")
1826
+ : configuration.apiKey;
1827
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1828
+ }
1829
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1830
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1831
+ localVarUrlObj.search = null;
1832
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1833
+ return {
1834
+ url: url.format(localVarUrlObj),
1835
+ options: localVarRequestOptions,
1836
+ };
1837
+ },
1838
+ /**
1839
+ *
1840
+ * @summary Delete a custom Event Field
1841
+ * @param {string} projectId ID of the Project
1842
+ * @param {string} displayId human friendly ID for the EventField
1843
+ * @param {*} [options] Override http request option.
1844
+ * @throws {RequiredError}
1845
+ */
1846
+ deleteProjectEventFieldByDisplayId(projectId, displayId, options = {}) {
1847
+ // verify required parameter 'projectId' is not null or undefined
1848
+ if (projectId === null || projectId === undefined) {
1849
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteProjectEventFieldByDisplayId.");
1850
+ }
1851
+ // verify required parameter 'displayId' is not null or undefined
1852
+ if (displayId === null || displayId === undefined) {
1853
+ throw new RequiredError("displayId", "Required parameter displayId was null or undefined when calling deleteProjectEventFieldByDisplayId.");
1854
+ }
1855
+ const localVarPath = `/projects/{project_id}/event_fields/{display_id}`
1856
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1857
+ .replace(`{${"display_id"}}`, encodeURIComponent(String(displayId)));
1858
+ const localVarUrlObj = url.parse(localVarPath, true);
1859
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
1860
+ const localVarHeaderParameter = {};
1861
+ const localVarQueryParameter = {};
1862
+ // authentication tokenAuth required
1863
+ if (configuration && configuration.apiKey) {
1864
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1865
+ ? configuration.apiKey("Authorization")
1866
+ : configuration.apiKey;
1867
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1868
+ }
1869
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1870
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1871
+ localVarUrlObj.search = null;
1872
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1873
+ return {
1874
+ url: url.format(localVarUrlObj),
1875
+ options: localVarRequestOptions,
1876
+ };
1877
+ },
1878
+ /**
1879
+ *
1880
+ * @summary Delete a Feature Flag
1881
+ * @param {string} projectId ID of the Project.
1882
+ * @param {string} id ID of the Feature Flag to unstar.
1883
+ * @param {*} [options] Override http request option.
1884
+ * @throws {RequiredError}
1885
+ */
1886
+ deleteProjectFeatureFlag(projectId, id, options = {}) {
1887
+ // verify required parameter 'projectId' is not null or undefined
1888
+ if (projectId === null || projectId === undefined) {
1889
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteProjectFeatureFlag.");
1890
+ }
1891
+ // verify required parameter 'id' is not null or undefined
1892
+ if (id === null || id === undefined) {
1893
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling deleteProjectFeatureFlag.");
1894
+ }
1895
+ const localVarPath = `/projects/{project_id}/feature_flags/{id}`
1896
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1897
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1898
+ const localVarUrlObj = url.parse(localVarPath, true);
1899
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
1900
+ const localVarHeaderParameter = {};
1901
+ const localVarQueryParameter = {};
1902
+ // authentication tokenAuth required
1903
+ if (configuration && configuration.apiKey) {
1904
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1905
+ ? configuration.apiKey("Authorization")
1906
+ : configuration.apiKey;
1907
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1908
+ }
1909
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1910
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1911
+ localVarUrlObj.search = null;
1912
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1913
+ return {
1914
+ url: url.format(localVarUrlObj),
1915
+ options: localVarRequestOptions,
1916
+ };
1917
+ },
1918
+ /**
1919
+ *
1920
+ * @summary Unstar a Feature Flag
1921
+ * @param {string} projectId ID of the Project.
1922
+ * @param {string} id ID of the Feature Flag to unstar.
1923
+ * @param {*} [options] Override http request option.
1924
+ * @throws {RequiredError}
1925
+ */
1926
+ deleteUserProjectStarredFeatureFlag(projectId, id, options = {}) {
1927
+ // verify required parameter 'projectId' is not null or undefined
1928
+ if (projectId === null || projectId === undefined) {
1929
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling deleteUserProjectStarredFeatureFlag.");
1930
+ }
1931
+ // verify required parameter 'id' is not null or undefined
1932
+ if (id === null || id === undefined) {
1933
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling deleteUserProjectStarredFeatureFlag.");
1934
+ }
1935
+ const localVarPath = `/user/projects/{project_id}/starred_feature_flags/{id}`
1936
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
1937
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1938
+ const localVarUrlObj = url.parse(localVarPath, true);
1939
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
1940
+ const localVarHeaderParameter = {};
1941
+ const localVarQueryParameter = {};
1942
+ // authentication tokenAuth required
1943
+ if (configuration && configuration.apiKey) {
1944
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1945
+ ? configuration.apiKey("Authorization")
1946
+ : configuration.apiKey;
1947
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1948
+ }
1949
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1950
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1951
+ localVarUrlObj.search = null;
1952
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
1953
+ return {
1954
+ url: url.format(localVarUrlObj),
1955
+ options: localVarRequestOptions,
1956
+ };
1957
+ },
1958
+ /**
1959
+ * Returns a list of projects for the given organization.
1960
+ * @summary List an Organization's Projects
1961
+ * @param {string} organizationId the ID of the organization
1962
+ * @param {string} [q] Search projects with names matching parameter
1963
+ * @param {string} [sort] Which field to sort the results by
1964
+ * @param {string} [direction] Which direction to sort the results by. Defaults to &#x60;desc&#x60; for all sorts except &#x60;favorite&#x60;. Defaults to &#x60;asc&#x60; if sorting by &#x60;favorite&#x60; (cannot sort &#x60;favorite&#x60;s &#x60;desc&#x60;).
1965
+ * @param {number} [perPage] How many results to return per page
1966
+ * @param {*} [options] Override http request option.
1967
+ * @throws {RequiredError}
1968
+ */
1969
+ getOrganizationProjects(organizationId, q, sort, direction, perPage, options = {}) {
1970
+ // verify required parameter 'organizationId' is not null or undefined
1971
+ if (organizationId === null || organizationId === undefined) {
1972
+ throw new RequiredError("organizationId", "Required parameter organizationId was null or undefined when calling getOrganizationProjects.");
1973
+ }
1974
+ const localVarPath = `/organizations/{organization_id}/projects`.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId)));
1975
+ const localVarUrlObj = url.parse(localVarPath, true);
1976
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
1977
+ const localVarHeaderParameter = {};
1978
+ const localVarQueryParameter = {};
1979
+ // authentication tokenAuth required
1980
+ if (configuration && configuration.apiKey) {
1981
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
1982
+ ? configuration.apiKey("Authorization")
1983
+ : configuration.apiKey;
1984
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
1985
+ }
1986
+ if (q !== undefined) {
1987
+ localVarQueryParameter["q"] = q;
1988
+ }
1989
+ if (sort !== undefined) {
1990
+ localVarQueryParameter["sort"] = sort;
1991
+ }
1992
+ if (direction !== undefined) {
1993
+ localVarQueryParameter["direction"] = direction;
1994
+ }
1995
+ if (perPage !== undefined) {
1996
+ localVarQueryParameter["per_page"] = perPage;
1997
+ }
1998
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
1999
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2000
+ localVarUrlObj.search = null;
2001
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2002
+ return {
2003
+ url: url.format(localVarUrlObj),
2004
+ options: localVarRequestOptions,
2005
+ };
2006
+ },
2007
+ /**
2008
+ *
2009
+ * @summary View a Project
2010
+ * @param {string} projectId ID of the project
2011
+ * @param {*} [options] Override http request option.
2012
+ * @throws {RequiredError}
2013
+ */
2014
+ getProject(projectId, options = {}) {
2015
+ // verify required parameter 'projectId' is not null or undefined
2016
+ if (projectId === null || projectId === undefined) {
2017
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProject.");
2018
+ }
2019
+ const localVarPath = `/projects/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2020
+ const localVarUrlObj = url.parse(localVarPath, true);
2021
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2022
+ const localVarHeaderParameter = {};
2023
+ const localVarQueryParameter = {};
2024
+ // authentication tokenAuth required
2025
+ if (configuration && configuration.apiKey) {
2026
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2027
+ ? configuration.apiKey("Authorization")
2028
+ : configuration.apiKey;
2029
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2030
+ }
2031
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2032
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2033
+ localVarUrlObj.search = null;
2034
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2035
+ return {
2036
+ url: url.format(localVarUrlObj),
2037
+ options: localVarRequestOptions,
2038
+ };
2039
+ },
2040
+ /**
2041
+ *
2042
+ * @summary Check the status of an event deletion request
2043
+ * @param {string} projectId ID of the project of the deletion request
2044
+ * @param {string} id ID of the deletion request
2045
+ * @param {*} [options] Override http request option.
2046
+ * @throws {RequiredError}
2047
+ */
2048
+ getProjectEventDataDeletionById(projectId, id, options = {}) {
2049
+ // verify required parameter 'projectId' is not null or undefined
2050
+ if (projectId === null || projectId === undefined) {
2051
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectEventDataDeletionById.");
2052
+ }
2053
+ // verify required parameter 'id' is not null or undefined
2054
+ if (id === null || id === undefined) {
2055
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectEventDataDeletionById.");
2056
+ }
2057
+ const localVarPath = `/projects/{project_id}/event_data_deletions/{id}`
2058
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2059
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2060
+ const localVarUrlObj = url.parse(localVarPath, true);
2061
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2062
+ const localVarHeaderParameter = {};
2063
+ const localVarQueryParameter = {};
2064
+ // authentication tokenAuth required
2065
+ if (configuration && configuration.apiKey) {
2066
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2067
+ ? configuration.apiKey("Authorization")
2068
+ : configuration.apiKey;
2069
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2070
+ }
2071
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2072
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2073
+ localVarUrlObj.search = null;
2074
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2075
+ return {
2076
+ url: url.format(localVarUrlObj),
2077
+ options: localVarRequestOptions,
2078
+ };
2079
+ },
2080
+ /**
2081
+ *
2082
+ * @summary Check the status of an event data request
2083
+ * @param {string} projectId ID of the project of the event data request
2084
+ * @param {string} id ID of the event data request
2085
+ * @param {*} [options] Override http request option.
2086
+ * @throws {RequiredError}
2087
+ */
2088
+ getProjectEventDataRequestById(projectId, id, options = {}) {
2089
+ // verify required parameter 'projectId' is not null or undefined
2090
+ if (projectId === null || projectId === undefined) {
2091
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectEventDataRequestById.");
2092
+ }
2093
+ // verify required parameter 'id' is not null or undefined
2094
+ if (id === null || id === undefined) {
2095
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectEventDataRequestById.");
2096
+ }
2097
+ const localVarPath = `/projects/{project_id}/event_data_requests/{id}`
2098
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2099
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2100
+ const localVarUrlObj = url.parse(localVarPath, true);
2101
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2102
+ const localVarHeaderParameter = {};
2103
+ const localVarQueryParameter = {};
2104
+ // authentication tokenAuth required
2105
+ if (configuration && configuration.apiKey) {
2106
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2107
+ ? configuration.apiKey("Authorization")
2108
+ : configuration.apiKey;
2109
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2110
+ }
2111
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2112
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2113
+ localVarUrlObj.search = null;
2114
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2115
+ return {
2116
+ url: url.format(localVarUrlObj),
2117
+ options: localVarRequestOptions,
2118
+ };
2119
+ },
2120
+ /**
2121
+ *
2122
+ * @summary Get a Feature Flag
2123
+ * @param {string} id ID of the FeatureFlag.
2124
+ * @param {string} projectId ID of the Project.
2125
+ * @param {string} releaseStageName Release stage name to get the feature flags for.
2126
+ * @param {boolean} [includeVariantSummary] Whether to include a summary of the Variants for the Feature Flag.
2127
+ * @param {*} [options] Override http request option.
2128
+ * @throws {RequiredError}
2129
+ */
2130
+ getProjectFeatureFlag(id, projectId, releaseStageName, includeVariantSummary, options = {}) {
2131
+ // verify required parameter 'id' is not null or undefined
2132
+ if (id === null || id === undefined) {
2133
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectFeatureFlag.");
2134
+ }
2135
+ // verify required parameter 'projectId' is not null or undefined
2136
+ if (projectId === null || projectId === undefined) {
2137
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectFeatureFlag.");
2138
+ }
2139
+ // verify required parameter 'releaseStageName' is not null or undefined
2140
+ if (releaseStageName === null || releaseStageName === undefined) {
2141
+ throw new RequiredError("releaseStageName", "Required parameter releaseStageName was null or undefined when calling getProjectFeatureFlag.");
2142
+ }
2143
+ const localVarPath = `/projects/{project_id}/feature_flags/{id}`
2144
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2145
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2146
+ const localVarUrlObj = url.parse(localVarPath, true);
2147
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2148
+ const localVarHeaderParameter = {};
2149
+ const localVarQueryParameter = {};
2150
+ // authentication tokenAuth required
2151
+ if (configuration && configuration.apiKey) {
2152
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2153
+ ? configuration.apiKey("Authorization")
2154
+ : configuration.apiKey;
2155
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2156
+ }
2157
+ if (releaseStageName !== undefined) {
2158
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2159
+ }
2160
+ if (includeVariantSummary !== undefined) {
2161
+ localVarQueryParameter["include_variant_summary"] = includeVariantSummary;
2162
+ }
2163
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2164
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2165
+ localVarUrlObj.search = null;
2166
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2167
+ return {
2168
+ url: url.format(localVarUrlObj),
2169
+ options: localVarRequestOptions,
2170
+ };
2171
+ },
2172
+ /**
2173
+ *
2174
+ * @summary Get a Feature Flag's Error Overview
2175
+ * @param {string} id ID of the FeatureFlag.
2176
+ * @param {string} projectId ID of the Project.
2177
+ * @param {string} releaseStageName Release stage name to get the feature flags for.
2178
+ * @param {*} [options] Override http request option.
2179
+ * @throws {RequiredError}
2180
+ */
2181
+ getProjectFeatureFlagErrorOverview(id, projectId, releaseStageName, options = {}) {
2182
+ // verify required parameter 'id' is not null or undefined
2183
+ if (id === null || id === undefined) {
2184
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectFeatureFlagErrorOverview.");
2185
+ }
2186
+ // verify required parameter 'projectId' is not null or undefined
2187
+ if (projectId === null || projectId === undefined) {
2188
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectFeatureFlagErrorOverview.");
2189
+ }
2190
+ // verify required parameter 'releaseStageName' is not null or undefined
2191
+ if (releaseStageName === null || releaseStageName === undefined) {
2192
+ throw new RequiredError("releaseStageName", "Required parameter releaseStageName was null or undefined when calling getProjectFeatureFlagErrorOverview.");
2193
+ }
2194
+ const localVarPath = `/projects/{project_id}/feature_flags/{id}/error_overview`
2195
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2196
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2197
+ const localVarUrlObj = url.parse(localVarPath, true);
2198
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2199
+ const localVarHeaderParameter = {};
2200
+ const localVarQueryParameter = {};
2201
+ // authentication tokenAuth required
2202
+ if (configuration && configuration.apiKey) {
2203
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2204
+ ? configuration.apiKey("Authorization")
2205
+ : configuration.apiKey;
2206
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2207
+ }
2208
+ if (releaseStageName !== undefined) {
2209
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2210
+ }
2211
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2212
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2213
+ localVarUrlObj.search = null;
2214
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2215
+ return {
2216
+ url: url.format(localVarUrlObj),
2217
+ options: localVarRequestOptions,
2218
+ };
2219
+ },
2220
+ /**
2221
+ *
2222
+ * @summary List Variants on a Feature Flag by ID
2223
+ * @param {string} id ID of the feature flag.
2224
+ * @param {string} projectId ID of the project.
2225
+ * @param {string} [releaseStageName] Release stage name to get the variants for.
2226
+ * @param {string} [q] Search for feature flags with a name matching this query parameter. Supports case-insensitive substring matching.
2227
+ * @param {number} [perPage] How many results to return per page.
2228
+ * @param {*} [options] Override http request option.
2229
+ * @throws {RequiredError}
2230
+ */
2231
+ getProjectFeatureFlagVariants(id, projectId, releaseStageName, q, perPage, options = {}) {
2232
+ // verify required parameter 'id' is not null or undefined
2233
+ if (id === null || id === undefined) {
2234
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectFeatureFlagVariants.");
2235
+ }
2236
+ // verify required parameter 'projectId' is not null or undefined
2237
+ if (projectId === null || projectId === undefined) {
2238
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectFeatureFlagVariants.");
2239
+ }
2240
+ const localVarPath = `/projects/{project_id}/feature_flags/{id}/variants`
2241
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2242
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2243
+ const localVarUrlObj = url.parse(localVarPath, true);
2244
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2245
+ const localVarHeaderParameter = {};
2246
+ const localVarQueryParameter = {};
2247
+ // authentication tokenAuth required
2248
+ if (configuration && configuration.apiKey) {
2249
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2250
+ ? configuration.apiKey("Authorization")
2251
+ : configuration.apiKey;
2252
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2253
+ }
2254
+ if (releaseStageName !== undefined) {
2255
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2256
+ }
2257
+ if (q !== undefined) {
2258
+ localVarQueryParameter["q"] = q;
2259
+ }
2260
+ if (perPage !== undefined) {
2261
+ localVarQueryParameter["per_page"] = perPage;
2262
+ }
2263
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2264
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2265
+ localVarUrlObj.search = null;
2266
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2267
+ return {
2268
+ url: url.format(localVarUrlObj),
2269
+ options: localVarRequestOptions,
2270
+ };
2271
+ },
2272
+ /**
2273
+ *
2274
+ * @summary List Variants on a Feature Flag by name
2275
+ * @param {string} name Name of the feature flag, case-sensitive and with no substring matching.
2276
+ * @param {string} projectId ID of the project.
2277
+ * @param {string} [releaseStageName] Release stage name to get the variants for.
2278
+ * @param {string} [q] Search for feature flag variants with a name matching this query parameter. Supports case-insensitive substring matching.
2279
+ * @param {number} [perPage] How many results to return per page.
2280
+ * @param {*} [options] Override http request option.
2281
+ * @throws {RequiredError}
2282
+ */
2283
+ getProjectFeatureFlagVariantsByName(name, projectId, releaseStageName, q, perPage, options = {}) {
2284
+ // verify required parameter 'name' is not null or undefined
2285
+ if (name === null || name === undefined) {
2286
+ throw new RequiredError("name", "Required parameter name was null or undefined when calling getProjectFeatureFlagVariantsByName.");
2287
+ }
2288
+ // verify required parameter 'projectId' is not null or undefined
2289
+ if (projectId === null || projectId === undefined) {
2290
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectFeatureFlagVariantsByName.");
2291
+ }
2292
+ const localVarPath = `/projects/{project_id}/feature_flags/by_name/{name}/variants`
2293
+ .replace(`{${"name"}}`, encodeURIComponent(String(name)))
2294
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2295
+ const localVarUrlObj = url.parse(localVarPath, true);
2296
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2297
+ const localVarHeaderParameter = {};
2298
+ const localVarQueryParameter = {};
2299
+ // authentication tokenAuth required
2300
+ if (configuration && configuration.apiKey) {
2301
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2302
+ ? configuration.apiKey("Authorization")
2303
+ : configuration.apiKey;
2304
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2305
+ }
2306
+ if (releaseStageName !== undefined) {
2307
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2308
+ }
2309
+ if (q !== undefined) {
2310
+ localVarQueryParameter["q"] = q;
2311
+ }
2312
+ if (perPage !== undefined) {
2313
+ localVarQueryParameter["per_page"] = perPage;
2314
+ }
2315
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2316
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2317
+ localVarUrlObj.search = null;
2318
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2319
+ return {
2320
+ url: url.format(localVarUrlObj),
2321
+ options: localVarRequestOptions,
2322
+ };
2323
+ },
2324
+ /**
2325
+ *
2326
+ * @summary Get a Feature Flag Variant's Error Overview
2327
+ * @param {string} id ID of the FeatureFlag.
2328
+ * @param {string} projectId ID of the Project.
2329
+ * @param {Array<string>} variantIds IDs for the FeatureFlag variants.
2330
+ * @param {string} releaseStageName Release stage name to get the feature flags for.
2331
+ * @param {*} [options] Override http request option.
2332
+ * @throws {RequiredError}
2333
+ */
2334
+ getProjectFeatureFlagVariantsErrorOverview(id, projectId, variantIds, releaseStageName, options = {}) {
2335
+ // verify required parameter 'id' is not null or undefined
2336
+ if (id === null || id === undefined) {
2337
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectFeatureFlagVariantsErrorOverview.");
2338
+ }
2339
+ // verify required parameter 'projectId' is not null or undefined
2340
+ if (projectId === null || projectId === undefined) {
2341
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectFeatureFlagVariantsErrorOverview.");
2342
+ }
2343
+ // verify required parameter 'variantIds' is not null or undefined
2344
+ if (variantIds === null || variantIds === undefined) {
2345
+ throw new RequiredError("variantIds", "Required parameter variantIds was null or undefined when calling getProjectFeatureFlagVariantsErrorOverview.");
2346
+ }
2347
+ // verify required parameter 'releaseStageName' is not null or undefined
2348
+ if (releaseStageName === null || releaseStageName === undefined) {
2349
+ throw new RequiredError("releaseStageName", "Required parameter releaseStageName was null or undefined when calling getProjectFeatureFlagVariantsErrorOverview.");
2350
+ }
2351
+ const localVarPath = `/projects/{project_id}/feature_flags/{id}/variants/error_overview`
2352
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
2353
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2354
+ const localVarUrlObj = url.parse(localVarPath, true);
2355
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2356
+ const localVarHeaderParameter = {};
2357
+ const localVarQueryParameter = {};
2358
+ // authentication tokenAuth required
2359
+ if (configuration && configuration.apiKey) {
2360
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2361
+ ? configuration.apiKey("Authorization")
2362
+ : configuration.apiKey;
2363
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2364
+ }
2365
+ if (variantIds) {
2366
+ localVarQueryParameter["variant_ids"] = variantIds;
2367
+ }
2368
+ if (releaseStageName !== undefined) {
2369
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2370
+ }
2371
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2372
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2373
+ localVarUrlObj.search = null;
2374
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2375
+ return {
2376
+ url: url.format(localVarUrlObj),
2377
+ options: localVarRequestOptions,
2378
+ };
2379
+ },
2380
+ /**
2381
+ *
2382
+ * @summary List a Project's Network Grouping Ruleset
2383
+ * @param {string} projectId The ID of the Project to retrieve the endpoints for
2384
+ * @param {*} [options] Override http request option.
2385
+ * @throws {RequiredError}
2386
+ */
2387
+ getProjectNetworkGroupingRuleset(projectId, options = {}) {
2388
+ // verify required parameter 'projectId' is not null or undefined
2389
+ if (projectId === null || projectId === undefined) {
2390
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectNetworkGroupingRuleset.");
2391
+ }
2392
+ const localVarPath = `/projects/{project_id}/network_endpoint_grouping`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2393
+ const localVarUrlObj = url.parse(localVarPath, true);
2394
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2395
+ const localVarHeaderParameter = {};
2396
+ const localVarQueryParameter = {};
2397
+ // authentication tokenAuth required
2398
+ if (configuration && configuration.apiKey) {
2399
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2400
+ ? configuration.apiKey("Authorization")
2401
+ : configuration.apiKey;
2402
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2403
+ }
2404
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2405
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2406
+ localVarUrlObj.search = null;
2407
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2408
+ return {
2409
+ url: url.format(localVarUrlObj),
2410
+ options: localVarRequestOptions,
2411
+ };
2412
+ },
2413
+ /**
2414
+ *
2415
+ * @summary Show a Page Load Span Group by ID
2416
+ * @param {string} projectId The ID of the Project to which the Page Load Span Group belongs.
2417
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Page Load Span Group.
2418
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
2419
+ * @param {*} [options] Override http request option.
2420
+ * @throws {RequiredError}
2421
+ */
2422
+ getProjectPageLoadSpanGroupById(projectId, id, filters, options = {}) {
2423
+ // verify required parameter 'projectId' is not null or undefined
2424
+ if (projectId === null || projectId === undefined) {
2425
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectPageLoadSpanGroupById.");
2426
+ }
2427
+ // verify required parameter 'id' is not null or undefined
2428
+ if (id === null || id === undefined) {
2429
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectPageLoadSpanGroupById.");
2430
+ }
2431
+ const localVarPath = `/projects/{project_id}/page_load_span_groups/{id}`
2432
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2433
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2434
+ const localVarUrlObj = url.parse(localVarPath, true);
2435
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2436
+ const localVarHeaderParameter = {};
2437
+ const localVarQueryParameter = {};
2438
+ // authentication tokenAuth required
2439
+ if (configuration && configuration.apiKey) {
2440
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2441
+ ? configuration.apiKey("Authorization")
2442
+ : configuration.apiKey;
2443
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2444
+ }
2445
+ if (filters) {
2446
+ localVarQueryParameter["filters"] = filters;
2447
+ }
2448
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2449
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2450
+ localVarUrlObj.search = null;
2451
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2452
+ return {
2453
+ url: url.format(localVarUrlObj),
2454
+ options: localVarRequestOptions,
2455
+ };
2456
+ },
2457
+ /**
2458
+ *
2459
+ * @summary View a Release
2460
+ * @param {string} projectId ID of the Project
2461
+ * @param {string} releaseId ID of release to view
2462
+ * @param {*} [options] Override http request option.
2463
+ * @throws {RequiredError}
2464
+ */
2465
+ getProjectReleaseById(projectId, releaseId, options = {}) {
2466
+ // verify required parameter 'projectId' is not null or undefined
2467
+ if (projectId === null || projectId === undefined) {
2468
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectReleaseById.");
2469
+ }
2470
+ // verify required parameter 'releaseId' is not null or undefined
2471
+ if (releaseId === null || releaseId === undefined) {
2472
+ throw new RequiredError("releaseId", "Required parameter releaseId was null or undefined when calling getProjectReleaseById.");
2473
+ }
2474
+ const localVarPath = `/projects/{project_id}/releases/{release_id}`
2475
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2476
+ .replace(`{${"release_id"}}`, encodeURIComponent(String(releaseId)));
2477
+ const localVarUrlObj = url.parse(localVarPath, true);
2478
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2479
+ const localVarHeaderParameter = {};
2480
+ const localVarQueryParameter = {};
2481
+ // authentication tokenAuth required
2482
+ if (configuration && configuration.apiKey) {
2483
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2484
+ ? configuration.apiKey("Authorization")
2485
+ : configuration.apiKey;
2486
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2487
+ }
2488
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2489
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2490
+ localVarUrlObj.search = null;
2491
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2492
+ return {
2493
+ url: url.format(localVarUrlObj),
2494
+ options: localVarRequestOptions,
2495
+ };
2496
+ },
2497
+ /**
2498
+ * If there are no spans in the requested group, it will show a span group with an empty `statistics` attribute.
2499
+ * @summary Show a Span Group
2500
+ * @param {string} projectId The ID of the Project to which the Span Group belongs.
2501
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
2502
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
2503
+ * @param {*} [options] Override http request option.
2504
+ * @throws {RequiredError}
2505
+ */
2506
+ getProjectSpanGroup(projectId, id, filters, options = {}) {
2507
+ // verify required parameter 'projectId' is not null or undefined
2508
+ if (projectId === null || projectId === undefined) {
2509
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectSpanGroup.");
2510
+ }
2511
+ // verify required parameter 'id' is not null or undefined
2512
+ if (id === null || id === undefined) {
2513
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectSpanGroup.");
2514
+ }
2515
+ const localVarPath = `/projects/{project_id}/span_groups/{id}`
2516
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2517
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2518
+ const localVarUrlObj = url.parse(localVarPath, true);
2519
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2520
+ const localVarHeaderParameter = {};
2521
+ const localVarQueryParameter = {};
2522
+ // authentication tokenAuth required
2523
+ if (configuration && configuration.apiKey) {
2524
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2525
+ ? configuration.apiKey("Authorization")
2526
+ : configuration.apiKey;
2527
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2528
+ }
2529
+ if (filters) {
2530
+ localVarQueryParameter["filters"] = filters;
2531
+ }
2532
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2533
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2534
+ localVarUrlObj.search = null;
2535
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2536
+ return {
2537
+ url: url.format(localVarUrlObj),
2538
+ options: localVarRequestOptions,
2539
+ };
2540
+ },
2541
+ /**
2542
+ *
2543
+ * @summary Get a Span Group's distribution
2544
+ * @param {string} projectId The ID of the Project to which the Span Group belongs.
2545
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
2546
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
2547
+ * @param {*} [options] Override http request option.
2548
+ * @throws {RequiredError}
2549
+ */
2550
+ getProjectSpanGroupDistribution(projectId, id, filters, options = {}) {
2551
+ // verify required parameter 'projectId' is not null or undefined
2552
+ if (projectId === null || projectId === undefined) {
2553
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectSpanGroupDistribution.");
2554
+ }
2555
+ // verify required parameter 'id' is not null or undefined
2556
+ if (id === null || id === undefined) {
2557
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectSpanGroupDistribution.");
2558
+ }
2559
+ const localVarPath = `/projects/{project_id}/span_groups/{id}/distribution`
2560
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2561
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2562
+ const localVarUrlObj = url.parse(localVarPath, true);
2563
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2564
+ const localVarHeaderParameter = {};
2565
+ const localVarQueryParameter = {};
2566
+ // authentication tokenAuth required
2567
+ if (configuration && configuration.apiKey) {
2568
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2569
+ ? configuration.apiKey("Authorization")
2570
+ : configuration.apiKey;
2571
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2572
+ }
2573
+ if (filters) {
2574
+ localVarQueryParameter["filters"] = filters;
2575
+ }
2576
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2577
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2578
+ localVarUrlObj.search = null;
2579
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2580
+ return {
2581
+ url: url.format(localVarUrlObj),
2582
+ options: localVarRequestOptions,
2583
+ };
2584
+ },
2585
+ /**
2586
+ *
2587
+ * @summary Get a Span Group's timeline
2588
+ * @param {string} projectId The ID of the Project to which the Span Group belongs.
2589
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
2590
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
2591
+ * @param {*} [options] Override http request option.
2592
+ * @throws {RequiredError}
2593
+ */
2594
+ getProjectSpanGroupTimeline(projectId, id, filters, options = {}) {
2595
+ // verify required parameter 'projectId' is not null or undefined
2596
+ if (projectId === null || projectId === undefined) {
2597
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectSpanGroupTimeline.");
2598
+ }
2599
+ // verify required parameter 'id' is not null or undefined
2600
+ if (id === null || id === undefined) {
2601
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getProjectSpanGroupTimeline.");
2602
+ }
2603
+ const localVarPath = `/projects/{project_id}/span_groups/{id}/timeline`
2604
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2605
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2606
+ const localVarUrlObj = url.parse(localVarPath, true);
2607
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2608
+ const localVarHeaderParameter = {};
2609
+ const localVarQueryParameter = {};
2610
+ // authentication tokenAuth required
2611
+ if (configuration && configuration.apiKey) {
2612
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2613
+ ? configuration.apiKey("Authorization")
2614
+ : configuration.apiKey;
2615
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2616
+ }
2617
+ if (filters) {
2618
+ localVarQueryParameter["filters"] = filters;
2619
+ }
2620
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2621
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2622
+ localVarUrlObj.search = null;
2623
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2624
+ return {
2625
+ url: url.format(localVarUrlObj),
2626
+ options: localVarRequestOptions,
2627
+ };
2628
+ },
2629
+ /**
2630
+ * Request the trend of unhandled session information (grouped by UTC day) in the last 30 days for the project's primary release stage.
2631
+ * @summary View the stability trend for a project
2632
+ * @param {string} projectId ID of the project to retrieve stability information for
2633
+ * @param {*} [options] Override http request option.
2634
+ * @throws {RequiredError}
2635
+ */
2636
+ getProjectStabilityTrend(projectId, options = {}) {
2637
+ // verify required parameter 'projectId' is not null or undefined
2638
+ if (projectId === null || projectId === undefined) {
2639
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getProjectStabilityTrend.");
2640
+ }
2641
+ const localVarPath = `/projects/{project_id}/stability_trend`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2642
+ const localVarUrlObj = url.parse(localVarPath, true);
2643
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2644
+ const localVarHeaderParameter = {};
2645
+ const localVarQueryParameter = {};
2646
+ // authentication tokenAuth required
2647
+ if (configuration && configuration.apiKey) {
2648
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2649
+ ? configuration.apiKey("Authorization")
2650
+ : configuration.apiKey;
2651
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2652
+ }
2653
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2654
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2655
+ localVarUrlObj.search = null;
2656
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2657
+ return {
2658
+ url: url.format(localVarUrlObj),
2659
+ options: localVarRequestOptions,
2660
+ };
2661
+ },
2662
+ /**
2663
+ *
2664
+ * @summary Retrieve a Release Group
2665
+ * @param {string} id ID of release group to get
2666
+ * @param {*} [options] Override http request option.
2667
+ * @throws {RequiredError}
2668
+ */
2669
+ getReleaseGroup(id, options = {}) {
2670
+ // verify required parameter 'id' is not null or undefined
2671
+ if (id === null || id === undefined) {
2672
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling getReleaseGroup.");
2673
+ }
2674
+ const localVarPath = `/release_groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
2675
+ const localVarUrlObj = url.parse(localVarPath, true);
2676
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2677
+ const localVarHeaderParameter = {};
2678
+ const localVarQueryParameter = {};
2679
+ // authentication tokenAuth required
2680
+ if (configuration && configuration.apiKey) {
2681
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2682
+ ? configuration.apiKey("Authorization")
2683
+ : configuration.apiKey;
2684
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2685
+ }
2686
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2687
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2688
+ localVarUrlObj.search = null;
2689
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2690
+ return {
2691
+ url: url.format(localVarUrlObj),
2692
+ options: localVarRequestOptions,
2693
+ };
2694
+ },
2695
+ /**
2696
+ *
2697
+ * @summary Get Spans for a Span Group
2698
+ * @param {string} projectId The ID of the Project to which the spans belong.
2699
+ * @param {string} category The name of the Span Group Category.
2700
+ * @param {string} name The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) name of the Span Group.
2701
+ * @param {*} [options] Override http request option.
2702
+ * @throws {RequiredError}
2703
+ */
2704
+ getSpansByCategoryAndName(projectId, category, name, options = {}) {
2705
+ // verify required parameter 'projectId' is not null or undefined
2706
+ if (projectId === null || projectId === undefined) {
2707
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling getSpansByCategoryAndName.");
2708
+ }
2709
+ // verify required parameter 'category' is not null or undefined
2710
+ if (category === null || category === undefined) {
2711
+ throw new RequiredError("category", "Required parameter category was null or undefined when calling getSpansByCategoryAndName.");
2712
+ }
2713
+ // verify required parameter 'name' is not null or undefined
2714
+ if (name === null || name === undefined) {
2715
+ throw new RequiredError("name", "Required parameter name was null or undefined when calling getSpansByCategoryAndName.");
2716
+ }
2717
+ const localVarPath = `/projects/{project_id}/span_group_categories/{category}/span_groups/{name}/spans`
2718
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
2719
+ .replace(`{${"category"}}`, encodeURIComponent(String(category)))
2720
+ .replace(`{${"name"}}`, encodeURIComponent(String(name)));
2721
+ const localVarUrlObj = url.parse(localVarPath, true);
2722
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2723
+ const localVarHeaderParameter = {};
2724
+ const localVarQueryParameter = {};
2725
+ // authentication tokenAuth required
2726
+ if (configuration && configuration.apiKey) {
2727
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2728
+ ? configuration.apiKey("Authorization")
2729
+ : configuration.apiKey;
2730
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2731
+ }
2732
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2733
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2734
+ localVarUrlObj.search = null;
2735
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2736
+ return {
2737
+ url: url.format(localVarUrlObj),
2738
+ options: localVarRequestOptions,
2739
+ };
2740
+ },
2741
+ /**
2742
+ * Event fields are the fields on event resources that can be used for filtering. This includes built-in fields and any custom filters. The event fields supported vary by project type.
2743
+ * @summary List the Event Fields for a Project
2744
+ * @param {string} projectId ID of the Project
2745
+ * @param {*} [options] Override http request option.
2746
+ * @throws {RequiredError}
2747
+ */
2748
+ listProjectEventFields(projectId, options = {}) {
2749
+ // verify required parameter 'projectId' is not null or undefined
2750
+ if (projectId === null || projectId === undefined) {
2751
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectEventFields.");
2752
+ }
2753
+ const localVarPath = `/projects/{project_id}/event_fields`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2754
+ const localVarUrlObj = url.parse(localVarPath, true);
2755
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2756
+ const localVarHeaderParameter = {};
2757
+ const localVarQueryParameter = {};
2758
+ // authentication tokenAuth required
2759
+ if (configuration && configuration.apiKey) {
2760
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2761
+ ? configuration.apiKey("Authorization")
2762
+ : configuration.apiKey;
2763
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2764
+ }
2765
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2766
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2767
+ localVarUrlObj.search = null;
2768
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2769
+ return {
2770
+ url: url.format(localVarUrlObj),
2771
+ options: localVarRequestOptions,
2772
+ };
2773
+ },
2774
+ /**
2775
+ *
2776
+ * @summary List Feature Flag Summaries for a Project
2777
+ * @param {string} projectId ID of the Project.
2778
+ * @param {string} [q] Search for feature flags with a name matching this query parameter. Supports case-insensitive substring matching.
2779
+ * @param {number} [perPage] How many results to return per page.
2780
+ * @param {*} [options] Override http request option.
2781
+ * @throws {RequiredError}
2782
+ */
2783
+ listProjectFeatureFlagSummaries(projectId, q, perPage, options = {}) {
2784
+ // verify required parameter 'projectId' is not null or undefined
2785
+ if (projectId === null || projectId === undefined) {
2786
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectFeatureFlagSummaries.");
2787
+ }
2788
+ const localVarPath = `/projects/{project_id}/feature_flag_summaries`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2789
+ const localVarUrlObj = url.parse(localVarPath, true);
2790
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2791
+ const localVarHeaderParameter = {};
2792
+ const localVarQueryParameter = {};
2793
+ // authentication tokenAuth required
2794
+ if (configuration && configuration.apiKey) {
2795
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2796
+ ? configuration.apiKey("Authorization")
2797
+ : configuration.apiKey;
2798
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2799
+ }
2800
+ if (q !== undefined) {
2801
+ localVarQueryParameter["q"] = q;
2802
+ }
2803
+ if (perPage !== undefined) {
2804
+ localVarQueryParameter["per_page"] = perPage;
2805
+ }
2806
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2807
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2808
+ localVarUrlObj.search = null;
2809
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2810
+ return {
2811
+ url: url.format(localVarUrlObj),
2812
+ options: localVarRequestOptions,
2813
+ };
2814
+ },
2815
+ /**
2816
+ *
2817
+ * @summary List Feature Flags on a Project
2818
+ * @param {string} projectId ID of the Project.
2819
+ * @param {string} releaseStageName Release stage name to get the feature flags for.
2820
+ * @param {boolean} [starredAtTop] Whether to return starred Feature Flags at the top of the Feature Flags list.
2821
+ * @param {boolean} [includeVariantSummary] Whether to include a summary of the Variants for each Feature Flag.
2822
+ * @param {string} [q] Search for feature flags with a name matching this query parameter. Supports case-insensitive substring matching.
2823
+ * @param {string} [firstSeen] Filter to Feature Flags that were first seen in the release stage within the specified time frame.
2824
+ * @param {boolean} [includeInactive] Whether to include inactive Feature Flags.
2825
+ * @param {string} [sort] Which field to sort on.
2826
+ * @param {string} [direction] Which direction to sort the results by.
2827
+ * @param {number} [perPage] How many results to return per page.
2828
+ * @param {*} [options] Override http request option.
2829
+ * @throws {RequiredError}
2830
+ */
2831
+ listProjectFeatureFlags(projectId, releaseStageName, starredAtTop, includeVariantSummary, q, firstSeen, includeInactive, sort, direction, perPage, options = {}) {
2832
+ // verify required parameter 'projectId' is not null or undefined
2833
+ if (projectId === null || projectId === undefined) {
2834
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectFeatureFlags.");
2835
+ }
2836
+ // verify required parameter 'releaseStageName' is not null or undefined
2837
+ if (releaseStageName === null || releaseStageName === undefined) {
2838
+ throw new RequiredError("releaseStageName", "Required parameter releaseStageName was null or undefined when calling listProjectFeatureFlags.");
2839
+ }
2840
+ const localVarPath = `/projects/{project_id}/feature_flags`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2841
+ const localVarUrlObj = url.parse(localVarPath, true);
2842
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2843
+ const localVarHeaderParameter = {};
2844
+ const localVarQueryParameter = {};
2845
+ // authentication tokenAuth required
2846
+ if (configuration && configuration.apiKey) {
2847
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2848
+ ? configuration.apiKey("Authorization")
2849
+ : configuration.apiKey;
2850
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2851
+ }
2852
+ if (releaseStageName !== undefined) {
2853
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2854
+ }
2855
+ if (starredAtTop !== undefined) {
2856
+ localVarQueryParameter["starred_at_top"] = starredAtTop;
2857
+ }
2858
+ if (includeVariantSummary !== undefined) {
2859
+ localVarQueryParameter["include_variant_summary"] = includeVariantSummary;
2860
+ }
2861
+ if (q !== undefined) {
2862
+ localVarQueryParameter["q"] = q;
2863
+ }
2864
+ if (firstSeen !== undefined) {
2865
+ localVarQueryParameter["first_seen"] = firstSeen;
2866
+ }
2867
+ if (includeInactive !== undefined) {
2868
+ localVarQueryParameter["include_inactive"] = includeInactive;
2869
+ }
2870
+ if (sort !== undefined) {
2871
+ localVarQueryParameter["sort"] = sort;
2872
+ }
2873
+ if (direction !== undefined) {
2874
+ localVarQueryParameter["direction"] = direction;
2875
+ }
2876
+ if (perPage !== undefined) {
2877
+ localVarQueryParameter["per_page"] = perPage;
2878
+ }
2879
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2880
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2881
+ localVarUrlObj.search = null;
2882
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2883
+ return {
2884
+ url: url.format(localVarUrlObj),
2885
+ options: localVarRequestOptions,
2886
+ };
2887
+ },
2888
+ /**
2889
+ *
2890
+ * @summary List Page Load Span Groups
2891
+ * @param {string} projectId The ID of the Project to which the Page Load Span Groups belong.
2892
+ * @param {string} [sort] The field to sort the page load span groups by
2893
+ * @param {string} [direction] The direction to sort the page load span groups by
2894
+ * @param {number} [perPage] the number of results per page
2895
+ * @param {number} [offset] the offset for the next page of results
2896
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
2897
+ * @param {boolean} [starredOnly] Whether to only return Page Load Span Groups the requesting user has starred.
2898
+ * @param {*} [options] Override http request option.
2899
+ * @throws {RequiredError}
2900
+ */
2901
+ listProjectPageLoadSpanGroups(projectId, sort, direction, perPage, offset, filters, starredOnly, options = {}) {
2902
+ // verify required parameter 'projectId' is not null or undefined
2903
+ if (projectId === null || projectId === undefined) {
2904
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectPageLoadSpanGroups.");
2905
+ }
2906
+ const localVarPath = `/projects/{project_id}/page_load_span_groups`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2907
+ const localVarUrlObj = url.parse(localVarPath, true);
2908
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2909
+ const localVarHeaderParameter = {};
2910
+ const localVarQueryParameter = {};
2911
+ // authentication tokenAuth required
2912
+ if (configuration && configuration.apiKey) {
2913
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2914
+ ? configuration.apiKey("Authorization")
2915
+ : configuration.apiKey;
2916
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2917
+ }
2918
+ if (sort !== undefined) {
2919
+ localVarQueryParameter["sort"] = sort;
2920
+ }
2921
+ if (direction !== undefined) {
2922
+ localVarQueryParameter["direction"] = direction;
2923
+ }
2924
+ if (perPage !== undefined) {
2925
+ localVarQueryParameter["per_page"] = perPage;
2926
+ }
2927
+ if (offset !== undefined) {
2928
+ localVarQueryParameter["offset"] = offset;
2929
+ }
2930
+ if (filters) {
2931
+ localVarQueryParameter["filters"] = filters;
2932
+ }
2933
+ if (starredOnly !== undefined) {
2934
+ localVarQueryParameter["starred_only"] = starredOnly;
2935
+ }
2936
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2937
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2938
+ localVarUrlObj.search = null;
2939
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2940
+ return {
2941
+ url: url.format(localVarUrlObj),
2942
+ options: localVarRequestOptions,
2943
+ };
2944
+ },
2945
+ /**
2946
+ *
2947
+ * @summary List Release Groups on a Project
2948
+ * @param {string} projectId ID of the project
2949
+ * @param {string} releaseStageName name of release stage to list release groups for
2950
+ * @param {boolean} [topOnly] return only the top release groups (default false)
2951
+ * @param {boolean} [visibleOnly] return only visible release groups (default false)
2952
+ * @param {number} [perPage] how many results to return per page
2953
+ * @param {string} [pageToken] value from the next relation in the Link response header to obtain the next page of results
2954
+ * @param {*} [options] Override http request option.
2955
+ * @throws {RequiredError}
2956
+ */
2957
+ listProjectReleaseGroups(projectId, releaseStageName, topOnly, visibleOnly, perPage, pageToken, options = {}) {
2958
+ // verify required parameter 'projectId' is not null or undefined
2959
+ if (projectId === null || projectId === undefined) {
2960
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectReleaseGroups.");
2961
+ }
2962
+ // verify required parameter 'releaseStageName' is not null or undefined
2963
+ if (releaseStageName === null || releaseStageName === undefined) {
2964
+ throw new RequiredError("releaseStageName", "Required parameter releaseStageName was null or undefined when calling listProjectReleaseGroups.");
2965
+ }
2966
+ const localVarPath = `/projects/{project_id}/release_groups`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
2967
+ const localVarUrlObj = url.parse(localVarPath, true);
2968
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
2969
+ const localVarHeaderParameter = {};
2970
+ const localVarQueryParameter = {};
2971
+ // authentication tokenAuth required
2972
+ if (configuration && configuration.apiKey) {
2973
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
2974
+ ? configuration.apiKey("Authorization")
2975
+ : configuration.apiKey;
2976
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
2977
+ }
2978
+ if (releaseStageName !== undefined) {
2979
+ localVarQueryParameter["release_stage_name"] = releaseStageName;
2980
+ }
2981
+ if (topOnly !== undefined) {
2982
+ localVarQueryParameter["top_only"] = topOnly;
2983
+ }
2984
+ if (visibleOnly !== undefined) {
2985
+ localVarQueryParameter["visible_only"] = visibleOnly;
2986
+ }
2987
+ if (perPage !== undefined) {
2988
+ localVarQueryParameter["per_page"] = perPage;
2989
+ }
2990
+ if (pageToken !== undefined) {
2991
+ localVarQueryParameter["page_token"] = pageToken;
2992
+ }
2993
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
2994
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
2995
+ localVarUrlObj.search = null;
2996
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
2997
+ return {
2998
+ url: url.format(localVarUrlObj),
2999
+ options: localVarRequestOptions,
3000
+ };
3001
+ },
3002
+ /**
3003
+ * A release models a particular application version running in a particular release stage. In the case of mobile projects, a release is also associated with a version code or bundle version. To learn more, see the following resources on the [releases dashboard](https://docs.bugsnag.com/product/releases/releases-dashboard) and [build tool integrations](https://docs.bugsnag.com/build-integrations/).
3004
+ * @summary List Releases on a Project
3005
+ * @param {string} projectId ID of the Project
3006
+ * @param {string} [releaseStage] release stage to filter by
3007
+ * @param {string} [base] date and time (in ISO 8601 format) to search for releases before
3008
+ * @param {string} [sort] How to sort the results
3009
+ * @param {number} [offset] The pagination offset
3010
+ * @param {number} [perPage] How many results (between 1 and 10) to return per page
3011
+ * @param {*} [options] Override http request option.
3012
+ * @throws {RequiredError}
3013
+ */
3014
+ listProjectReleases(projectId, releaseStage, base, sort, offset, perPage, options = {}) {
3015
+ // verify required parameter 'projectId' is not null or undefined
3016
+ if (projectId === null || projectId === undefined) {
3017
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectReleases.");
3018
+ }
3019
+ const localVarPath = `/projects/{project_id}/releases`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3020
+ const localVarUrlObj = url.parse(localVarPath, true);
3021
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3022
+ const localVarHeaderParameter = {};
3023
+ const localVarQueryParameter = {};
3024
+ // authentication tokenAuth required
3025
+ if (configuration && configuration.apiKey) {
3026
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3027
+ ? configuration.apiKey("Authorization")
3028
+ : configuration.apiKey;
3029
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3030
+ }
3031
+ if (releaseStage !== undefined) {
3032
+ localVarQueryParameter["release_stage"] = releaseStage;
3033
+ }
3034
+ if (base !== undefined) {
3035
+ localVarQueryParameter["base"] = base;
3036
+ }
3037
+ if (sort !== undefined) {
3038
+ localVarQueryParameter["sort"] = sort;
3039
+ }
3040
+ if (offset !== undefined) {
3041
+ localVarQueryParameter["offset"] = offset;
3042
+ }
3043
+ if (perPage !== undefined) {
3044
+ localVarQueryParameter["per_page"] = perPage;
3045
+ }
3046
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3047
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3048
+ localVarUrlObj.search = null;
3049
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3050
+ return {
3051
+ url: url.format(localVarUrlObj),
3052
+ options: localVarRequestOptions,
3053
+ };
3054
+ },
3055
+ /**
3056
+ *
3057
+ * @summary List Performance Targets for a Span Group by ID
3058
+ * @param {string} projectId The ID of the Project to which the span group belongs.
3059
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
3060
+ * @param {*} [options] Override http request option.
3061
+ * @throws {RequiredError}
3062
+ */
3063
+ listProjectSpanGroupPerformanceTargets(projectId, id, options = {}) {
3064
+ // verify required parameter 'projectId' is not null or undefined
3065
+ if (projectId === null || projectId === undefined) {
3066
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectSpanGroupPerformanceTargets.");
3067
+ }
3068
+ // verify required parameter 'id' is not null or undefined
3069
+ if (id === null || id === undefined) {
3070
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling listProjectSpanGroupPerformanceTargets.");
3071
+ }
3072
+ const localVarPath = `/projects/{project_id}/span_groups/{id}/performance_targets`
3073
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
3074
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3075
+ const localVarUrlObj = url.parse(localVarPath, true);
3076
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3077
+ const localVarHeaderParameter = {};
3078
+ const localVarQueryParameter = {};
3079
+ // authentication tokenAuth required
3080
+ if (configuration && configuration.apiKey) {
3081
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3082
+ ? configuration.apiKey("Authorization")
3083
+ : configuration.apiKey;
3084
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3085
+ }
3086
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3087
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3088
+ localVarUrlObj.search = null;
3089
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3090
+ return {
3091
+ url: url.format(localVarUrlObj),
3092
+ options: localVarRequestOptions,
3093
+ };
3094
+ },
3095
+ /**
3096
+ *
3097
+ * @summary List Span Group Summaries for a Project
3098
+ * @param {string} projectId The ID of the Project to which the Span Groups belong.
3099
+ * @param {number} [perPage] the number of results per page
3100
+ * @param {number} [offset] the offset for the next page of results
3101
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
3102
+ * @param {*} [options] Override http request option.
3103
+ * @throws {RequiredError}
3104
+ */
3105
+ listProjectSpanGroupSummaries(projectId, perPage, offset, filters, options = {}) {
3106
+ // verify required parameter 'projectId' is not null or undefined
3107
+ if (projectId === null || projectId === undefined) {
3108
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectSpanGroupSummaries.");
3109
+ }
3110
+ const localVarPath = `/projects/{project_id}/span_group_summaries`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3111
+ const localVarUrlObj = url.parse(localVarPath, true);
3112
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3113
+ const localVarHeaderParameter = {};
3114
+ const localVarQueryParameter = {};
3115
+ // authentication tokenAuth required
3116
+ if (configuration && configuration.apiKey) {
3117
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3118
+ ? configuration.apiKey("Authorization")
3119
+ : configuration.apiKey;
3120
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3121
+ }
3122
+ if (perPage !== undefined) {
3123
+ localVarQueryParameter["per_page"] = perPage;
3124
+ }
3125
+ if (offset !== undefined) {
3126
+ localVarQueryParameter["offset"] = offset;
3127
+ }
3128
+ if (filters) {
3129
+ localVarQueryParameter["filters"] = filters;
3130
+ }
3131
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3132
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3133
+ localVarUrlObj.search = null;
3134
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3135
+ return {
3136
+ url: url.format(localVarUrlObj),
3137
+ options: localVarRequestOptions,
3138
+ };
3139
+ },
3140
+ /**
3141
+ * If there are no Span Groups, it returns an empty array.
3142
+ * @summary List Span Groups on a Project
3143
+ * @param {string} projectId The ID of the Project to which the Span Groups belong.
3144
+ * @param {string} [sort] The field to sort the span groups by
3145
+ * @param {string} [direction] The direction to sort the span groups by
3146
+ * @param {number} [perPage] the number of results per page
3147
+ * @param {number} [offset] the offset for the next page of results
3148
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
3149
+ * @param {boolean} [starredOnly] Whether to only return Span Groups the requesting user has starred.
3150
+ * @param {*} [options] Override http request option.
3151
+ * @throws {RequiredError}
3152
+ */
3153
+ listProjectSpanGroups(projectId, sort, direction, perPage, offset, filters, starredOnly, options = {}) {
3154
+ // verify required parameter 'projectId' is not null or undefined
3155
+ if (projectId === null || projectId === undefined) {
3156
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectSpanGroups.");
3157
+ }
3158
+ const localVarPath = `/projects/{project_id}/span_groups`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3159
+ const localVarUrlObj = url.parse(localVarPath, true);
3160
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3161
+ const localVarHeaderParameter = {};
3162
+ const localVarQueryParameter = {};
3163
+ // authentication tokenAuth required
3164
+ if (configuration && configuration.apiKey) {
3165
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3166
+ ? configuration.apiKey("Authorization")
3167
+ : configuration.apiKey;
3168
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3169
+ }
3170
+ if (sort !== undefined) {
3171
+ localVarQueryParameter["sort"] = sort;
3172
+ }
3173
+ if (direction !== undefined) {
3174
+ localVarQueryParameter["direction"] = direction;
3175
+ }
3176
+ if (perPage !== undefined) {
3177
+ localVarQueryParameter["per_page"] = perPage;
3178
+ }
3179
+ if (offset !== undefined) {
3180
+ localVarQueryParameter["offset"] = offset;
3181
+ }
3182
+ if (filters) {
3183
+ localVarQueryParameter["filters"] = filters;
3184
+ }
3185
+ if (starredOnly !== undefined) {
3186
+ localVarQueryParameter["starred_only"] = starredOnly;
3187
+ }
3188
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3189
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3190
+ localVarUrlObj.search = null;
3191
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3192
+ return {
3193
+ url: url.format(localVarUrlObj),
3194
+ options: localVarRequestOptions,
3195
+ };
3196
+ },
3197
+ /**
3198
+ * List the names and properties of the requesting user's starred Span Groups for a project and optionally performance categories.
3199
+ * @summary List the starred Span Group descriptions
3200
+ * @param {string} projectId The ID of the project to which the Span Groups belong.
3201
+ * @param {Array<string>} [categories] The performance categories of the Span Groups.
3202
+ * @param {number} [perPage] the number of results per page
3203
+ * @param {number} [offset] the offset for the next page of results
3204
+ * @param {*} [options] Override http request option.
3205
+ * @throws {RequiredError}
3206
+ */
3207
+ listProjectStarredSpanGroups(projectId, categories, perPage, offset, options = {}) {
3208
+ // verify required parameter 'projectId' is not null or undefined
3209
+ if (projectId === null || projectId === undefined) {
3210
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectStarredSpanGroups.");
3211
+ }
3212
+ const localVarPath = `/projects/{project_id}/starred_span_groups`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3213
+ const localVarUrlObj = url.parse(localVarPath, true);
3214
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3215
+ const localVarHeaderParameter = {};
3216
+ const localVarQueryParameter = {};
3217
+ // authentication tokenAuth required
3218
+ if (configuration && configuration.apiKey) {
3219
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3220
+ ? configuration.apiKey("Authorization")
3221
+ : configuration.apiKey;
3222
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3223
+ }
3224
+ if (categories) {
3225
+ localVarQueryParameter["categories"] = categories;
3226
+ }
3227
+ if (perPage !== undefined) {
3228
+ localVarQueryParameter["per_page"] = perPage;
3229
+ }
3230
+ if (offset !== undefined) {
3231
+ localVarQueryParameter["offset"] = offset;
3232
+ }
3233
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3234
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3235
+ localVarUrlObj.search = null;
3236
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3237
+ return {
3238
+ url: url.format(localVarUrlObj),
3239
+ options: localVarRequestOptions,
3240
+ };
3241
+ },
3242
+ /**
3243
+ * Trace fields are the fields used for filtering spans that are aggregated in span groups on a project. They include a name identifier and filter options for each field. See [Filtering](#introduction/filtering/trace-fields-and-performance-filtering) for more information.
3244
+ * @summary List the Trace Fields on a project
3245
+ * @param {string} projectId The ID of the Project to which the Trace Field belongs.
3246
+ * @param {*} [options] Override http request option.
3247
+ * @throws {RequiredError}
3248
+ */
3249
+ listProjectTraceFields(projectId, options = {}) {
3250
+ // verify required parameter 'projectId' is not null or undefined
3251
+ if (projectId === null || projectId === undefined) {
3252
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listProjectTraceFields.");
3253
+ }
3254
+ const localVarPath = `/projects/{project_id}/trace_fields`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3255
+ const localVarUrlObj = url.parse(localVarPath, true);
3256
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3257
+ const localVarHeaderParameter = {};
3258
+ const localVarQueryParameter = {};
3259
+ // authentication tokenAuth required
3260
+ if (configuration && configuration.apiKey) {
3261
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3262
+ ? configuration.apiKey("Authorization")
3263
+ : configuration.apiKey;
3264
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3265
+ }
3266
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3267
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3268
+ localVarUrlObj.search = null;
3269
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3270
+ return {
3271
+ url: url.format(localVarUrlObj),
3272
+ options: localVarRequestOptions,
3273
+ };
3274
+ },
3275
+ /**
3276
+ *
3277
+ * @summary List Releases on a Release Group
3278
+ * @param {string} releaseGroupId ID of release group to list releases for
3279
+ * @param {number} [perPage] how many results to return per page
3280
+ * @param {string} [pageToken] value from the next relation in the Link response header to obtain the next page of results
3281
+ * @param {*} [options] Override http request option.
3282
+ * @throws {RequiredError}
3283
+ */
3284
+ listReleaseGroupReleases(releaseGroupId, perPage, pageToken, options = {}) {
3285
+ // verify required parameter 'releaseGroupId' is not null or undefined
3286
+ if (releaseGroupId === null || releaseGroupId === undefined) {
3287
+ throw new RequiredError("releaseGroupId", "Required parameter releaseGroupId was null or undefined when calling listReleaseGroupReleases.");
3288
+ }
3289
+ const localVarPath = `/release_groups/{release_group_id}/releases`.replace(`{${"release_group_id"}}`, encodeURIComponent(String(releaseGroupId)));
3290
+ const localVarUrlObj = url.parse(localVarPath, true);
3291
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3292
+ const localVarHeaderParameter = {};
3293
+ const localVarQueryParameter = {};
3294
+ // authentication tokenAuth required
3295
+ if (configuration && configuration.apiKey) {
3296
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3297
+ ? configuration.apiKey("Authorization")
3298
+ : configuration.apiKey;
3299
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3300
+ }
3301
+ if (perPage !== undefined) {
3302
+ localVarQueryParameter["per_page"] = perPage;
3303
+ }
3304
+ if (pageToken !== undefined) {
3305
+ localVarQueryParameter["page_token"] = pageToken;
3306
+ }
3307
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3308
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3309
+ localVarUrlObj.search = null;
3310
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3311
+ return {
3312
+ url: url.format(localVarUrlObj),
3313
+ options: localVarRequestOptions,
3314
+ };
3315
+ },
3316
+ /**
3317
+ *
3318
+ * @summary List Spans for a Span Group by ID
3319
+ * @param {string} projectId The ID of the Project to which the spans belong.
3320
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
3321
+ * @param {Array<PerformanceFilter>} [filters] The current filters that are being applied.
3322
+ * @param {string} [sort] The field to sort the results by.
3323
+ * @param {string} [direction] The direction to sort the results by.
3324
+ * @param {number} [perPage] The number of results to return per page. Defaults to 20.
3325
+ * @param {*} [options] Override http request option.
3326
+ * @throws {RequiredError}
3327
+ */
3328
+ listSpansBySpanGroupId(projectId, id, filters, sort, direction, perPage, options = {}) {
3329
+ // verify required parameter 'projectId' is not null or undefined
3330
+ if (projectId === null || projectId === undefined) {
3331
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listSpansBySpanGroupId.");
3332
+ }
3333
+ // verify required parameter 'id' is not null or undefined
3334
+ if (id === null || id === undefined) {
3335
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling listSpansBySpanGroupId.");
3336
+ }
3337
+ const localVarPath = `/projects/{project_id}/span_groups/{id}/spans`
3338
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
3339
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3340
+ const localVarUrlObj = url.parse(localVarPath, true);
3341
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3342
+ const localVarHeaderParameter = {};
3343
+ const localVarQueryParameter = {};
3344
+ // authentication tokenAuth required
3345
+ if (configuration && configuration.apiKey) {
3346
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3347
+ ? configuration.apiKey("Authorization")
3348
+ : configuration.apiKey;
3349
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3350
+ }
3351
+ if (filters) {
3352
+ localVarQueryParameter["filters"] = filters;
3353
+ }
3354
+ if (sort !== undefined) {
3355
+ localVarQueryParameter["sort"] = sort;
3356
+ }
3357
+ if (direction !== undefined) {
3358
+ localVarQueryParameter["direction"] = direction;
3359
+ }
3360
+ if (perPage !== undefined) {
3361
+ localVarQueryParameter["per_page"] = perPage;
3362
+ }
3363
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3364
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3365
+ localVarUrlObj.search = null;
3366
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3367
+ return {
3368
+ url: url.format(localVarUrlObj),
3369
+ options: localVarRequestOptions,
3370
+ };
3371
+ },
3372
+ /**
3373
+ *
3374
+ * @summary List Spans for a Trace
3375
+ * @param {string} projectId The ID of the Project to which the spans belong.
3376
+ * @param {string} traceId The ID of the Trace to which the spans belong.
3377
+ * @param {string} from Beginning of window to return spans from.
3378
+ * @param {string} to End of window to return spans from.
3379
+ * @param {string} [targetSpanId] The ID of a Span within the Trace to focus on. If provided the target Span and its direct children will be returned ahead of other Spans in the Trace.
3380
+ * @param {number} [perPage] The number of results to return per page. Defaults to 20.
3381
+ * @param {*} [options] Override http request option.
3382
+ * @throws {RequiredError}
3383
+ */
3384
+ listSpansByTraceId(projectId, traceId, from, to, targetSpanId, perPage, options = {}) {
3385
+ // verify required parameter 'projectId' is not null or undefined
3386
+ if (projectId === null || projectId === undefined) {
3387
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling listSpansByTraceId.");
3388
+ }
3389
+ // verify required parameter 'traceId' is not null or undefined
3390
+ if (traceId === null || traceId === undefined) {
3391
+ throw new RequiredError("traceId", "Required parameter traceId was null or undefined when calling listSpansByTraceId.");
3392
+ }
3393
+ // verify required parameter 'from' is not null or undefined
3394
+ if (from === null || from === undefined) {
3395
+ throw new RequiredError("from", "Required parameter from was null or undefined when calling listSpansByTraceId.");
3396
+ }
3397
+ // verify required parameter 'to' is not null or undefined
3398
+ if (to === null || to === undefined) {
3399
+ throw new RequiredError("to", "Required parameter to was null or undefined when calling listSpansByTraceId.");
3400
+ }
3401
+ const localVarPath = `/projects/{project_id}/traces/{trace_id}/spans`
3402
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
3403
+ .replace(`{${"trace_id"}}`, encodeURIComponent(String(traceId)));
3404
+ const localVarUrlObj = url.parse(localVarPath, true);
3405
+ const localVarRequestOptions = Object.assign({ method: "GET" }, options);
3406
+ const localVarHeaderParameter = {};
3407
+ const localVarQueryParameter = {};
3408
+ // authentication tokenAuth required
3409
+ if (configuration && configuration.apiKey) {
3410
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3411
+ ? configuration.apiKey("Authorization")
3412
+ : configuration.apiKey;
3413
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3414
+ }
3415
+ if (from !== undefined) {
3416
+ localVarQueryParameter["from"] = from;
3417
+ }
3418
+ if (to !== undefined) {
3419
+ localVarQueryParameter["to"] = to;
3420
+ }
3421
+ if (targetSpanId !== undefined) {
3422
+ localVarQueryParameter["target_span_id"] = targetSpanId;
3423
+ }
3424
+ if (perPage !== undefined) {
3425
+ localVarQueryParameter["per_page"] = perPage;
3426
+ }
3427
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3428
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3429
+ localVarUrlObj.search = null;
3430
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3431
+ return {
3432
+ url: url.format(localVarUrlObj),
3433
+ options: localVarRequestOptions,
3434
+ };
3435
+ },
3436
+ /**
3437
+ * Generate a new notifier API key for a project. This API key is used to configure the [notifier library](https://docs.bugsnag.com/platforms/) being used to report errors in the project. After regenerating a Project's notifier API key, your platform-specific notifier will need its configuration updated to use the new key. The previous key will not be supported. Note that a Project's notifier API key is different from both the Organization-level and User-level Data Access API auth tokens.
3438
+ * @summary Regenerate a Project's notifier API key
3439
+ * @param {string} projectId ID of the project
3440
+ * @param {*} [options] Override http request option.
3441
+ * @throws {RequiredError}
3442
+ */
3443
+ regenerateProjectApiKey(projectId, options = {}) {
3444
+ // verify required parameter 'projectId' is not null or undefined
3445
+ if (projectId === null || projectId === undefined) {
3446
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling regenerateProjectApiKey.");
3447
+ }
3448
+ const localVarPath = `/projects/{project_id}/api_key`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3449
+ const localVarUrlObj = url.parse(localVarPath, true);
3450
+ const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
3451
+ const localVarHeaderParameter = {};
3452
+ const localVarQueryParameter = {};
3453
+ // authentication tokenAuth required
3454
+ if (configuration && configuration.apiKey) {
3455
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3456
+ ? configuration.apiKey("Authorization")
3457
+ : configuration.apiKey;
3458
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3459
+ }
3460
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3461
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3462
+ localVarUrlObj.search = null;
3463
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3464
+ return {
3465
+ url: url.format(localVarUrlObj),
3466
+ options: localVarRequestOptions,
3467
+ };
3468
+ },
3469
+ /**
3470
+ * Replaces all the ErrorAssignmentRules on the project with the rules supplied rules. If no rules are supplied, all rules on the project are deleted.
3471
+ * @summary Replace the ErrorAssignmentRules on a project
3472
+ * @param {ErrorAssignmentRulesReplaceRequest} body
3473
+ * @param {string} projectId The ID of the Project to which the ErrorAssignmentRule belongs.
3474
+ * @param {*} [options] Override http request option.
3475
+ * @throws {RequiredError}
3476
+ */
3477
+ replaceProjectErrorAssignmentRules(body, projectId, options = {}) {
3478
+ // verify required parameter 'body' is not null or undefined
3479
+ if (body === null || body === undefined) {
3480
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling replaceProjectErrorAssignmentRules.");
3481
+ }
3482
+ // verify required parameter 'projectId' is not null or undefined
3483
+ if (projectId === null || projectId === undefined) {
3484
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling replaceProjectErrorAssignmentRules.");
3485
+ }
3486
+ const localVarPath = `/projects/{project_id}/error_assignment_rules`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3487
+ const localVarUrlObj = url.parse(localVarPath, true);
3488
+ const localVarRequestOptions = Object.assign({ method: "PUT" }, options);
3489
+ const localVarHeaderParameter = {};
3490
+ const localVarQueryParameter = {};
3491
+ // authentication tokenAuth required
3492
+ if (configuration && configuration.apiKey) {
3493
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3494
+ ? configuration.apiKey("Authorization")
3495
+ : configuration.apiKey;
3496
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3497
+ }
3498
+ localVarHeaderParameter["Content-Type"] = "application/json";
3499
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3500
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3501
+ localVarUrlObj.search = null;
3502
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3503
+ const needsSerialization = "ErrorAssignmentRulesReplaceRequest" !== "string" ||
3504
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3505
+ localVarRequestOptions.body = needsSerialization
3506
+ ? JSON.stringify(body || {})
3507
+ : body || "";
3508
+ return {
3509
+ url: url.format(localVarUrlObj),
3510
+ options: localVarRequestOptions,
3511
+ };
3512
+ },
3513
+ /**
3514
+ *
3515
+ * @summary Update a Project
3516
+ * @param {ProjectUpdateRequest} body
3517
+ * @param {string} projectId ID of the project
3518
+ * @param {*} [options] Override http request option.
3519
+ * @throws {RequiredError}
3520
+ */
3521
+ updateProject(body, projectId, options = {}) {
3522
+ // verify required parameter 'body' is not null or undefined
3523
+ if (body === null || body === undefined) {
3524
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling updateProject.");
3525
+ }
3526
+ // verify required parameter 'projectId' is not null or undefined
3527
+ if (projectId === null || projectId === undefined) {
3528
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling updateProject.");
3529
+ }
3530
+ const localVarPath = `/projects/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3531
+ const localVarUrlObj = url.parse(localVarPath, true);
3532
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
3533
+ const localVarHeaderParameter = {};
3534
+ const localVarQueryParameter = {};
3535
+ // authentication tokenAuth required
3536
+ if (configuration && configuration.apiKey) {
3537
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3538
+ ? configuration.apiKey("Authorization")
3539
+ : configuration.apiKey;
3540
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3541
+ }
3542
+ localVarHeaderParameter["Content-Type"] = "application/json";
3543
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3544
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3545
+ localVarUrlObj.search = null;
3546
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3547
+ const needsSerialization = "ProjectUpdateRequest" !== "string" ||
3548
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3549
+ localVarRequestOptions.body = needsSerialization
3550
+ ? JSON.stringify(body || {})
3551
+ : body || "";
3552
+ return {
3553
+ url: url.format(localVarUrlObj),
3554
+ options: localVarRequestOptions,
3555
+ };
3556
+ },
3557
+ /**
3558
+ *
3559
+ * @summary Update a custom Event Field
3560
+ * @param {EventFieldCreateRequest} body
3561
+ * @param {string} projectId ID of the Project
3562
+ * @param {string} displayId human friendly ID for the EventField
3563
+ * @param {*} [options] Override http request option.
3564
+ * @throws {RequiredError}
3565
+ */
3566
+ updateProjectEventFieldByDisplayId(body, projectId, displayId, options = {}) {
3567
+ // verify required parameter 'body' is not null or undefined
3568
+ if (body === null || body === undefined) {
3569
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling updateProjectEventFieldByDisplayId.");
3570
+ }
3571
+ // verify required parameter 'projectId' is not null or undefined
3572
+ if (projectId === null || projectId === undefined) {
3573
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling updateProjectEventFieldByDisplayId.");
3574
+ }
3575
+ // verify required parameter 'displayId' is not null or undefined
3576
+ if (displayId === null || displayId === undefined) {
3577
+ throw new RequiredError("displayId", "Required parameter displayId was null or undefined when calling updateProjectEventFieldByDisplayId.");
3578
+ }
3579
+ const localVarPath = `/projects/{project_id}/event_fields/{display_id}`
3580
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
3581
+ .replace(`{${"display_id"}}`, encodeURIComponent(String(displayId)));
3582
+ const localVarUrlObj = url.parse(localVarPath, true);
3583
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
3584
+ const localVarHeaderParameter = {};
3585
+ const localVarQueryParameter = {};
3586
+ // authentication tokenAuth required
3587
+ if (configuration && configuration.apiKey) {
3588
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3589
+ ? configuration.apiKey("Authorization")
3590
+ : configuration.apiKey;
3591
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3592
+ }
3593
+ localVarHeaderParameter["Content-Type"] = "application/json";
3594
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3595
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3596
+ localVarUrlObj.search = null;
3597
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3598
+ const needsSerialization = "EventFieldCreateRequest" !== "string" ||
3599
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3600
+ localVarRequestOptions.body = needsSerialization
3601
+ ? JSON.stringify(body || {})
3602
+ : body || "";
3603
+ return {
3604
+ url: url.format(localVarUrlObj),
3605
+ options: localVarRequestOptions,
3606
+ };
3607
+ },
3608
+ /**
3609
+ *
3610
+ * @summary Update a Project's Network Grouping Ruleset
3611
+ * @param {string} projectId The ID of the Project to retrieve the endpoints for
3612
+ * @param {NetworkGroupingRulesetRequest} [body]
3613
+ * @param {*} [options] Override http request option.
3614
+ * @throws {RequiredError}
3615
+ */
3616
+ updateProjectNetworkGroupingRuleset(projectId, body, options = {}) {
3617
+ // verify required parameter 'projectId' is not null or undefined
3618
+ if (projectId === null || projectId === undefined) {
3619
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling updateProjectNetworkGroupingRuleset.");
3620
+ }
3621
+ const localVarPath = `/projects/{project_id}/network_endpoint_grouping`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
3622
+ const localVarUrlObj = url.parse(localVarPath, true);
3623
+ const localVarRequestOptions = Object.assign({ method: "PUT" }, options);
3624
+ const localVarHeaderParameter = {};
3625
+ const localVarQueryParameter = {};
3626
+ // authentication tokenAuth required
3627
+ if (configuration && configuration.apiKey) {
3628
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3629
+ ? configuration.apiKey("Authorization")
3630
+ : configuration.apiKey;
3631
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3632
+ }
3633
+ localVarHeaderParameter["Content-Type"] = "application/json";
3634
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3635
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3636
+ localVarUrlObj.search = null;
3637
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3638
+ const needsSerialization = "NetworkGroupingRulesetRequest" !== "string" ||
3639
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3640
+ localVarRequestOptions.body = needsSerialization
3641
+ ? JSON.stringify(body || {})
3642
+ : body || "";
3643
+ return {
3644
+ url: url.format(localVarUrlObj),
3645
+ options: localVarRequestOptions,
3646
+ };
3647
+ },
3648
+ /**
3649
+ *
3650
+ * @summary Update Span Group
3651
+ * @param {SpanGroupsIdBody} body
3652
+ * @param {string} projectId The ID of the Project to which the Span Group belongs.
3653
+ * @param {string} id The [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) ID of the Span Group.
3654
+ * @param {*} [options] Override http request option.
3655
+ * @throws {RequiredError}
3656
+ */
3657
+ updateProjectSpanGroup(body, projectId, id, options = {}) {
3658
+ // verify required parameter 'body' is not null or undefined
3659
+ if (body === null || body === undefined) {
3660
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling updateProjectSpanGroup.");
3661
+ }
3662
+ // verify required parameter 'projectId' is not null or undefined
3663
+ if (projectId === null || projectId === undefined) {
3664
+ throw new RequiredError("projectId", "Required parameter projectId was null or undefined when calling updateProjectSpanGroup.");
3665
+ }
3666
+ // verify required parameter 'id' is not null or undefined
3667
+ if (id === null || id === undefined) {
3668
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling updateProjectSpanGroup.");
3669
+ }
3670
+ const localVarPath = `/projects/{project_id}/span_groups/{id}`
3671
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
3672
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3673
+ const localVarUrlObj = url.parse(localVarPath, true);
3674
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
3675
+ const localVarHeaderParameter = {};
3676
+ const localVarQueryParameter = {};
3677
+ // authentication tokenAuth required
3678
+ if (configuration && configuration.apiKey) {
3679
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3680
+ ? configuration.apiKey("Authorization")
3681
+ : configuration.apiKey;
3682
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3683
+ }
3684
+ localVarHeaderParameter["Content-Type"] = "application/json";
3685
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3686
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3687
+ localVarUrlObj.search = null;
3688
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3689
+ const needsSerialization = "SpanGroupsIdBody" !== "string" ||
3690
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3691
+ localVarRequestOptions.body = needsSerialization
3692
+ ? JSON.stringify(body || {})
3693
+ : body || "";
3694
+ return {
3695
+ url: url.format(localVarUrlObj),
3696
+ options: localVarRequestOptions,
3697
+ };
3698
+ },
3699
+ /**
3700
+ *
3701
+ * @summary Update a Release Group
3702
+ * @param {ReleaseGroupsIdBody} body
3703
+ * @param {string} id ID of release group to update
3704
+ * @param {*} [options] Override http request option.
3705
+ * @throws {RequiredError}
3706
+ */
3707
+ updateReleaseGroup(body, id, options = {}) {
3708
+ // verify required parameter 'body' is not null or undefined
3709
+ if (body === null || body === undefined) {
3710
+ throw new RequiredError("body", "Required parameter body was null or undefined when calling updateReleaseGroup.");
3711
+ }
3712
+ // verify required parameter 'id' is not null or undefined
3713
+ if (id === null || id === undefined) {
3714
+ throw new RequiredError("id", "Required parameter id was null or undefined when calling updateReleaseGroup.");
3715
+ }
3716
+ const localVarPath = `/release_groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
3717
+ const localVarUrlObj = url.parse(localVarPath, true);
3718
+ const localVarRequestOptions = Object.assign({ method: "PATCH" }, options);
3719
+ const localVarHeaderParameter = {};
3720
+ const localVarQueryParameter = {};
3721
+ // authentication tokenAuth required
3722
+ if (configuration && configuration.apiKey) {
3723
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
3724
+ ? configuration.apiKey("Authorization")
3725
+ : configuration.apiKey;
3726
+ localVarHeaderParameter["Authorization"] = localVarApiKeyValue;
3727
+ }
3728
+ localVarHeaderParameter["Content-Type"] = "application/json";
3729
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
3730
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
3731
+ localVarUrlObj.search = null;
3732
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
3733
+ const needsSerialization = "ReleaseGroupsIdBody" !== "string" ||
3734
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
3735
+ localVarRequestOptions.body = needsSerialization
3736
+ ? JSON.stringify(body || {})
3737
+ : body || "";
3738
+ return {
3739
+ url: url.format(localVarUrlObj),
3740
+ options: localVarRequestOptions,
3741
+ };
3742
+ },
3743
+ });