@rustrak/client 0.20.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -334,6 +334,7 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
334
334
 
335
335
  | Method | Endpoint | Description |
336
336
  |---|---|---|
337
+ | `environments.list({ path })` | `GET /api/projects/{project_id}/environments` | Lists the environments a project's issues have been seen in, by name. |
337
338
  | `feedback.list({ path, query? })` | `GET /api/projects/{project_id}/feedback` | Lists user feedback with what each user submitted. |
338
339
  | `issues.bulkDelete({ path, body })` | `DELETE /api/projects/{project_id}/issues` | Bulk delete by ids or filter |
339
340
  | `issues.bulkUpdate({ path, body })` | `PUT /api/projects/{project_id}/issues` | Bulk mutate |
@@ -445,6 +446,8 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
445
446
 
446
447
  | Method | Endpoint | Description |
447
448
  |---|---|---|
449
+ | `debugFiles.assemble({ path, body })` | `POST /api/0/projects/{org_slug}/{project_slug}/files/difs/assemble/` | Assemble uploaded chunks into debug information files (ProGuard mappings, JVM source bundles). |
450
+ | `debugFiles.upload({ path, body })` | `POST /api/0/projects/{org_slug}/{project_slug}/files/dsyms/` | Upload a zip of debug information files (the path `sentry-cli upload-proguard` takes). |
448
451
  | `sourceMaps.artifactBundleAssemble({ path, body })` | `POST /api/0/organizations/{org_slug}/artifactbundle/assemble/` | |
449
452
  | `sourceMaps.chunkUpload({ path, body })` | `POST /api/0/organizations/{org_slug}/chunk-upload/` | |
450
453
  | `sourceMaps.chunkUploadCapability({ path })` | `GET /api/0/organizations/{org_slug}/chunk-upload/` | |
@@ -469,10 +472,12 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
469
472
 
470
473
  | Method | Endpoint | Description |
471
474
  |---|---|---|
475
+ | `storage.compact()` | `POST /api/storage/compaction` | Rewrites a SQLite file created before incremental mode, so it gives freed space back from then on. |
472
476
  | `storage.executeCleanup({ body })` | `POST /api/storage/cleanup` | Starts deleting old data and the issues it empties. |
473
477
  | `storage.gcSourceMaps()` | `POST /api/storage/source-maps/gc` | Delete orphaned source maps (DB + disk). |
474
478
  | `storage.getAge()` | `GET /api/storage/age` | Rows per age bucket, per project and kind. |
475
479
  | `storage.getCleanupStatus()` | `GET /api/storage/cleanup/status` | Progress of the running cleanup, or the outcome of the last one. |
480
+ | `storage.getCompaction()` | `GET /api/storage/compaction` | Whether the database file shrinks when data is deleted, and the disk a one-off compaction needs. |
476
481
  | `storage.getProjects()` | `GET /api/storage/projects` | Per-project counts and estimated weight. |
477
482
  | `storage.getRetention()` | `GET /api/storage/retention` | |
478
483
  | `storage.getSummary()` | `GET /api/storage/summary` | Row counts, DB size, and source-map weight. |
@@ -344,6 +344,63 @@ var SourceMaps = class extends HeyApiClient {
344
344
  });
345
345
  }
346
346
  };
347
+ var DebugFiles = class extends HeyApiClient {
348
+ /**
349
+ * Assemble uploaded chunks into debug information files (ProGuard mappings, JVM source bundles).
350
+ *
351
+ * Sentry's `DifAssembleEndpoint`: the body maps each file's SHA-1 to its
352
+ * name, chunks and optional debug ID, and the answer maps it to its state.
353
+ */
354
+ assemble(options) {
355
+ return (options.client ?? this.client).post({
356
+ requestValidator: async (data) => await zod.object({
357
+ body: require_zod_gen.zDebugFilesAssembleBody,
358
+ path: require_zod_gen.zDebugFilesAssemblePath,
359
+ query: zod.never().optional()
360
+ }).parseAsync(data),
361
+ responseValidator: async (data) => await require_zod_gen.zDebugFilesAssembleResponse.parseAsync(data),
362
+ security: [{
363
+ scheme: "bearer",
364
+ type: "http"
365
+ }],
366
+ url: "/api/0/projects/{org_slug}/{project_slug}/files/difs/assemble/",
367
+ ...options,
368
+ headers: {
369
+ "Content-Type": "application/json",
370
+ ...options.headers
371
+ }
372
+ });
373
+ }
374
+ /**
375
+ * Upload a zip of debug information files (the path `sentry-cli upload-proguard` takes).
376
+ *
377
+ * Sentry's `DebugFilesEndpoint.post` processes the zip in the request.
378
+ * Here each file goes through the assembly worker instead, the same as a
379
+ * chunked upload, because building a ProGuard cache can take gigabytes.
380
+ * Only ProGuard mappings are recognised; other entries are skipped.
381
+ */
382
+ upload(options) {
383
+ return (options.client ?? this.client).post({
384
+ ...require_bodySerializer_gen.formDataBodySerializer,
385
+ requestValidator: async (data) => await zod.object({
386
+ body: require_zod_gen.zDebugFilesUploadBody,
387
+ path: require_zod_gen.zDebugFilesUploadPath,
388
+ query: zod.never().optional()
389
+ }).parseAsync(data),
390
+ responseValidator: async (data) => await require_zod_gen.zDebugFilesUploadResponse.parseAsync(data),
391
+ security: [{
392
+ scheme: "bearer",
393
+ type: "http"
394
+ }],
395
+ url: "/api/0/projects/{org_slug}/{project_slug}/files/dsyms/",
396
+ ...options,
397
+ headers: {
398
+ "Content-Type": null,
399
+ ...options.headers
400
+ }
401
+ });
402
+ }
403
+ };
347
404
  var Releases = class extends HeyApiClient {
348
405
  /**
349
406
  * POST /api/0/projects/{org_slug}/{project_slug}/releases/
@@ -1617,6 +1674,28 @@ var Events = class extends HeyApiClient {
1617
1674
  });
1618
1675
  }
1619
1676
  };
1677
+ var Environments = class extends HeyApiClient {
1678
+ /**
1679
+ * GET /api/projects/{project_id}/environments
1680
+ * Lists the environments a project's issues have been seen in, by name.
1681
+ */
1682
+ list(options) {
1683
+ return (options.client ?? this.client).get({
1684
+ requestValidator: async (data) => await zod.object({
1685
+ body: zod.never().optional(),
1686
+ path: require_zod_gen.zEnvironmentsListPath,
1687
+ query: zod.never().optional()
1688
+ }).parseAsync(data),
1689
+ responseValidator: async (data) => await require_zod_gen.zEnvironmentsListResponse.parseAsync(data),
1690
+ security: [{
1691
+ scheme: "bearer",
1692
+ type: "http"
1693
+ }],
1694
+ url: "/api/projects/{project_id}/environments",
1695
+ ...options
1696
+ });
1697
+ }
1698
+ };
1620
1699
  var Stats = class extends HeyApiClient {
1621
1700
  /**
1622
1701
  * GET /api/projects/{project_id}/events/stats
@@ -2624,6 +2703,47 @@ var Storage = class extends HeyApiClient {
2624
2703
  });
2625
2704
  }
2626
2705
  /**
2706
+ * GET /api/storage/compaction — whether the database file shrinks when data
2707
+ * is deleted, and the disk a one-off compaction needs.
2708
+ */
2709
+ getCompaction(options) {
2710
+ return (options?.client ?? this.client).get({
2711
+ requestValidator: async (data) => await zod.object({
2712
+ body: zod.never().optional(),
2713
+ path: zod.never().optional(),
2714
+ query: zod.never().optional()
2715
+ }).parseAsync(data),
2716
+ responseValidator: async (data) => await require_zod_gen.zStorageGetCompactionResponse.parseAsync(data),
2717
+ security: [{
2718
+ scheme: "bearer",
2719
+ type: "http"
2720
+ }],
2721
+ url: "/api/storage/compaction",
2722
+ ...options
2723
+ });
2724
+ }
2725
+ /**
2726
+ * POST /api/storage/compaction — rewrites a SQLite file created before
2727
+ * incremental mode, so it gives freed space back from then on. Writes wait
2728
+ * while it runs; follow it with `GET /api/storage/cleanup/status`.
2729
+ */
2730
+ compact(options) {
2731
+ return (options?.client ?? this.client).post({
2732
+ requestValidator: async (data) => await zod.object({
2733
+ body: zod.never().optional(),
2734
+ path: zod.never().optional(),
2735
+ query: zod.never().optional()
2736
+ }).parseAsync(data),
2737
+ responseValidator: async (data) => await require_zod_gen.zStorageCompactResponse.parseAsync(data),
2738
+ security: [{
2739
+ scheme: "bearer",
2740
+ type: "http"
2741
+ }],
2742
+ url: "/api/storage/compaction",
2743
+ ...options
2744
+ });
2745
+ }
2746
+ /**
2627
2747
  * GET /api/storage/projects — per-project counts and estimated weight.
2628
2748
  */
2629
2749
  getProjects(options) {
@@ -3292,6 +3412,10 @@ var Rustrak = class Rustrak extends HeyApiClient {
3292
3412
  get sourceMaps() {
3293
3413
  return this._sourceMaps ??= new SourceMaps({ client: this.client });
3294
3414
  }
3415
+ _debugFiles;
3416
+ get debugFiles() {
3417
+ return this._debugFiles ??= new DebugFiles({ client: this.client });
3418
+ }
3295
3419
  _releases;
3296
3420
  get releases() {
3297
3421
  return this._releases ??= new Releases({ client: this.client });
@@ -3328,6 +3452,10 @@ var Rustrak = class Rustrak extends HeyApiClient {
3328
3452
  get events() {
3329
3453
  return this._events ??= new Events({ client: this.client });
3330
3454
  }
3455
+ _environments;
3456
+ get environments() {
3457
+ return this._environments ??= new Environments({ client: this.client });
3458
+ }
3331
3459
  _stats;
3332
3460
  get stats() {
3333
3461
  return this._stats ??= new Stats({ client: this.client });
@@ -3402,6 +3530,8 @@ exports.Agents = Agents;
3402
3530
  exports.AlertChannels = AlertChannels;
3403
3531
  exports.AlertRules = AlertRules;
3404
3532
  exports.Auth = Auth;
3533
+ exports.DebugFiles = DebugFiles;
3534
+ exports.Environments = Environments;
3405
3535
  exports.Events = Events;
3406
3536
  exports.Feedback = Feedback;
3407
3537
  exports.Github = Github;