@sentry/api 0.96.0 → 0.98.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.
@@ -2860,12 +2860,13 @@ export type ExternalTeam = {
2860
2860
  * * `github_enterprise`
2861
2861
  * * `jira_server`
2862
2862
  * * `slack`
2863
+ * * `slack_staging`
2863
2864
  * * `perforce`
2864
2865
  * * `gitlab`
2865
2866
  * * `msteams`
2866
2867
  * * `custom_scm`
2867
2868
  */
2868
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
2869
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
2869
2870
  /**
2870
2871
  * The Integration ID.
2871
2872
  */
@@ -2896,12 +2897,13 @@ export type ExternalUser = {
2896
2897
  * * `github_enterprise`
2897
2898
  * * `jira_server`
2898
2899
  * * `slack`
2900
+ * * `slack_staging`
2899
2901
  * * `perforce`
2900
2902
  * * `gitlab`
2901
2903
  * * `msteams`
2902
2904
  * * `custom_scm`
2903
2905
  */
2904
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
2906
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
2905
2907
  /**
2906
2908
  * The Integration ID.
2907
2909
  */
@@ -9370,12 +9372,13 @@ export type ExternalUserWritable = {
9370
9372
  * * `github_enterprise`
9371
9373
  * * `jira_server`
9372
9374
  * * `slack`
9375
+ * * `slack_staging`
9373
9376
  * * `perforce`
9374
9377
  * * `gitlab`
9375
9378
  * * `msteams`
9376
9379
  * * `custom_scm`
9377
9380
  */
9378
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
9381
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
9379
9382
  /**
9380
9383
  * The Integration ID.
9381
9384
  */
@@ -11778,7 +11781,197 @@ export type FetchAnOrganizationSMonitorsResponses = {
11778
11781
  }>;
11779
11782
  };
11780
11783
  export type FetchAnOrganizationSMonitorsResponse = FetchAnOrganizationSMonitorsResponses[keyof FetchAnOrganizationSMonitorsResponses];
11781
- export type CreateAMonitorForAProjectData = {
11784
+ export type MutateAnOrganizationSMonitorsData = {
11785
+ body: {
11786
+ /**
11787
+ * Whether to enable or disable the monitors
11788
+ */
11789
+ enabled: boolean;
11790
+ };
11791
+ path: {
11792
+ /**
11793
+ * The ID or slug of the organization the resource belongs to.
11794
+ */
11795
+ organization_id_or_slug: string;
11796
+ };
11797
+ query?: {
11798
+ /**
11799
+ * The IDs of projects to filter by. `-1` means all available projects.
11800
+ * For example, the following are valid parameters:
11801
+ * - `/?project=1234&project=56789`
11802
+ * - `/?project=-1`
11803
+ *
11804
+ */
11805
+ project?: Array<number>;
11806
+ /**
11807
+ * An optional search query for filtering monitors.
11808
+ *
11809
+ * Available fields are:
11810
+ * - `name`
11811
+ * - `type`: e.g. `error`, `metric_issue`, `issue_stream`
11812
+ * - `assignee`: email, username, #team, me, none
11813
+ *
11814
+ */
11815
+ query?: string;
11816
+ /**
11817
+ * The ID of the monitor you'd like to query.
11818
+ */
11819
+ id?: Array<number>;
11820
+ };
11821
+ url: '/api/0/organizations/{organization_id_or_slug}/detectors/';
11822
+ };
11823
+ export type MutateAnOrganizationSMonitorsErrors = {
11824
+ /**
11825
+ * Bad Request
11826
+ */
11827
+ 400: unknown;
11828
+ /**
11829
+ * Unauthorized
11830
+ */
11831
+ 401: unknown;
11832
+ /**
11833
+ * Forbidden
11834
+ */
11835
+ 403: unknown;
11836
+ /**
11837
+ * Not Found
11838
+ */
11839
+ 404: unknown;
11840
+ };
11841
+ export type MutateAnOrganizationSMonitorsResponses = {
11842
+ 200: Array<{
11843
+ owner?: {
11844
+ type: 'user' | 'team';
11845
+ id: string;
11846
+ name: string;
11847
+ email?: string;
11848
+ } | null;
11849
+ createdBy?: string | null;
11850
+ latestGroup?: {
11851
+ [key: string]: unknown;
11852
+ } | null;
11853
+ description?: string | null;
11854
+ id: string;
11855
+ projectId: string;
11856
+ name: string;
11857
+ type: string;
11858
+ workflowIds: Array<string> | null;
11859
+ dateCreated: string;
11860
+ dateUpdated: string;
11861
+ dataSources: Array<{
11862
+ [key: string]: unknown;
11863
+ }> | null;
11864
+ conditionGroup: {
11865
+ [key: string]: unknown;
11866
+ } | null;
11867
+ config: {
11868
+ [key: string]: unknown;
11869
+ };
11870
+ enabled: boolean;
11871
+ openIssues: number;
11872
+ }>;
11873
+ };
11874
+ export type MutateAnOrganizationSMonitorsResponse = MutateAnOrganizationSMonitorsResponses[keyof MutateAnOrganizationSMonitorsResponses];
11875
+ export type DeleteAMonitorData = {
11876
+ body?: never;
11877
+ path: {
11878
+ /**
11879
+ * The ID or slug of the organization the resource belongs to.
11880
+ */
11881
+ organization_id_or_slug: string;
11882
+ /**
11883
+ * The ID of the monitor you'd like to query.
11884
+ */
11885
+ detector_id: number;
11886
+ };
11887
+ query?: never;
11888
+ url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
11889
+ };
11890
+ export type DeleteAMonitorErrors = {
11891
+ /**
11892
+ * Forbidden
11893
+ */
11894
+ 403: unknown;
11895
+ /**
11896
+ * Not Found
11897
+ */
11898
+ 404: unknown;
11899
+ };
11900
+ export type DeleteAMonitorResponses = {
11901
+ /**
11902
+ * No Content
11903
+ */
11904
+ 204: void;
11905
+ };
11906
+ export type DeleteAMonitorResponse = DeleteAMonitorResponses[keyof DeleteAMonitorResponses];
11907
+ export type FetchAMonitorData = {
11908
+ body?: never;
11909
+ path: {
11910
+ /**
11911
+ * The ID or slug of the organization the resource belongs to.
11912
+ */
11913
+ organization_id_or_slug: string;
11914
+ /**
11915
+ * The ID of the monitor you'd like to query.
11916
+ */
11917
+ detector_id: number;
11918
+ };
11919
+ query?: never;
11920
+ url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
11921
+ };
11922
+ export type FetchAMonitorErrors = {
11923
+ /**
11924
+ * Bad Request
11925
+ */
11926
+ 400: unknown;
11927
+ /**
11928
+ * Unauthorized
11929
+ */
11930
+ 401: unknown;
11931
+ /**
11932
+ * Forbidden
11933
+ */
11934
+ 403: unknown;
11935
+ /**
11936
+ * Not Found
11937
+ */
11938
+ 404: unknown;
11939
+ };
11940
+ export type FetchAMonitorResponses = {
11941
+ 200: {
11942
+ owner?: {
11943
+ type: 'user' | 'team';
11944
+ id: string;
11945
+ name: string;
11946
+ email?: string;
11947
+ } | null;
11948
+ createdBy?: string | null;
11949
+ latestGroup?: {
11950
+ [key: string]: unknown;
11951
+ } | null;
11952
+ description?: string | null;
11953
+ id: string;
11954
+ projectId: string;
11955
+ name: string;
11956
+ type: string;
11957
+ workflowIds: Array<string> | null;
11958
+ dateCreated: string;
11959
+ dateUpdated: string;
11960
+ dataSources: Array<{
11961
+ [key: string]: unknown;
11962
+ }> | null;
11963
+ conditionGroup: {
11964
+ [key: string]: unknown;
11965
+ } | null;
11966
+ config: {
11967
+ [key: string]: unknown;
11968
+ };
11969
+ enabled: boolean;
11970
+ openIssues: number;
11971
+ };
11972
+ };
11973
+ export type FetchAMonitorResponse = FetchAMonitorResponses[keyof FetchAMonitorResponses];
11974
+ export type UpdateAMonitorByIdData = {
11782
11975
  /**
11783
11976
  * Allows parameters to be defined in snake case, but passed as camel case.
11784
11977
  *
@@ -11986,11 +12179,15 @@ export type CreateAMonitorForAProjectData = {
11986
12179
  * The ID or slug of the organization the resource belongs to.
11987
12180
  */
11988
12181
  organization_id_or_slug: string;
12182
+ /**
12183
+ * The ID of the monitor you'd like to query.
12184
+ */
12185
+ detector_id: number;
11989
12186
  };
11990
12187
  query?: never;
11991
- url: '/api/0/organizations/{organization_id_or_slug}/detectors/';
12188
+ url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
11992
12189
  };
11993
- export type CreateAMonitorForAProjectErrors = {
12190
+ export type UpdateAMonitorByIdErrors = {
11994
12191
  /**
11995
12192
  * Bad Request
11996
12193
  */
@@ -12008,8 +12205,8 @@ export type CreateAMonitorForAProjectErrors = {
12008
12205
  */
12009
12206
  404: unknown;
12010
12207
  };
12011
- export type CreateAMonitorForAProjectResponses = {
12012
- 201: {
12208
+ export type UpdateAMonitorByIdResponses = {
12209
+ 200: {
12013
12210
  owner?: {
12014
12211
  type: 'user' | 'team';
12015
12212
  id: string;
@@ -12041,14 +12238,9 @@ export type CreateAMonitorForAProjectResponses = {
12041
12238
  openIssues: number;
12042
12239
  };
12043
12240
  };
12044
- export type CreateAMonitorForAProjectResponse = CreateAMonitorForAProjectResponses[keyof CreateAMonitorForAProjectResponses];
12045
- export type MutateAnOrganizationSMonitorsData = {
12046
- body: {
12047
- /**
12048
- * Whether to enable or disable the monitors
12049
- */
12050
- enabled: boolean;
12051
- };
12241
+ export type UpdateAMonitorByIdResponse = UpdateAMonitorByIdResponses[keyof UpdateAMonitorByIdResponses];
12242
+ export type ListAnOrganizationSDiscoverSavedQueriesData = {
12243
+ body?: never;
12052
12244
  path: {
12053
12245
  /**
12054
12246
  * The ID or slug of the organization the resource belongs to.
@@ -12057,39 +12249,38 @@ export type MutateAnOrganizationSMonitorsData = {
12057
12249
  };
12058
12250
  query?: {
12059
12251
  /**
12060
- * The IDs of projects to filter by. `-1` means all available projects.
12061
- * For example, the following are valid parameters:
12062
- * - `/?project=1234&project=56789`
12063
- * - `/?project=-1`
12064
- *
12252
+ * Limit the number of rows to return in the result. Default and maximum allowed is 100.
12065
12253
  */
12066
- project?: Array<number>;
12254
+ per_page?: number;
12067
12255
  /**
12068
- * An optional search query for filtering monitors.
12256
+ * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
12257
+ */
12258
+ cursor?: string;
12259
+ /**
12260
+ * The name of the Discover query you'd like to filter by.
12261
+ */
12262
+ query?: string;
12263
+ /**
12264
+ * The property to sort results by. If not specified, the results are sorted by query name.
12069
12265
  *
12070
12266
  * Available fields are:
12071
12267
  * - `name`
12072
- * - `type`: e.g. `error`, `metric_issue`, `issue_stream`
12073
- * - `assignee`: email, username, #team, me, none
12268
+ * - `dateCreated`
12269
+ * - `dateUpdated`
12270
+ * - `mostPopular`
12271
+ * - `recentlyViewed`
12272
+ * - `myqueries`
12074
12273
  *
12075
12274
  */
12076
- query?: string;
12077
- /**
12078
- * The ID of the monitor you'd like to query.
12079
- */
12080
- id?: Array<number>;
12275
+ sortBy?: string;
12081
12276
  };
12082
- url: '/api/0/organizations/{organization_id_or_slug}/detectors/';
12277
+ url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/';
12083
12278
  };
12084
- export type MutateAnOrganizationSMonitorsErrors = {
12279
+ export type ListAnOrganizationSDiscoverSavedQueriesErrors = {
12085
12280
  /**
12086
12281
  * Bad Request
12087
12282
  */
12088
12283
  400: unknown;
12089
- /**
12090
- * Unauthorized
12091
- */
12092
- 401: unknown;
12093
12284
  /**
12094
12285
  * Forbidden
12095
12286
  */
@@ -12099,96 +12290,177 @@ export type MutateAnOrganizationSMonitorsErrors = {
12099
12290
  */
12100
12291
  404: unknown;
12101
12292
  };
12102
- export type MutateAnOrganizationSMonitorsResponses = {
12293
+ export type ListAnOrganizationSDiscoverSavedQueriesResponses = {
12103
12294
  200: Array<{
12104
- owner?: {
12105
- type: 'user' | 'team';
12106
- id: string;
12107
- name: string;
12108
- email?: string;
12109
- } | null;
12110
- createdBy?: string | null;
12111
- latestGroup?: {
12295
+ environment?: Array<string>;
12296
+ query?: string;
12297
+ fields?: Array<string>;
12298
+ widths?: Array<string>;
12299
+ conditions?: Array<string>;
12300
+ aggregations?: Array<string>;
12301
+ range?: string;
12302
+ start?: string;
12303
+ end?: string;
12304
+ orderby?: string;
12305
+ limit?: string;
12306
+ yAxis?: Array<string>;
12307
+ display?: string;
12308
+ topEvents?: number;
12309
+ interval?: string;
12310
+ exploreQuery?: {
12112
12311
  [key: string]: unknown;
12113
- } | null;
12114
- description?: string | null;
12312
+ };
12115
12313
  id: string;
12116
- projectId: string;
12117
12314
  name: string;
12118
- type: string;
12119
- workflowIds: Array<string> | null;
12315
+ projects: Array<number>;
12316
+ version: number;
12317
+ queryDataset: string;
12318
+ datasetSource: string;
12319
+ expired: boolean;
12120
12320
  dateCreated: string;
12121
12321
  dateUpdated: string;
12122
- dataSources: Array<{
12123
- [key: string]: unknown;
12124
- }> | null;
12125
- conditionGroup: {
12126
- [key: string]: unknown;
12127
- } | null;
12128
- config: {
12129
- [key: string]: unknown;
12322
+ createdBy: {
12323
+ identities?: Array<{
12324
+ id: string;
12325
+ name: string;
12326
+ organization: {
12327
+ slug: string;
12328
+ name: string;
12329
+ };
12330
+ provider: {
12331
+ id: string;
12332
+ name: string;
12333
+ };
12334
+ dateVerified: string;
12335
+ dateSynced: string;
12336
+ }>;
12337
+ avatar?: {
12338
+ avatarType?: string;
12339
+ avatarUuid?: string | null;
12340
+ avatarUrl?: string | null;
12341
+ };
12342
+ authenticators?: Array<unknown>;
12343
+ canReset2fa?: boolean;
12344
+ id: string;
12345
+ name: string;
12346
+ username: string;
12347
+ email: string;
12348
+ avatarUrl: string;
12349
+ isActive: boolean;
12350
+ hasPasswordAuth: boolean;
12351
+ isManaged: boolean;
12352
+ dateJoined: string;
12353
+ lastLogin: string | null;
12354
+ has2fa: boolean;
12355
+ lastActive: string | null;
12356
+ isSuperuser: boolean;
12357
+ isStaff: boolean;
12358
+ experiments: {
12359
+ [key: string]: unknown;
12360
+ };
12361
+ emails: Array<{
12362
+ id: string;
12363
+ email: string;
12364
+ is_verified: boolean;
12365
+ }>;
12130
12366
  };
12131
- enabled: boolean;
12132
- openIssues: number;
12133
12367
  }>;
12134
12368
  };
12135
- export type MutateAnOrganizationSMonitorsResponse = MutateAnOrganizationSMonitorsResponses[keyof MutateAnOrganizationSMonitorsResponses];
12136
- export type DeleteAMonitorData = {
12137
- body?: never;
12138
- path: {
12369
+ export type ListAnOrganizationSDiscoverSavedQueriesResponse = ListAnOrganizationSDiscoverSavedQueriesResponses[keyof ListAnOrganizationSDiscoverSavedQueriesResponses];
12370
+ export type CreateANewSavedQueryData = {
12371
+ body: {
12139
12372
  /**
12140
- * The ID or slug of the organization the resource belongs to.
12373
+ * The user-defined saved query name.
12141
12374
  */
12142
- organization_id_or_slug: string;
12375
+ name: string;
12143
12376
  /**
12144
- * The ID of the monitor you'd like to query.
12377
+ * The saved projects filter for this query.
12145
12378
  */
12146
- detector_id: number;
12379
+ projects?: Array<number>;
12380
+ /**
12381
+ * The dataset you would like to query. Note: `discover` is a **deprecated** value. The allowed values are: `error-events`, `transaction-like`
12382
+ *
12383
+ * * `discover`
12384
+ * * `error-events`
12385
+ * * `transaction-like`
12386
+ */
12387
+ queryDataset?: 'discover' | 'error-events' | 'transaction-like';
12388
+ /**
12389
+ * The saved start time for this saved query.
12390
+ */
12391
+ start?: string | null;
12392
+ /**
12393
+ * The saved end time for this saved query.
12394
+ */
12395
+ end?: string | null;
12396
+ /**
12397
+ * The saved time range period for this saved query.
12398
+ */
12399
+ range?: string | null;
12400
+ /**
12401
+ * The fields, functions, or equations that can be requested for the query. At most 20 fields can be selected per request. Each field can be one of the following types:
12402
+ * - A built-in key field. See possible fields in the [properties table](/product/sentry-basics/search/searchable-properties/#properties-table), under any field that is an event property.
12403
+ * - example: `field=transaction`
12404
+ * - A tag. Tags should use the `tag[]` formatting to avoid ambiguity with any fields
12405
+ * - example: `field=tag[isEnterprise]`
12406
+ * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions).
12407
+ * - when a function is included, Discover will group by any tags or fields
12408
+ * - example: `field=count_if(transaction.duration,greater,300)`
12409
+ * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/).
12410
+ * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100`
12411
+ *
12412
+ */
12413
+ fields?: Array<string> | null;
12414
+ /**
12415
+ * How to order the query results. Must be something in the `field` list, excluding equations.
12416
+ */
12417
+ orderby?: string | null;
12418
+ /**
12419
+ * The name of environments to filter by.
12420
+ */
12421
+ environment?: Array<string> | null;
12422
+ /**
12423
+ * Filters results by using [query syntax](/product/sentry-basics/search/).
12424
+ */
12425
+ query?: string | null;
12426
+ /**
12427
+ * Aggregate functions to be plotted on the chart.
12428
+ */
12429
+ yAxis?: Array<string> | null;
12430
+ /**
12431
+ * Visualization type for saved query chart. Allowed values are:
12432
+ * - default
12433
+ * - previous
12434
+ * - top5
12435
+ * - daily
12436
+ * - dailytop5
12437
+ * - bar
12438
+ *
12439
+ */
12440
+ display?: string | null;
12441
+ /**
12442
+ * Number of top events' timeseries to be visualized.
12443
+ */
12444
+ topEvents?: number | null;
12445
+ /**
12446
+ * Resolution of the time series.
12447
+ */
12448
+ interval?: string | null;
12147
12449
  };
12148
- query?: never;
12149
- url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
12150
- };
12151
- export type DeleteAMonitorErrors = {
12152
- /**
12153
- * Forbidden
12154
- */
12155
- 403: unknown;
12156
- /**
12157
- * Not Found
12158
- */
12159
- 404: unknown;
12160
- };
12161
- export type DeleteAMonitorResponses = {
12162
- /**
12163
- * No Content
12164
- */
12165
- 204: void;
12166
- };
12167
- export type DeleteAMonitorResponse = DeleteAMonitorResponses[keyof DeleteAMonitorResponses];
12168
- export type FetchAMonitorData = {
12169
- body?: never;
12170
12450
  path: {
12171
12451
  /**
12172
12452
  * The ID or slug of the organization the resource belongs to.
12173
12453
  */
12174
12454
  organization_id_or_slug: string;
12175
- /**
12176
- * The ID of the monitor you'd like to query.
12177
- */
12178
- detector_id: number;
12179
12455
  };
12180
12456
  query?: never;
12181
- url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
12457
+ url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/';
12182
12458
  };
12183
- export type FetchAMonitorErrors = {
12459
+ export type CreateANewSavedQueryErrors = {
12184
12460
  /**
12185
12461
  * Bad Request
12186
12462
  */
12187
12463
  400: unknown;
12188
- /**
12189
- * Unauthorized
12190
- */
12191
- 401: unknown;
12192
12464
  /**
12193
12465
  * Forbidden
12194
12466
  */
@@ -12198,566 +12470,33 @@ export type FetchAMonitorErrors = {
12198
12470
  */
12199
12471
  404: unknown;
12200
12472
  };
12201
- export type FetchAMonitorResponses = {
12202
- 200: {
12203
- owner?: {
12204
- type: 'user' | 'team';
12205
- id: string;
12206
- name: string;
12207
- email?: string;
12208
- } | null;
12209
- createdBy?: string | null;
12210
- latestGroup?: {
12473
+ export type CreateANewSavedQueryResponses = {
12474
+ 201: {
12475
+ environment?: Array<string>;
12476
+ query?: string;
12477
+ fields?: Array<string>;
12478
+ widths?: Array<string>;
12479
+ conditions?: Array<string>;
12480
+ aggregations?: Array<string>;
12481
+ range?: string;
12482
+ start?: string;
12483
+ end?: string;
12484
+ orderby?: string;
12485
+ limit?: string;
12486
+ yAxis?: Array<string>;
12487
+ display?: string;
12488
+ topEvents?: number;
12489
+ interval?: string;
12490
+ exploreQuery?: {
12211
12491
  [key: string]: unknown;
12212
- } | null;
12213
- description?: string | null;
12492
+ };
12214
12493
  id: string;
12215
- projectId: string;
12216
12494
  name: string;
12217
- type: string;
12218
- workflowIds: Array<string> | null;
12219
- dateCreated: string;
12220
- dateUpdated: string;
12221
- dataSources: Array<{
12222
- [key: string]: unknown;
12223
- }> | null;
12224
- conditionGroup: {
12225
- [key: string]: unknown;
12226
- } | null;
12227
- config: {
12228
- [key: string]: unknown;
12229
- };
12230
- enabled: boolean;
12231
- openIssues: number;
12232
- };
12233
- };
12234
- export type FetchAMonitorResponse = FetchAMonitorResponses[keyof FetchAMonitorResponses];
12235
- export type UpdateAMonitorByIdData = {
12236
- /**
12237
- * Allows parameters to be defined in snake case, but passed as camel case.
12238
- *
12239
- * Errors are output in camel case.
12240
- */
12241
- body: {
12242
- /**
12243
- * Name of the monitor.
12244
- */
12245
- name: string;
12246
- /**
12247
- * The type of monitor - `metric_issue`.
12248
- */
12249
- type: string;
12250
- /**
12251
- * The IDs of the alerts to connect this monitor to. Use the 'Fetch Alerts' endpoint to find the IDs.
12252
- */
12253
- workflow_ids?: Array<number>;
12254
- /**
12255
- *
12256
- * The data sources for the monitor to use based on what you want to measure.
12257
- *
12258
- * **Number of Errors Metric Monitor**
12259
- * ```json
12260
- * [
12261
- * {
12262
- * "aggregate": "count()",
12263
- * "dataset" : "events",
12264
- * "environment": "prod",
12265
- * "eventTypes": ["default", "error"],
12266
- * "query": "is:unresolved",
12267
- * "queryType": 0,
12268
- * "timeWindow": 3600,
12269
- * },
12270
- * ],
12271
- * ```
12272
- *
12273
- * **Users Experiencing Errors Metric Monitor**
12274
- * ```json
12275
- * [
12276
- * {
12277
- * "aggregate": "count_unique(tags[sentry:user])",
12278
- * "dataset" : "events",
12279
- * "environment": "prod",
12280
- * "eventTypes": ["default", "error"],
12281
- * "query": "is:unresolved",
12282
- * "queryType": 0,
12283
- * "timeWindow": 3600,
12284
- * },
12285
- * ],
12286
- * ```
12287
- *
12288
- *
12289
- * **Throughput Metric Monitor**
12290
- * ```json
12291
- * [
12292
- * {
12293
- * "aggregate":"count(span.duration)",
12294
- * "dataset":"events_analytics_platform",
12295
- * "environment":"prod",
12296
- * "eventTypes":["trace_item_span"]
12297
- * "query":"",
12298
- * "queryType":1,
12299
- * "timeWindow":3600,
12300
- * "extrapolationMode":"unknown",
12301
- * },
12302
- * ],
12303
- * ```
12304
- *
12305
- * **Duration Metric Monitor**
12306
- * ```json
12307
- * [
12308
- * {
12309
- * "aggregate":"p95(span.duration)",
12310
- * "dataset":"events_analytics_platform",
12311
- * "environment":"prod",
12312
- * "eventTypes":["trace_item_span"]
12313
- * "query":"",
12314
- * "queryType":1,
12315
- * "timeWindow":3600,
12316
- * "extrapolationMode":"unknown",
12317
- * },
12318
- * ],
12319
- * ```
12320
- *
12321
- * **Failure Rate Metric Monitor**
12322
- * ```json
12323
- * [
12324
- * {
12325
- * "aggregate":"failure_rate()",
12326
- * "dataset":"events_analytics_platform",
12327
- * "environment":"prod",
12328
- * "eventTypes":["trace_item_span"]
12329
- * "query":"",
12330
- * "queryType":1,
12331
- * "timeWindow":3600,
12332
- * "extrapolationMode":"unknown",
12333
- * },
12334
- * ],
12335
- * ```
12336
- *
12337
- * **Largest Contentful Paint Metric Monitor**
12338
- * ```json
12339
- * [
12340
- * {
12341
- * "aggregate":"p95(measurements.lcp)",
12342
- * "dataset":"events_analytics_platform",
12343
- * "environment":"prod",
12344
- * "eventTypes":["trace_item_span"]
12345
- * "query":"",
12346
- * "queryType":1,
12347
- * "timeWindow":3600,
12348
- * "extrapolationMode":"unknown",
12349
- * },
12350
- * ],
12351
- * ```
12352
- *
12353
- */
12354
- data_sources?: Array<unknown>;
12355
- /**
12356
- *
12357
- * The issue detection type configuration.
12358
- *
12359
- *
12360
- * - `detectionType`
12361
- * - `static`: Threshold based monitor
12362
- * - `percent`: Change based monitor
12363
- * - `dynamic`: Dynamic monitor
12364
- * - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes.
12365
- * For example, a value of 3600 compares the metric tracked against data 1 hour ago.
12366
- * - `300`: 5 minutes
12367
- * - `900`: 15 minutes
12368
- * - `3600`: 1 hour
12369
- * - `86400`: 1 day
12370
- * - `604800`: 1 week
12371
- * - `2592000`: 1 month
12372
- *
12373
- * **Threshold**
12374
- * ```json
12375
- * {
12376
- * "detectionType": "static",
12377
- * }
12378
- * ```
12379
- * **Change**
12380
- * ```json
12381
- * {
12382
- * "detectionType": "percent",
12383
- * "comparisonDelta": 3600,
12384
- * }
12385
- * ```
12386
- * **Dynamic**
12387
- * ```json
12388
- * {
12389
- * "detectionType": "dynamic",
12390
- * }
12391
- * ```
12392
- *
12393
- */
12394
- config?: {
12395
- [key: string]: unknown;
12396
- };
12397
- /**
12398
- * Allows parameters to be defined in snake case, but passed as camel case.
12399
- *
12400
- * Errors are output in camel case.
12401
- */
12402
- condition_group?: {
12403
- id?: string;
12404
- /**
12405
- * * `any`
12406
- * * `any-short`
12407
- * * `all`
12408
- * * `none`
12409
- */
12410
- logic_type: 'any' | 'any-short' | 'all' | 'none';
12411
- conditions?: Array<unknown>;
12412
- };
12413
- /**
12414
- *
12415
- * The ID user or team who owns the monitor or alert prefaced by the string 'user' or 'team'.
12416
- *
12417
- * **User**
12418
- * ```json
12419
- * "user:123456"
12420
- * ```
12421
- *
12422
- * **Team**
12423
- * ```json
12424
- * "team:456789"
12425
- * ```
12426
- *
12427
- */
12428
- owner?: string | null;
12429
- /**
12430
- * A description of the monitor. Will be used in the resulting issue.
12431
- */
12432
- description?: string | null;
12433
- /**
12434
- * Set to False if you want to disable the monitor.
12435
- */
12436
- enabled?: boolean;
12437
- };
12438
- path: {
12439
- /**
12440
- * The ID or slug of the organization the resource belongs to.
12441
- */
12442
- organization_id_or_slug: string;
12443
- /**
12444
- * The ID of the monitor you'd like to query.
12445
- */
12446
- detector_id: number;
12447
- };
12448
- query?: never;
12449
- url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/';
12450
- };
12451
- export type UpdateAMonitorByIdErrors = {
12452
- /**
12453
- * Bad Request
12454
- */
12455
- 400: unknown;
12456
- /**
12457
- * Unauthorized
12458
- */
12459
- 401: unknown;
12460
- /**
12461
- * Forbidden
12462
- */
12463
- 403: unknown;
12464
- /**
12465
- * Not Found
12466
- */
12467
- 404: unknown;
12468
- };
12469
- export type UpdateAMonitorByIdResponses = {
12470
- 200: {
12471
- owner?: {
12472
- type: 'user' | 'team';
12473
- id: string;
12474
- name: string;
12475
- email?: string;
12476
- } | null;
12477
- createdBy?: string | null;
12478
- latestGroup?: {
12479
- [key: string]: unknown;
12480
- } | null;
12481
- description?: string | null;
12482
- id: string;
12483
- projectId: string;
12484
- name: string;
12485
- type: string;
12486
- workflowIds: Array<string> | null;
12487
- dateCreated: string;
12488
- dateUpdated: string;
12489
- dataSources: Array<{
12490
- [key: string]: unknown;
12491
- }> | null;
12492
- conditionGroup: {
12493
- [key: string]: unknown;
12494
- } | null;
12495
- config: {
12496
- [key: string]: unknown;
12497
- };
12498
- enabled: boolean;
12499
- openIssues: number;
12500
- };
12501
- };
12502
- export type UpdateAMonitorByIdResponse = UpdateAMonitorByIdResponses[keyof UpdateAMonitorByIdResponses];
12503
- export type ListAnOrganizationSDiscoverSavedQueriesData = {
12504
- body?: never;
12505
- path: {
12506
- /**
12507
- * The ID or slug of the organization the resource belongs to.
12508
- */
12509
- organization_id_or_slug: string;
12510
- };
12511
- query?: {
12512
- /**
12513
- * Limit the number of rows to return in the result. Default and maximum allowed is 100.
12514
- */
12515
- per_page?: number;
12516
- /**
12517
- * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
12518
- */
12519
- cursor?: string;
12520
- /**
12521
- * The name of the Discover query you'd like to filter by.
12522
- */
12523
- query?: string;
12524
- /**
12525
- * The property to sort results by. If not specified, the results are sorted by query name.
12526
- *
12527
- * Available fields are:
12528
- * - `name`
12529
- * - `dateCreated`
12530
- * - `dateUpdated`
12531
- * - `mostPopular`
12532
- * - `recentlyViewed`
12533
- * - `myqueries`
12534
- *
12535
- */
12536
- sortBy?: string;
12537
- };
12538
- url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/';
12539
- };
12540
- export type ListAnOrganizationSDiscoverSavedQueriesErrors = {
12541
- /**
12542
- * Bad Request
12543
- */
12544
- 400: unknown;
12545
- /**
12546
- * Forbidden
12547
- */
12548
- 403: unknown;
12549
- /**
12550
- * Not Found
12551
- */
12552
- 404: unknown;
12553
- };
12554
- export type ListAnOrganizationSDiscoverSavedQueriesResponses = {
12555
- 200: Array<{
12556
- environment?: Array<string>;
12557
- query?: string;
12558
- fields?: Array<string>;
12559
- widths?: Array<string>;
12560
- conditions?: Array<string>;
12561
- aggregations?: Array<string>;
12562
- range?: string;
12563
- start?: string;
12564
- end?: string;
12565
- orderby?: string;
12566
- limit?: string;
12567
- yAxis?: Array<string>;
12568
- display?: string;
12569
- topEvents?: number;
12570
- interval?: string;
12571
- exploreQuery?: {
12572
- [key: string]: unknown;
12573
- };
12574
- id: string;
12575
- name: string;
12576
- projects: Array<number>;
12577
- version: number;
12578
- queryDataset: string;
12579
- datasetSource: string;
12580
- expired: boolean;
12581
- dateCreated: string;
12582
- dateUpdated: string;
12583
- createdBy: {
12584
- identities?: Array<{
12585
- id: string;
12586
- name: string;
12587
- organization: {
12588
- slug: string;
12589
- name: string;
12590
- };
12591
- provider: {
12592
- id: string;
12593
- name: string;
12594
- };
12595
- dateVerified: string;
12596
- dateSynced: string;
12597
- }>;
12598
- avatar?: {
12599
- avatarType?: string;
12600
- avatarUuid?: string | null;
12601
- avatarUrl?: string | null;
12602
- };
12603
- authenticators?: Array<unknown>;
12604
- canReset2fa?: boolean;
12605
- id: string;
12606
- name: string;
12607
- username: string;
12608
- email: string;
12609
- avatarUrl: string;
12610
- isActive: boolean;
12611
- hasPasswordAuth: boolean;
12612
- isManaged: boolean;
12613
- dateJoined: string;
12614
- lastLogin: string | null;
12615
- has2fa: boolean;
12616
- lastActive: string | null;
12617
- isSuperuser: boolean;
12618
- isStaff: boolean;
12619
- experiments: {
12620
- [key: string]: unknown;
12621
- };
12622
- emails: Array<{
12623
- id: string;
12624
- email: string;
12625
- is_verified: boolean;
12626
- }>;
12627
- };
12628
- }>;
12629
- };
12630
- export type ListAnOrganizationSDiscoverSavedQueriesResponse = ListAnOrganizationSDiscoverSavedQueriesResponses[keyof ListAnOrganizationSDiscoverSavedQueriesResponses];
12631
- export type CreateANewSavedQueryData = {
12632
- body: {
12633
- /**
12634
- * The user-defined saved query name.
12635
- */
12636
- name: string;
12637
- /**
12638
- * The saved projects filter for this query.
12639
- */
12640
- projects?: Array<number>;
12641
- /**
12642
- * The dataset you would like to query. Note: `discover` is a **deprecated** value. The allowed values are: `error-events`, `transaction-like`
12643
- *
12644
- * * `discover`
12645
- * * `error-events`
12646
- * * `transaction-like`
12647
- */
12648
- queryDataset?: 'discover' | 'error-events' | 'transaction-like';
12649
- /**
12650
- * The saved start time for this saved query.
12651
- */
12652
- start?: string | null;
12653
- /**
12654
- * The saved end time for this saved query.
12655
- */
12656
- end?: string | null;
12657
- /**
12658
- * The saved time range period for this saved query.
12659
- */
12660
- range?: string | null;
12661
- /**
12662
- * The fields, functions, or equations that can be requested for the query. At most 20 fields can be selected per request. Each field can be one of the following types:
12663
- * - A built-in key field. See possible fields in the [properties table](/product/sentry-basics/search/searchable-properties/#properties-table), under any field that is an event property.
12664
- * - example: `field=transaction`
12665
- * - A tag. Tags should use the `tag[]` formatting to avoid ambiguity with any fields
12666
- * - example: `field=tag[isEnterprise]`
12667
- * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions).
12668
- * - when a function is included, Discover will group by any tags or fields
12669
- * - example: `field=count_if(transaction.duration,greater,300)`
12670
- * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/).
12671
- * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100`
12672
- *
12673
- */
12674
- fields?: Array<string> | null;
12675
- /**
12676
- * How to order the query results. Must be something in the `field` list, excluding equations.
12677
- */
12678
- orderby?: string | null;
12679
- /**
12680
- * The name of environments to filter by.
12681
- */
12682
- environment?: Array<string> | null;
12683
- /**
12684
- * Filters results by using [query syntax](/product/sentry-basics/search/).
12685
- */
12686
- query?: string | null;
12687
- /**
12688
- * Aggregate functions to be plotted on the chart.
12689
- */
12690
- yAxis?: Array<string> | null;
12691
- /**
12692
- * Visualization type for saved query chart. Allowed values are:
12693
- * - default
12694
- * - previous
12695
- * - top5
12696
- * - daily
12697
- * - dailytop5
12698
- * - bar
12699
- *
12700
- */
12701
- display?: string | null;
12702
- /**
12703
- * Number of top events' timeseries to be visualized.
12704
- */
12705
- topEvents?: number | null;
12706
- /**
12707
- * Resolution of the time series.
12708
- */
12709
- interval?: string | null;
12710
- };
12711
- path: {
12712
- /**
12713
- * The ID or slug of the organization the resource belongs to.
12714
- */
12715
- organization_id_or_slug: string;
12716
- };
12717
- query?: never;
12718
- url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/';
12719
- };
12720
- export type CreateANewSavedQueryErrors = {
12721
- /**
12722
- * Bad Request
12723
- */
12724
- 400: unknown;
12725
- /**
12726
- * Forbidden
12727
- */
12728
- 403: unknown;
12729
- /**
12730
- * Not Found
12731
- */
12732
- 404: unknown;
12733
- };
12734
- export type CreateANewSavedQueryResponses = {
12735
- 201: {
12736
- environment?: Array<string>;
12737
- query?: string;
12738
- fields?: Array<string>;
12739
- widths?: Array<string>;
12740
- conditions?: Array<string>;
12741
- aggregations?: Array<string>;
12742
- range?: string;
12743
- start?: string;
12744
- end?: string;
12745
- orderby?: string;
12746
- limit?: string;
12747
- yAxis?: Array<string>;
12748
- display?: string;
12749
- topEvents?: number;
12750
- interval?: string;
12751
- exploreQuery?: {
12752
- [key: string]: unknown;
12753
- };
12754
- id: string;
12755
- name: string;
12756
- projects: Array<number>;
12757
- version: number;
12758
- queryDataset: string;
12759
- datasetSource: string;
12760
- expired: boolean;
12495
+ projects: Array<number>;
12496
+ version: number;
12497
+ queryDataset: string;
12498
+ datasetSource: string;
12499
+ expired: boolean;
12761
12500
  dateCreated: string;
12762
12501
  dateUpdated: string;
12763
12502
  createdBy: {
@@ -13516,12 +13255,13 @@ export type CreateAnExternalUserData = {
13516
13255
  * * `github_enterprise`
13517
13256
  * * `jira_server`
13518
13257
  * * `slack`
13258
+ * * `slack_staging`
13519
13259
  * * `perforce`
13520
13260
  * * `gitlab`
13521
13261
  * * `msteams`
13522
13262
  * * `custom_scm`
13523
13263
  */
13524
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
13264
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
13525
13265
  /**
13526
13266
  * The Integration ID.
13527
13267
  */
@@ -13629,12 +13369,13 @@ export type UpdateAnExternalUserData = {
13629
13369
  * * `github_enterprise`
13630
13370
  * * `jira_server`
13631
13371
  * * `slack`
13372
+ * * `slack_staging`
13632
13373
  * * `perforce`
13633
13374
  * * `gitlab`
13634
13375
  * * `msteams`
13635
13376
  * * `custom_scm`
13636
13377
  */
13637
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
13378
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
13638
13379
  /**
13639
13380
  * The Integration ID.
13640
13381
  */
@@ -18305,36 +18046,202 @@ export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganization
18305
18046
  flakeRatePercentChange: number;
18306
18047
  };
18307
18048
  };
18308
- export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponse = RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses[keyof RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses];
18309
- export type RetrieveTestSuitesBelongingToARepositorySTestResultsData = {
18049
+ export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponse = RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses[keyof RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses];
18050
+ export type RetrieveTestSuitesBelongingToARepositorySTestResultsData = {
18051
+ body?: never;
18052
+ path: {
18053
+ /**
18054
+ * The ID or slug of the organization the resource belongs to.
18055
+ */
18056
+ organization_id_or_slug: string;
18057
+ /**
18058
+ * The owner of the repository.
18059
+ */
18060
+ owner: string;
18061
+ /**
18062
+ * The name of the repository.
18063
+ */
18064
+ repository: string;
18065
+ };
18066
+ query?: {
18067
+ /**
18068
+ * The term substring to filter name strings by using the `contains` operator.
18069
+ */
18070
+ term?: string;
18071
+ };
18072
+ url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-suites/';
18073
+ };
18074
+ export type RetrieveTestSuitesBelongingToARepositorySTestResultsErrors = {
18075
+ /**
18076
+ * Bad Request
18077
+ */
18078
+ 400: unknown;
18079
+ /**
18080
+ * Forbidden
18081
+ */
18082
+ 403: unknown;
18083
+ /**
18084
+ * Not Found
18085
+ */
18086
+ 404: unknown;
18087
+ };
18088
+ export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponses = {
18089
+ /**
18090
+ * Serializer for test suites belonging to a repository's test results
18091
+ */
18092
+ 200: {
18093
+ testSuites: Array<string>;
18094
+ };
18095
+ };
18096
+ export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponse = RetrieveTestSuitesBelongingToARepositorySTestResultsResponses[keyof RetrieveTestSuitesBelongingToARepositorySTestResultsResponses];
18097
+ export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenData = {
18098
+ body?: never;
18099
+ path: {
18100
+ /**
18101
+ * The ID or slug of the organization the resource belongs to.
18102
+ */
18103
+ organization_id_or_slug: string;
18104
+ /**
18105
+ * The owner of the repository.
18106
+ */
18107
+ owner: string;
18108
+ /**
18109
+ * The name of the repository.
18110
+ */
18111
+ repository: string;
18112
+ };
18113
+ query?: never;
18114
+ url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/token/regenerate/';
18115
+ };
18116
+ export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenErrors = {
18117
+ /**
18118
+ * Bad Request
18119
+ */
18120
+ 400: unknown;
18121
+ /**
18122
+ * Forbidden
18123
+ */
18124
+ 403: unknown;
18125
+ /**
18126
+ * Not Found
18127
+ */
18128
+ 404: unknown;
18129
+ };
18130
+ export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses = {
18131
+ /**
18132
+ * Serializer for repositories response
18133
+ */
18134
+ 200: {
18135
+ token: string;
18136
+ };
18137
+ };
18138
+ export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponse = RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses[keyof RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses];
18139
+ export type ListAnOrganizationSClientKeysData = {
18140
+ body?: never;
18141
+ path: {
18142
+ /**
18143
+ * The ID or slug of the organization the resource belongs to.
18144
+ */
18145
+ organization_id_or_slug: string;
18146
+ };
18147
+ query?: {
18148
+ /**
18149
+ * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
18150
+ */
18151
+ cursor?: string;
18152
+ /**
18153
+ * Filter keys by team slug or ID. If provided, only keys for projects belonging to this team will be returned.
18154
+ */
18155
+ team?: string;
18156
+ /**
18157
+ * Filter keys by status. Options are 'active' or 'inactive'.
18158
+ *
18159
+ * * `active`
18160
+ * * `inactive`
18161
+ */
18162
+ status?: 'active' | 'inactive';
18163
+ };
18164
+ url: '/api/0/organizations/{organization_id_or_slug}/project-keys/';
18165
+ };
18166
+ export type ListAnOrganizationSClientKeysErrors = {
18167
+ /**
18168
+ * Bad Request
18169
+ */
18170
+ 400: unknown;
18171
+ /**
18172
+ * Forbidden
18173
+ */
18174
+ 403: unknown;
18175
+ /**
18176
+ * Not Found
18177
+ */
18178
+ 404: unknown;
18179
+ };
18180
+ export type ListAnOrganizationSClientKeysResponses = {
18181
+ 200: Array<{
18182
+ id: string;
18183
+ name: string;
18184
+ label: string;
18185
+ public: string | null;
18186
+ secret: string | null;
18187
+ projectId: number;
18188
+ isActive: boolean;
18189
+ rateLimit: {
18190
+ window: number;
18191
+ count: number;
18192
+ } | null;
18193
+ dsn: {
18194
+ secret: string;
18195
+ public: string;
18196
+ csp: string;
18197
+ security: string;
18198
+ minidump: string;
18199
+ nel: string;
18200
+ unreal: string;
18201
+ crons: string;
18202
+ cdn: string;
18203
+ playstation: string;
18204
+ integration: string;
18205
+ otlp_traces: string;
18206
+ otlp_logs: string;
18207
+ };
18208
+ browserSdkVersion: string;
18209
+ browserSdk: {
18210
+ choices: Array<Array<string>>;
18211
+ };
18212
+ dateCreated: string | null;
18213
+ dynamicSdkLoaderOptions: {
18214
+ hasReplay: boolean;
18215
+ hasPerformance: boolean;
18216
+ hasDebug: boolean;
18217
+ hasFeedback: boolean;
18218
+ hasLogsAndMetrics: boolean;
18219
+ };
18220
+ useCase?: string;
18221
+ }>;
18222
+ };
18223
+ export type ListAnOrganizationSClientKeysResponse = ListAnOrganizationSClientKeysResponses[keyof ListAnOrganizationSClientKeysResponses];
18224
+ export type ListAnOrganizationSProjectsData = {
18310
18225
  body?: never;
18311
18226
  path: {
18312
18227
  /**
18313
18228
  * The ID or slug of the organization the resource belongs to.
18314
18229
  */
18315
18230
  organization_id_or_slug: string;
18316
- /**
18317
- * The owner of the repository.
18318
- */
18319
- owner: string;
18320
- /**
18321
- * The name of the repository.
18322
- */
18323
- repository: string;
18324
18231
  };
18325
18232
  query?: {
18326
18233
  /**
18327
- * The term substring to filter name strings by using the `contains` operator.
18234
+ * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
18328
18235
  */
18329
- term?: string;
18236
+ cursor?: string;
18330
18237
  };
18331
- url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-suites/';
18238
+ url: '/api/0/organizations/{organization_id_or_slug}/projects/';
18332
18239
  };
18333
- export type RetrieveTestSuitesBelongingToARepositorySTestResultsErrors = {
18240
+ export type ListAnOrganizationSProjectsErrors = {
18334
18241
  /**
18335
- * Bad Request
18242
+ * Unauthorized
18336
18243
  */
18337
- 400: unknown;
18244
+ 401: unknown;
18338
18245
  /**
18339
18246
  * Forbidden
18340
18247
  */
@@ -18344,159 +18251,291 @@ export type RetrieveTestSuitesBelongingToARepositorySTestResultsErrors = {
18344
18251
  */
18345
18252
  404: unknown;
18346
18253
  };
18347
- export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponses = {
18254
+ export type ListAnOrganizationSProjectsResponses = {
18255
+ 200: Array<{
18256
+ latestDeploys?: {
18257
+ [key: string]: {
18258
+ [key: string]: string;
18259
+ };
18260
+ } | null;
18261
+ options?: {
18262
+ [key: string]: unknown;
18263
+ };
18264
+ stats?: unknown;
18265
+ transactionStats?: unknown;
18266
+ sessionStats?: unknown;
18267
+ id: string;
18268
+ slug: string;
18269
+ name: string;
18270
+ platform: string | null;
18271
+ dateCreated: string;
18272
+ isBookmarked: boolean;
18273
+ isMember: boolean;
18274
+ features: Array<string>;
18275
+ firstEvent: string | null;
18276
+ firstTransactionEvent: boolean;
18277
+ access: Array<string>;
18278
+ hasAccess: boolean;
18279
+ hasFeedbacks: boolean;
18280
+ hasFlags: boolean;
18281
+ hasMinifiedStackTrace: boolean;
18282
+ hasMonitors: boolean;
18283
+ hasNewFeedbacks: boolean;
18284
+ hasProfiles: boolean;
18285
+ hasReplays: boolean;
18286
+ hasSessions: boolean;
18287
+ hasInsightsHttp: boolean;
18288
+ hasInsightsDb: boolean;
18289
+ hasInsightsAssets: boolean;
18290
+ hasInsightsAppStart: boolean;
18291
+ hasInsightsScreenLoad: boolean;
18292
+ hasInsightsVitals: boolean;
18293
+ hasInsightsCaches: boolean;
18294
+ hasInsightsQueues: boolean;
18295
+ hasInsightsAgentMonitoring: boolean;
18296
+ hasInsightsMCP: boolean;
18297
+ hasLogs: boolean;
18298
+ hasTraceMetrics: boolean;
18299
+ team: {
18300
+ id: string;
18301
+ name: string;
18302
+ slug: string;
18303
+ } | null;
18304
+ teams: Array<{
18305
+ id: string;
18306
+ name: string;
18307
+ slug: string;
18308
+ }>;
18309
+ platforms: Array<string>;
18310
+ hasUserReports: boolean;
18311
+ environments: Array<string>;
18312
+ latestRelease: {
18313
+ version: string;
18314
+ } | null;
18315
+ }>;
18316
+ };
18317
+ export type ListAnOrganizationSProjectsResponse = ListAnOrganizationSProjectsResponses[keyof ListAnOrganizationSProjectsResponses];
18318
+ export type CreateAMonitorForAProjectData = {
18348
18319
  /**
18349
- * Serializer for test suites belonging to a repository's test results
18320
+ * Allows parameters to be defined in snake case, but passed as camel case.
18321
+ *
18322
+ * Errors are output in camel case.
18350
18323
  */
18351
- 200: {
18352
- testSuites: Array<string>;
18353
- };
18354
- };
18355
- export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponse = RetrieveTestSuitesBelongingToARepositorySTestResultsResponses[keyof RetrieveTestSuitesBelongingToARepositorySTestResultsResponses];
18356
- export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenData = {
18357
- body?: never;
18358
- path: {
18324
+ body: {
18325
+ /**
18326
+ * Name of the monitor.
18327
+ */
18328
+ name: string;
18329
+ /**
18330
+ * The type of monitor - `metric_issue`.
18331
+ */
18332
+ type: string;
18333
+ /**
18334
+ * The IDs of the alerts to connect this monitor to. Use the 'Fetch Alerts' endpoint to find the IDs.
18335
+ */
18336
+ workflow_ids?: Array<number>;
18337
+ /**
18338
+ *
18339
+ * The data sources for the monitor to use based on what you want to measure.
18340
+ *
18341
+ * **Number of Errors Metric Monitor**
18342
+ * ```json
18343
+ * [
18344
+ * {
18345
+ * "aggregate": "count()",
18346
+ * "dataset" : "events",
18347
+ * "environment": "prod",
18348
+ * "eventTypes": ["default", "error"],
18349
+ * "query": "is:unresolved",
18350
+ * "queryType": 0,
18351
+ * "timeWindow": 3600,
18352
+ * },
18353
+ * ],
18354
+ * ```
18355
+ *
18356
+ * **Users Experiencing Errors Metric Monitor**
18357
+ * ```json
18358
+ * [
18359
+ * {
18360
+ * "aggregate": "count_unique(tags[sentry:user])",
18361
+ * "dataset" : "events",
18362
+ * "environment": "prod",
18363
+ * "eventTypes": ["default", "error"],
18364
+ * "query": "is:unresolved",
18365
+ * "queryType": 0,
18366
+ * "timeWindow": 3600,
18367
+ * },
18368
+ * ],
18369
+ * ```
18370
+ *
18371
+ *
18372
+ * **Throughput Metric Monitor**
18373
+ * ```json
18374
+ * [
18375
+ * {
18376
+ * "aggregate":"count(span.duration)",
18377
+ * "dataset":"events_analytics_platform",
18378
+ * "environment":"prod",
18379
+ * "eventTypes":["trace_item_span"]
18380
+ * "query":"",
18381
+ * "queryType":1,
18382
+ * "timeWindow":3600,
18383
+ * "extrapolationMode":"unknown",
18384
+ * },
18385
+ * ],
18386
+ * ```
18387
+ *
18388
+ * **Duration Metric Monitor**
18389
+ * ```json
18390
+ * [
18391
+ * {
18392
+ * "aggregate":"p95(span.duration)",
18393
+ * "dataset":"events_analytics_platform",
18394
+ * "environment":"prod",
18395
+ * "eventTypes":["trace_item_span"]
18396
+ * "query":"",
18397
+ * "queryType":1,
18398
+ * "timeWindow":3600,
18399
+ * "extrapolationMode":"unknown",
18400
+ * },
18401
+ * ],
18402
+ * ```
18403
+ *
18404
+ * **Failure Rate Metric Monitor**
18405
+ * ```json
18406
+ * [
18407
+ * {
18408
+ * "aggregate":"failure_rate()",
18409
+ * "dataset":"events_analytics_platform",
18410
+ * "environment":"prod",
18411
+ * "eventTypes":["trace_item_span"]
18412
+ * "query":"",
18413
+ * "queryType":1,
18414
+ * "timeWindow":3600,
18415
+ * "extrapolationMode":"unknown",
18416
+ * },
18417
+ * ],
18418
+ * ```
18419
+ *
18420
+ * **Largest Contentful Paint Metric Monitor**
18421
+ * ```json
18422
+ * [
18423
+ * {
18424
+ * "aggregate":"p95(measurements.lcp)",
18425
+ * "dataset":"events_analytics_platform",
18426
+ * "environment":"prod",
18427
+ * "eventTypes":["trace_item_span"]
18428
+ * "query":"",
18429
+ * "queryType":1,
18430
+ * "timeWindow":3600,
18431
+ * "extrapolationMode":"unknown",
18432
+ * },
18433
+ * ],
18434
+ * ```
18435
+ *
18436
+ */
18437
+ data_sources?: Array<unknown>;
18438
+ /**
18439
+ *
18440
+ * The issue detection type configuration.
18441
+ *
18442
+ *
18443
+ * - `detectionType`
18444
+ * - `static`: Threshold based monitor
18445
+ * - `percent`: Change based monitor
18446
+ * - `dynamic`: Dynamic monitor
18447
+ * - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes.
18448
+ * For example, a value of 3600 compares the metric tracked against data 1 hour ago.
18449
+ * - `300`: 5 minutes
18450
+ * - `900`: 15 minutes
18451
+ * - `3600`: 1 hour
18452
+ * - `86400`: 1 day
18453
+ * - `604800`: 1 week
18454
+ * - `2592000`: 1 month
18455
+ *
18456
+ * **Threshold**
18457
+ * ```json
18458
+ * {
18459
+ * "detectionType": "static",
18460
+ * }
18461
+ * ```
18462
+ * **Change**
18463
+ * ```json
18464
+ * {
18465
+ * "detectionType": "percent",
18466
+ * "comparisonDelta": 3600,
18467
+ * }
18468
+ * ```
18469
+ * **Dynamic**
18470
+ * ```json
18471
+ * {
18472
+ * "detectionType": "dynamic",
18473
+ * }
18474
+ * ```
18475
+ *
18476
+ */
18477
+ config?: {
18478
+ [key: string]: unknown;
18479
+ };
18359
18480
  /**
18360
- * The ID or slug of the organization the resource belongs to.
18481
+ * Allows parameters to be defined in snake case, but passed as camel case.
18482
+ *
18483
+ * Errors are output in camel case.
18361
18484
  */
18362
- organization_id_or_slug: string;
18485
+ condition_group?: {
18486
+ id?: string;
18487
+ /**
18488
+ * * `any`
18489
+ * * `any-short`
18490
+ * * `all`
18491
+ * * `none`
18492
+ */
18493
+ logic_type: 'any' | 'any-short' | 'all' | 'none';
18494
+ conditions?: Array<unknown>;
18495
+ };
18363
18496
  /**
18364
- * The owner of the repository.
18497
+ *
18498
+ * The ID user or team who owns the monitor or alert prefaced by the string 'user' or 'team'.
18499
+ *
18500
+ * **User**
18501
+ * ```json
18502
+ * "user:123456"
18503
+ * ```
18504
+ *
18505
+ * **Team**
18506
+ * ```json
18507
+ * "team:456789"
18508
+ * ```
18509
+ *
18365
18510
  */
18366
- owner: string;
18511
+ owner?: string | null;
18367
18512
  /**
18368
- * The name of the repository.
18513
+ * A description of the monitor. Will be used in the resulting issue.
18369
18514
  */
18370
- repository: string;
18371
- };
18372
- query?: never;
18373
- url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/token/regenerate/';
18374
- };
18375
- export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenErrors = {
18376
- /**
18377
- * Bad Request
18378
- */
18379
- 400: unknown;
18380
- /**
18381
- * Forbidden
18382
- */
18383
- 403: unknown;
18384
- /**
18385
- * Not Found
18386
- */
18387
- 404: unknown;
18388
- };
18389
- export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses = {
18390
- /**
18391
- * Serializer for repositories response
18392
- */
18393
- 200: {
18394
- token: string;
18515
+ description?: string | null;
18516
+ /**
18517
+ * Set to False if you want to disable the monitor.
18518
+ */
18519
+ enabled?: boolean;
18395
18520
  };
18396
- };
18397
- export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponse = RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses[keyof RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses];
18398
- export type ListAnOrganizationSClientKeysData = {
18399
- body?: never;
18400
18521
  path: {
18401
18522
  /**
18402
18523
  * The ID or slug of the organization the resource belongs to.
18403
18524
  */
18404
18525
  organization_id_or_slug: string;
18405
- };
18406
- query?: {
18407
- /**
18408
- * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
18409
- */
18410
- cursor?: string;
18411
- /**
18412
- * Filter keys by team slug or ID. If provided, only keys for projects belonging to this team will be returned.
18413
- */
18414
- team?: string;
18415
18526
  /**
18416
- * Filter keys by status. Options are 'active' or 'inactive'.
18417
- *
18418
- * * `active`
18419
- * * `inactive`
18527
+ * The ID or slug of the project the resource belongs to.
18420
18528
  */
18421
- status?: 'active' | 'inactive';
18529
+ project_id_or_slug: string;
18422
18530
  };
18423
- url: '/api/0/organizations/{organization_id_or_slug}/project-keys/';
18531
+ query?: never;
18532
+ url: '/api/0/organizations/{organization_id_or_slug}/projects/{project_id_or_slug}/detectors/';
18424
18533
  };
18425
- export type ListAnOrganizationSClientKeysErrors = {
18534
+ export type CreateAMonitorForAProjectErrors = {
18426
18535
  /**
18427
18536
  * Bad Request
18428
18537
  */
18429
18538
  400: unknown;
18430
- /**
18431
- * Forbidden
18432
- */
18433
- 403: unknown;
18434
- /**
18435
- * Not Found
18436
- */
18437
- 404: unknown;
18438
- };
18439
- export type ListAnOrganizationSClientKeysResponses = {
18440
- 200: Array<{
18441
- id: string;
18442
- name: string;
18443
- label: string;
18444
- public: string | null;
18445
- secret: string | null;
18446
- projectId: number;
18447
- isActive: boolean;
18448
- rateLimit: {
18449
- window: number;
18450
- count: number;
18451
- } | null;
18452
- dsn: {
18453
- secret: string;
18454
- public: string;
18455
- csp: string;
18456
- security: string;
18457
- minidump: string;
18458
- nel: string;
18459
- unreal: string;
18460
- crons: string;
18461
- cdn: string;
18462
- playstation: string;
18463
- integration: string;
18464
- otlp_traces: string;
18465
- otlp_logs: string;
18466
- };
18467
- browserSdkVersion: string;
18468
- browserSdk: {
18469
- choices: Array<Array<string>>;
18470
- };
18471
- dateCreated: string | null;
18472
- dynamicSdkLoaderOptions: {
18473
- hasReplay: boolean;
18474
- hasPerformance: boolean;
18475
- hasDebug: boolean;
18476
- hasFeedback: boolean;
18477
- hasLogsAndMetrics: boolean;
18478
- };
18479
- useCase?: string;
18480
- }>;
18481
- };
18482
- export type ListAnOrganizationSClientKeysResponse = ListAnOrganizationSClientKeysResponses[keyof ListAnOrganizationSClientKeysResponses];
18483
- export type ListAnOrganizationSProjectsData = {
18484
- body?: never;
18485
- path: {
18486
- /**
18487
- * The ID or slug of the organization the resource belongs to.
18488
- */
18489
- organization_id_or_slug: string;
18490
- };
18491
- query?: {
18492
- /**
18493
- * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
18494
- */
18495
- cursor?: string;
18496
- };
18497
- url: '/api/0/organizations/{organization_id_or_slug}/projects/';
18498
- };
18499
- export type ListAnOrganizationSProjectsErrors = {
18500
18539
  /**
18501
18540
  * Unauthorized
18502
18541
  */
@@ -18510,70 +18549,40 @@ export type ListAnOrganizationSProjectsErrors = {
18510
18549
  */
18511
18550
  404: unknown;
18512
18551
  };
18513
- export type ListAnOrganizationSProjectsResponses = {
18514
- 200: Array<{
18515
- latestDeploys?: {
18516
- [key: string]: {
18517
- [key: string]: string;
18518
- };
18552
+ export type CreateAMonitorForAProjectResponses = {
18553
+ 201: {
18554
+ owner?: {
18555
+ type: 'user' | 'team';
18556
+ id: string;
18557
+ name: string;
18558
+ email?: string;
18519
18559
  } | null;
18520
- options?: {
18560
+ createdBy?: string | null;
18561
+ latestGroup?: {
18521
18562
  [key: string]: unknown;
18522
- };
18523
- stats?: unknown;
18524
- transactionStats?: unknown;
18525
- sessionStats?: unknown;
18563
+ } | null;
18564
+ description?: string | null;
18526
18565
  id: string;
18527
- slug: string;
18566
+ projectId: string;
18528
18567
  name: string;
18529
- platform: string | null;
18568
+ type: string;
18569
+ workflowIds: Array<string> | null;
18530
18570
  dateCreated: string;
18531
- isBookmarked: boolean;
18532
- isMember: boolean;
18533
- features: Array<string>;
18534
- firstEvent: string | null;
18535
- firstTransactionEvent: boolean;
18536
- access: Array<string>;
18537
- hasAccess: boolean;
18538
- hasFeedbacks: boolean;
18539
- hasFlags: boolean;
18540
- hasMinifiedStackTrace: boolean;
18541
- hasMonitors: boolean;
18542
- hasNewFeedbacks: boolean;
18543
- hasProfiles: boolean;
18544
- hasReplays: boolean;
18545
- hasSessions: boolean;
18546
- hasInsightsHttp: boolean;
18547
- hasInsightsDb: boolean;
18548
- hasInsightsAssets: boolean;
18549
- hasInsightsAppStart: boolean;
18550
- hasInsightsScreenLoad: boolean;
18551
- hasInsightsVitals: boolean;
18552
- hasInsightsCaches: boolean;
18553
- hasInsightsQueues: boolean;
18554
- hasInsightsAgentMonitoring: boolean;
18555
- hasInsightsMCP: boolean;
18556
- hasLogs: boolean;
18557
- hasTraceMetrics: boolean;
18558
- team: {
18559
- id: string;
18560
- name: string;
18561
- slug: string;
18562
- } | null;
18563
- teams: Array<{
18564
- id: string;
18565
- name: string;
18566
- slug: string;
18567
- }>;
18568
- platforms: Array<string>;
18569
- hasUserReports: boolean;
18570
- environments: Array<string>;
18571
- latestRelease: {
18572
- version: string;
18571
+ dateUpdated: string;
18572
+ dataSources: Array<{
18573
+ [key: string]: unknown;
18574
+ }> | null;
18575
+ conditionGroup: {
18576
+ [key: string]: unknown;
18573
18577
  } | null;
18574
- }>;
18578
+ config: {
18579
+ [key: string]: unknown;
18580
+ };
18581
+ enabled: boolean;
18582
+ openIssues: number;
18583
+ };
18575
18584
  };
18576
- export type ListAnOrganizationSProjectsResponse = ListAnOrganizationSProjectsResponses[keyof ListAnOrganizationSProjectsResponses];
18585
+ export type CreateAMonitorForAProjectResponse = CreateAMonitorForAProjectResponses[keyof CreateAMonitorForAProjectResponses];
18577
18586
  export type ListAnOrganizationSTrustedRelaysData = {
18578
18587
  body?: never;
18579
18588
  path: {
@@ -28703,12 +28712,13 @@ export type CreateAnExternalTeamData = {
28703
28712
  * * `github_enterprise`
28704
28713
  * * `jira_server`
28705
28714
  * * `slack`
28715
+ * * `slack_staging`
28706
28716
  * * `perforce`
28707
28717
  * * `gitlab`
28708
28718
  * * `msteams`
28709
28719
  * * `custom_scm`
28710
28720
  */
28711
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
28721
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
28712
28722
  /**
28713
28723
  * The Integration ID.
28714
28724
  */
@@ -28816,12 +28826,13 @@ export type UpdateAnExternalTeamData = {
28816
28826
  * * `github_enterprise`
28817
28827
  * * `jira_server`
28818
28828
  * * `slack`
28829
+ * * `slack_staging`
28819
28830
  * * `perforce`
28820
28831
  * * `gitlab`
28821
28832
  * * `msteams`
28822
28833
  * * `custom_scm`
28823
28834
  */
28824
- provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
28835
+ provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'slack_staging' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm';
28825
28836
  /**
28826
28837
  * The Integration ID.
28827
28838
  */