@distilled.cloud/steel 1.0.0-rc.20 → 1.0.0-rc.21

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 (91) hide show
  1. package/README.md +9 -6
  2. package/lib/.lazy.json +1 -1
  3. package/lib/_bundle/sdk.js +1 -1
  4. package/lib/_bundle/sdk.js.map +1 -1
  5. package/lib/credentials.d.ts +8 -3
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/errors.d.ts +7 -0
  8. package/lib/errors.d.ts.map +1 -1
  9. package/lib/errors.js +1 -1
  10. package/lib/index.d.ts +2 -3
  11. package/lib/index.d.ts.map +1 -1
  12. package/lib/index.js +0 -1
  13. package/lib/pagination.d.ts.map +1 -1
  14. package/lib/protocol.d.ts +9 -12
  15. package/lib/protocol.d.ts.map +1 -1
  16. package/lib/retry.d.ts.map +1 -1
  17. package/lib/services/api_keys.d.ts +38 -0
  18. package/lib/services/api_keys.d.ts.map +1 -1
  19. package/lib/services/api_keys.js +1 -1
  20. package/lib/services/api_keys.js.map +1 -1
  21. package/lib/services/auth.d.ts.map +1 -1
  22. package/lib/services/auth.js +1 -1
  23. package/lib/services/auth.js.map +1 -1
  24. package/lib/services/browser_tools.d.ts +35 -0
  25. package/lib/services/browser_tools.d.ts.map +1 -1
  26. package/lib/services/browser_tools.js +1 -1
  27. package/lib/services/browser_tools.js.map +1 -1
  28. package/lib/services/captchas.d.ts +32 -0
  29. package/lib/services/captchas.d.ts.map +1 -1
  30. package/lib/services/captchas.js +1 -1
  31. package/lib/services/captchas.js.map +1 -1
  32. package/lib/services/credentials.d.ts +54 -0
  33. package/lib/services/credentials.d.ts.map +1 -1
  34. package/lib/services/credentials.js +1 -1
  35. package/lib/services/credentials.js.map +1 -1
  36. package/lib/services/extensions.d.ts +47 -1
  37. package/lib/services/extensions.d.ts.map +1 -1
  38. package/lib/services/extensions.js +1 -1
  39. package/lib/services/extensions.js.map +1 -1
  40. package/lib/services/files.d.ts +57 -3
  41. package/lib/services/files.d.ts.map +1 -1
  42. package/lib/services/files.js +1 -1
  43. package/lib/services/files.js.map +1 -1
  44. package/lib/services/index.d.ts +2 -0
  45. package/lib/services/index.d.ts.map +1 -1
  46. package/lib/services/index.js +2 -0
  47. package/lib/services/profiles.d.ts +64 -5
  48. package/lib/services/profiles.d.ts.map +1 -1
  49. package/lib/services/profiles.js +1 -1
  50. package/lib/services/profiles.js.map +1 -1
  51. package/lib/services/projects.d.ts +32 -0
  52. package/lib/services/projects.d.ts.map +1 -1
  53. package/lib/services/projects.js +1 -1
  54. package/lib/services/projects.js.map +1 -1
  55. package/lib/services/secret_connections.d.ts +233 -0
  56. package/lib/services/secret_connections.d.ts.map +1 -0
  57. package/lib/services/secret_connections.js +2 -0
  58. package/lib/services/secret_connections.js.map +1 -0
  59. package/lib/services/sessions.d.ts +526 -233
  60. package/lib/services/sessions.d.ts.map +1 -1
  61. package/lib/services/sessions.js +50 -41
  62. package/lib/services/sessions.js.map +1 -1
  63. package/lib/services/vaults.d.ts +149 -0
  64. package/lib/services/vaults.d.ts.map +1 -0
  65. package/lib/services/vaults.js +2 -0
  66. package/lib/services/vaults.js.map +1 -0
  67. package/lib/services.lazy/index.js +2 -2
  68. package/lib/services.lazy/secret_connections.js +1 -0
  69. package/lib/services.lazy/sessions.js +2 -2
  70. package/lib/services.lazy/vaults.js +1 -0
  71. package/lib/traits.d.ts.map +1 -1
  72. package/package.json +5 -6
  73. package/src/credentials.ts +18 -12
  74. package/src/errors.ts +9 -1
  75. package/src/index.ts +2 -3
  76. package/src/protocol.ts +13 -24
  77. package/src/services/api_keys.ts +87 -7
  78. package/src/services/auth.ts +3 -2
  79. package/src/services/browser_tools.ts +101 -28
  80. package/src/services/captchas.ts +85 -17
  81. package/src/services/credentials.ts +129 -25
  82. package/src/services/extensions.ts +136 -34
  83. package/src/services/files.ts +172 -58
  84. package/src/services/index.ts +2 -0
  85. package/src/services/profiles.ts +198 -60
  86. package/src/services/projects.ts +79 -12
  87. package/src/services/secret_connections.ts +538 -0
  88. package/src/services/sessions.ts +1384 -794
  89. package/src/services/vaults.ts +369 -0
  90. package/lib/index.lazy.js +0 -7
  91. package/lib/index.lazy.js.map +0 -1
@@ -3,7 +3,7 @@ import * as C from "@distilled.cloud/core/category";
3
3
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-steel/specs/openapi.json). Do not edit.
4
4
  import * as S from "@distilled.cloud/core/schema-lite";
5
5
  import * as __L from "@distilled.cloud/core/schema-lite";
6
- import { UnknownSteelError } from "../errors.ts";
6
+ import { SteelServiceErrors } from "../errors.ts";
7
7
  import { SteelProtocol, type SteelOpError, type SteelOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
9
9
  import * as T from "../traits.ts";
@@ -30,27 +30,64 @@ export class BadRequest
30
30
  /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
31
31
  code: S.Number,
32
32
  message: S.String,
33
+ body: /*@__PURE__*/ S.optional(
34
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(3, __c0, 3)), S.String]),
35
+ ),
36
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
33
37
  }).pipe(C.withBadRequestError),
34
38
  [{ status: 400 }],
35
- ) {}
39
+ )
40
+ {
41
+ declare readonly body?: ErrorResponse | string;
42
+ }
43
+
44
+ export class Conflict
45
+ extends /*@__PURE__*/ T.applyErrorMatchers(
46
+ /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
47
+ code: S.Number,
48
+ message: S.String,
49
+ body: /*@__PURE__*/ S.optional(
50
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(3, __c0, 3)), S.String]),
51
+ ),
52
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
53
+ }).pipe(C.withConflictError),
54
+ [{ status: 409 }],
55
+ )
56
+ {
57
+ declare readonly body?: ErrorResponse | string;
58
+ }
36
59
 
37
60
  export class NotFound
38
61
  extends /*@__PURE__*/ T.applyErrorMatchers(
39
62
  /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
40
63
  code: S.Number,
41
64
  message: S.String,
65
+ body: /*@__PURE__*/ S.optional(
66
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(3, __c0, 3)), S.String]),
67
+ ),
68
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
42
69
  }).pipe(C.withBadRequestError),
43
70
  [{ status: 404 }],
44
- ) {}
71
+ )
72
+ {
73
+ declare readonly body?: ErrorResponse | string;
74
+ }
45
75
 
46
76
  export class PayloadTooLarge
47
77
  extends /*@__PURE__*/ T.applyErrorMatchers(
48
78
  /*@__PURE__*/ S.TaggedError<PayloadTooLarge>()("PayloadTooLarge", {
49
79
  code: S.Number,
50
80
  message: S.String,
81
+ body: /*@__PURE__*/ S.optional(
82
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(3, __c0, 3)), S.String]),
83
+ ),
84
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
51
85
  }).pipe(C.withBadRequestError),
52
86
  [{ status: 413 }],
53
- ) {}
87
+ )
88
+ {
89
+ declare readonly body?: ErrorResponse | string;
90
+ }
54
91
 
55
92
  /** The dimensions associated with the profile */
56
93
  export interface CreateProfileRequestDimensions {
@@ -161,7 +198,7 @@ export interface ProfileFingerprintFingerprintNavigator {
161
198
  export type ProfileFingerprintFingerprintPluginsDataMimeTypesList = Array<string | null>;
162
199
  export interface ProfileFingerprintFingerprintPluginsDataPluginsItemMimeTypesItem {
163
200
  description: string | null;
164
- enabledPlugin: string | null;
201
+ enabledPlugin?: string | null | undefined;
165
202
  suffixes: string | null;
166
203
  type: string | null;
167
204
  [key: string]: unknown;
@@ -214,7 +251,7 @@ export type ProfileFingerprintFingerprintVideoCodecsMap = {
214
251
  };
215
252
  export interface ProfileFingerprintFingerprint {
216
253
  audioCodecs: ProfileFingerprintFingerprintAudioCodecsMap;
217
- battery: ProfileFingerprintFingerprintBattery;
254
+ battery: ProfileFingerprintFingerprintBattery | null;
218
255
  fonts: ProfileFingerprintFingerprintFontsList;
219
256
  mockWebRTC: boolean | null;
220
257
  multimediaDevices: ProfileFingerprintFingerprintMultimediaDevices;
@@ -248,7 +285,7 @@ export interface ProfileFingerprint {
248
285
  headers: ProfileFingerprintHeaders;
249
286
  }
250
287
  /** The status of the profile */
251
- export type ProfileStatus = "UPLOADING" | "READY" | "FAILED";
288
+ export type ProfileStatus = "UPLOADING" | "READY" | "FAILED" | "DELETING" | "DELETED";
252
289
  export interface Profile {
253
290
  /** The date and time when the profile was created */
254
291
  createdAt: string;
@@ -275,6 +312,11 @@ export interface Profile {
275
312
  /** The user agent associated with the profile */
276
313
  userAgent: string | null;
277
314
  }
315
+ export interface DeleteProfileRequest {
316
+ id: string;
317
+ /** Project to query profiles from */
318
+ projectId?: string | undefined;
319
+ }
278
320
  export interface GetProfileRequest {
279
321
  id: string;
280
322
  /** Project to query profiles from */
@@ -388,7 +430,7 @@ export type ProfileListResponseProfilesItemFingerprintFingerprintVideoCodecsMap
388
430
  };
389
431
  export interface ProfileListResponseProfilesItemFingerprintFingerprint {
390
432
  audioCodecs: ProfileListResponseProfilesItemFingerprintFingerprintAudioCodecsMap;
391
- battery: ProfileFingerprintFingerprintBattery;
433
+ battery: ProfileFingerprintFingerprintBattery | null;
392
434
  fonts: ProfileListResponseProfilesItemFingerprintFingerprintFontsList;
393
435
  mockWebRTC: boolean | null;
394
436
  multimediaDevices: ProfileListResponseProfilesItemFingerprintFingerprintMultimediaDevices;
@@ -407,7 +449,12 @@ export interface ProfileListResponseProfilesItemFingerprint {
407
449
  headers: ProfileFingerprintHeaders;
408
450
  }
409
451
  /** The status of the profile */
410
- export type ProfileListResponseProfilesItemStatus = "UPLOADING" | "READY" | "FAILED";
452
+ export type ProfileListResponseProfilesItemStatus =
453
+ | "UPLOADING"
454
+ | "READY"
455
+ | "FAILED"
456
+ | "DELETING"
457
+ | "DELETED";
411
458
  export interface ProfileListResponseProfilesItem {
412
459
  /** The date and time when the profile was created */
413
460
  createdAt: string;
@@ -459,6 +506,33 @@ export interface UpdateProfileRequest {
459
506
  /** The user data directory associated with the profile */
460
507
  userDataDir: Blob | Uint8Array | ArrayBuffer;
461
508
  }
509
+ export interface ErrorResponseContextItem {
510
+ keyword: string;
511
+ message: string;
512
+ params: unknown;
513
+ }
514
+ export type ErrorResponseContextList = Array<ErrorResponseContextItem>;
515
+ /** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
516
+ export type ErrorResponseDetailsMap = { [key: string]: unknown | undefined };
517
+ /** An error response from the API */
518
+ export interface ErrorResponse {
519
+ /** Stable machine-readable reason, e.g. 'budget_exceeded' or 'profile_not_ready'. Branch on this instead of parsing the message. */
520
+ code?: string | undefined;
521
+ context?: ErrorResponseContextList | undefined;
522
+ /** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
523
+ details?: ErrorResponseDetailsMap | undefined;
524
+ error?: string | undefined;
525
+ linkToDocs?: string | undefined;
526
+ message: string;
527
+ /** The request field that caused the error, if any. */
528
+ param?: string | undefined;
529
+ /** Seconds to wait before retrying. Also sent as the Retry-After header. */
530
+ retryAfterSeconds?: number | undefined;
531
+ /** Whether the same request can succeed later without changes. False means fix the request or the account first. */
532
+ retryable?: boolean | undefined;
533
+ /** Where a person turns on the refused feature, e.g. verifying the account. Pass it to your user. */
534
+ unlockUrl?: string | undefined;
535
+ }
462
536
  export type CreateProfileError = BadRequest | NotFound | PayloadTooLarge | SteelOpError;
463
537
  /** Create a profile Create a new profile */
464
538
  export const createProfile: API.OperationMethod<
@@ -467,15 +541,34 @@ export const createProfile: API.OperationMethod<
467
541
  CreateProfileError,
468
542
  SteelOpContext
469
543
  > = /*@__PURE__*/ API.make(() => ({
470
- input: __S(0, __c0, 0) as any as S.Schema<CreateProfileRequest>,
471
- output: __S(55, __c1, 23) as any as S.Schema<Profile>,
472
- errors: [BadRequest, NotFound, PayloadTooLarge, UnknownSteelError],
544
+ input: __S(32, __c1, 0) as any as S.Schema<CreateProfileRequest>,
545
+ output: __S(87, __c2, 23) as any as S.Schema<Profile>,
546
+ errors: [BadRequest, NotFound, PayloadTooLarge],
547
+ serviceErrors: SteelServiceErrors,
473
548
  protocol: SteelProtocol,
474
549
  retry: Retry.Retry,
475
550
  telemetry: TELEMETRY,
476
551
  span: "CreateProfile",
477
552
  }));
478
553
 
554
+ export type DeleteProfileError = BadRequest | NotFound | Conflict | SteelOpError;
555
+ /** Delete a profile Delete the profile and its stored browser data immediately, with a final asynchronous cleanup pass. */
556
+ export const deleteProfile: API.OperationMethod<
557
+ DeleteProfileRequest,
558
+ Profile,
559
+ DeleteProfileError,
560
+ SteelOpContext
561
+ > = /*@__PURE__*/ API.make(() => ({
562
+ input: __S(96, __c3, 0) as any as S.Schema<DeleteProfileRequest>,
563
+ output: __S(87, __c2, 23) as any as S.Schema<Profile>,
564
+ errors: [BadRequest, NotFound, Conflict],
565
+ serviceErrors: SteelServiceErrors,
566
+ protocol: SteelProtocol,
567
+ retry: Retry.Retry,
568
+ telemetry: TELEMETRY,
569
+ span: "DeleteProfile",
570
+ }));
571
+
479
572
  export type GetProfileError = BadRequest | NotFound | SteelOpError;
480
573
  /** Get a profile Retrieve a profile by ID */
481
574
  export const getProfile: API.OperationMethod<
@@ -484,9 +577,10 @@ export const getProfile: API.OperationMethod<
484
577
  GetProfileError,
485
578
  SteelOpContext
486
579
  > = /*@__PURE__*/ API.make(() => ({
487
- input: __S(64, __c2, 0) as any as S.Schema<GetProfileRequest>,
488
- output: __S(55, __c1, 23) as any as S.Schema<Profile>,
489
- errors: [BadRequest, NotFound, UnknownSteelError],
580
+ input: __S(128, __c4, 0) as any as S.Schema<GetProfileRequest>,
581
+ output: __S(87, __c2, 23) as any as S.Schema<Profile>,
582
+ errors: [BadRequest, NotFound],
583
+ serviceErrors: SteelServiceErrors,
490
584
  protocol: SteelProtocol,
491
585
  retry: Retry.Retry,
492
586
  telemetry: TELEMETRY,
@@ -501,9 +595,10 @@ export const listProfiles: API.OperationMethod<
501
595
  ListProfilesError,
502
596
  SteelOpContext
503
597
  > = /*@__PURE__*/ API.make(() => ({
504
- input: __S(96, __c3, 0) as any as S.Schema<ListProfilesRequest>,
505
- output: __S(98, __c3, 2) as any as S.Schema<ProfileListResponse>,
506
- errors: [BadRequest, UnknownSteelError],
598
+ input: __S(160, __c5, 0) as any as S.Schema<ListProfilesRequest>,
599
+ output: __S(162, __c5, 2) as any as S.Schema<ProfileListResponse>,
600
+ errors: [BadRequest],
601
+ serviceErrors: SteelServiceErrors,
507
602
  protocol: SteelProtocol,
508
603
  retry: Retry.Retry,
509
604
  telemetry: TELEMETRY,
@@ -518,9 +613,10 @@ export const updateProfile: API.OperationMethod<
518
613
  UpdateProfileError,
519
614
  SteelOpContext
520
615
  > = /*@__PURE__*/ API.make(() => ({
521
- input: __S(128, __c4, 0) as any as S.Schema<UpdateProfileRequest>,
522
- output: __S(55, __c1, 23) as any as S.Schema<Profile>,
523
- errors: [BadRequest, NotFound, PayloadTooLarge, UnknownSteelError],
616
+ input: __S(192, __c6, 0) as any as S.Schema<UpdateProfileRequest>,
617
+ output: __S(87, __c2, 23) as any as S.Schema<Profile>,
618
+ errors: [BadRequest, NotFound, PayloadTooLarge],
619
+ serviceErrors: SteelServiceErrors,
524
620
  protocol: SteelProtocol,
525
621
  retry: Retry.Retry,
526
622
  telemetry: TELEMETRY,
@@ -533,7 +629,38 @@ function __c0(j: number): any {
533
629
  case 0:
534
630
  return S.suspend(() =>
535
631
  S.Struct({
536
- dimensions: S.optional(__S(32, __c1, 0)),
632
+ keyword: S.String,
633
+ message: S.String,
634
+ params: S.Unknown,
635
+ }),
636
+ ).annotate({ identifier: "ErrorResponseContextItem" });
637
+ case 1:
638
+ return S.Array(__S(0, __c0, 0));
639
+ case 2:
640
+ return S.Record(S.String, S.Unknown);
641
+ case 3:
642
+ return S.suspend(() =>
643
+ S.Struct({
644
+ code: S.optional(S.String),
645
+ context: S.optional(__S(1, __c0, 1)),
646
+ details: S.optional(__S(2, __c0, 2)),
647
+ error: S.optional(S.String),
648
+ linkToDocs: S.optional(S.String),
649
+ message: S.String,
650
+ param: S.optional(S.String),
651
+ retryAfterSeconds: S.optional(S.Number),
652
+ retryable: S.optional(S.Boolean),
653
+ unlockUrl: S.optional(S.String),
654
+ }),
655
+ ).annotate({ identifier: "ErrorResponse" });
656
+ }
657
+ }
658
+ function __c1(j: number): any {
659
+ switch (j) {
660
+ case 0:
661
+ return S.suspend(() =>
662
+ S.Struct({
663
+ dimensions: S.optional(__S(64, __c2, 0)),
537
664
  projectId: S.optional(S.String),
538
665
  proxyUrl: S.optional(S.String),
539
666
  useProxy: S.optional(S.String),
@@ -549,7 +676,7 @@ function __c0(j: number): any {
549
676
  ).annotate({ identifier: "CreateProfileRequest" });
550
677
  }
551
678
  }
552
- function __c1(j: number): any {
679
+ function __c2(j: number): any {
553
680
  switch (j) {
554
681
  case 0:
555
682
  return S.suspend(() =>
@@ -589,14 +716,14 @@ function __c1(j: number): any {
589
716
  ),
590
717
  ).annotate({ identifier: "ProfileFingerprintFingerprintMultimediaDevicesMicrosItem" });
591
718
  case 6:
592
- return S.Array(__S(37, __c1, 5));
719
+ return S.Array(__S(69, __c2, 5));
593
720
  case 7:
594
721
  return S.suspend(() =>
595
722
  S.StructWithRest(
596
723
  S.Struct({
597
- micros: __S(38, __c1, 6),
598
- speakers: __S(38, __c1, 6),
599
- webcams: __S(38, __c1, 6),
724
+ micros: __S(70, __c2, 6),
725
+ speakers: __S(70, __c2, 6),
726
+ webcams: __S(70, __c2, 6),
600
727
  }),
601
728
  [S.Record(S.String, S.Unknown)],
602
729
  ),
@@ -606,9 +733,9 @@ function __c1(j: number): any {
606
733
  S.StructWithRest(
607
734
  S.Struct({
608
735
  globalPrivacyControl: S.NullOr(S.Boolean),
609
- installedApps: __S(36, __c1, 4),
736
+ installedApps: __S(68, __c2, 4),
610
737
  pdfViewerEnabled: S.NullOr(S.Boolean),
611
- vendorFlavors: __S(36, __c1, 4),
738
+ vendorFlavors: __S(68, __c2, 4),
612
739
  }),
613
740
  [S.Record(S.String, S.Unknown)],
614
741
  ),
@@ -624,12 +751,12 @@ function __c1(j: number): any {
624
751
  ),
625
752
  ).annotate({ identifier: "ProfileFingerprintFingerprintNavigatorUserAgentDataBrandsItem" });
626
753
  case 10:
627
- return S.Array(__S(41, __c1, 9));
754
+ return S.Array(__S(73, __c2, 9));
628
755
  case 11:
629
756
  return S.suspend(() =>
630
757
  S.StructWithRest(
631
758
  S.Struct({
632
- brands: __S(42, __c1, 10),
759
+ brands: __S(74, __c2, 10),
633
760
  mobile: S.NullOr(S.Boolean),
634
761
  platform: S.NullOr(S.String),
635
762
  }),
@@ -645,17 +772,17 @@ function __c1(j: number): any {
645
772
  appVersion: S.NullOr(S.String),
646
773
  deviceMemory: S.NullOr(S.Number),
647
774
  doNotTrack: S.optional(S.NullOr(S.String)),
648
- extraProperties: __S(40, __c1, 8),
775
+ extraProperties: __S(72, __c2, 8),
649
776
  hardwareConcurrency: S.NullOr(S.Number),
650
777
  language: S.NullOr(S.String),
651
- languages: __S(36, __c1, 4),
778
+ languages: __S(68, __c2, 4),
652
779
  maxTouchPoints: S.NullOr(S.Number),
653
780
  oscpu: S.NullOr(S.String),
654
781
  platform: S.NullOr(S.String),
655
782
  product: S.NullOr(S.String),
656
783
  productSub: S.NullOr(S.String),
657
784
  userAgent: S.NullOr(S.String),
658
- userAgentData: __S(43, __c1, 11),
785
+ userAgentData: __S(75, __c2, 11),
659
786
  vendor: S.NullOr(S.String),
660
787
  vendorSub: S.NullOr(S.String),
661
788
  webdriver: S.NullOr(S.Boolean),
@@ -668,7 +795,7 @@ function __c1(j: number): any {
668
795
  S.StructWithRest(
669
796
  S.Struct({
670
797
  description: S.NullOr(S.String),
671
- enabledPlugin: S.NullOr(S.String),
798
+ enabledPlugin: S.optional(S.NullOr(S.String)),
672
799
  suffixes: S.NullOr(S.String),
673
800
  type: S.NullOr(S.String),
674
801
  }),
@@ -678,27 +805,27 @@ function __c1(j: number): any {
678
805
  identifier: "ProfileFingerprintFingerprintPluginsDataPluginsItemMimeTypesItem",
679
806
  });
680
807
  case 14:
681
- return S.Array(__S(45, __c1, 13));
808
+ return S.Array(__S(77, __c2, 13));
682
809
  case 15:
683
810
  return S.suspend(() =>
684
811
  S.StructWithRest(
685
812
  S.Struct({
686
813
  description: S.NullOr(S.String),
687
814
  filename: S.NullOr(S.String),
688
- mimeTypes: __S(46, __c1, 14),
815
+ mimeTypes: __S(78, __c2, 14),
689
816
  name: S.NullOr(S.String),
690
817
  }),
691
818
  [S.Record(S.String, S.Unknown)],
692
819
  ),
693
820
  ).annotate({ identifier: "ProfileFingerprintFingerprintPluginsDataPluginsItem" });
694
821
  case 16:
695
- return S.Array(__S(47, __c1, 15));
822
+ return S.Array(__S(79, __c2, 15));
696
823
  case 17:
697
824
  return S.suspend(() =>
698
825
  S.StructWithRest(
699
826
  S.Struct({
700
- mimeTypes: __S(36, __c1, 4),
701
- plugins: __S(48, __c1, 16),
827
+ mimeTypes: __S(68, __c2, 4),
828
+ plugins: __S(80, __c2, 16),
702
829
  }),
703
830
  [S.Record(S.String, S.Unknown)],
704
831
  ),
@@ -744,17 +871,17 @@ function __c1(j: number): any {
744
871
  return S.suspend(() =>
745
872
  S.StructWithRest(
746
873
  S.Struct({
747
- audioCodecs: __S(34, __c1, 2),
748
- battery: __S(35, __c1, 3),
749
- fonts: __S(36, __c1, 4),
874
+ audioCodecs: __S(66, __c2, 2),
875
+ battery: S.NullOr(__S(67, __c2, 3)),
876
+ fonts: __S(68, __c2, 4),
750
877
  mockWebRTC: S.NullOr(S.Boolean),
751
- multimediaDevices: __S(39, __c1, 7),
752
- navigator: __S(44, __c1, 12),
753
- pluginsData: __S(49, __c1, 17),
754
- screen: __S(50, __c1, 18),
878
+ multimediaDevices: __S(71, __c2, 7),
879
+ navigator: __S(76, __c2, 12),
880
+ pluginsData: __S(81, __c2, 17),
881
+ screen: __S(82, __c2, 18),
755
882
  slim: S.NullOr(S.Boolean),
756
- videoCard: __S(51, __c1, 19),
757
- videoCodecs: __S(34, __c1, 2),
883
+ videoCard: __S(83, __c2, 19),
884
+ videoCodecs: __S(66, __c2, 2),
758
885
  }),
759
886
  [S.Record(S.String, S.Unknown)],
760
887
  ),
@@ -785,8 +912,8 @@ function __c1(j: number): any {
785
912
  case 22:
786
913
  return S.suspend(() =>
787
914
  S.Struct({
788
- fingerprint: __S(52, __c1, 20),
789
- headers: __S(53, __c1, 21),
915
+ fingerprint: __S(84, __c2, 20),
916
+ headers: __S(85, __c2, 21),
790
917
  }),
791
918
  ).annotate({ identifier: "ProfileFingerprint" });
792
919
  case 23:
@@ -794,9 +921,9 @@ function __c1(j: number): any {
794
921
  S.Struct({
795
922
  createdAt: S.String,
796
923
  credentialsConfig: S.NullOr(S.Unknown),
797
- dimensions: S.NullOr(__S(32, __c1, 0)),
798
- extensionIds: S.NullOr(__S(33, __c1, 1)),
799
- fingerprint: S.NullOr(__S(54, __c1, 22)),
924
+ dimensions: S.NullOr(__S(64, __c2, 0)),
925
+ extensionIds: S.NullOr(__S(65, __c2, 1)),
926
+ fingerprint: S.NullOr(__S(86, __c2, 22)),
800
927
  id: S.String,
801
928
  projectId: S.NullOr(S.String),
802
929
  sourceSessionId: S.NullOr(S.String),
@@ -808,7 +935,18 @@ function __c1(j: number): any {
808
935
  ).annotate({ identifier: "Profile" });
809
936
  }
810
937
  }
811
- function __c2(j: number): any {
938
+ function __c3(j: number): any {
939
+ switch (j) {
940
+ case 0:
941
+ return S.suspend(() =>
942
+ S.Struct({
943
+ id: S.String.pipe(T.Label()),
944
+ projectId: S.optional(S.String.pipe(T.Query())),
945
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/profiles/{id}", code: 200 })),
946
+ ).annotate({ identifier: "DeleteProfileRequest" });
947
+ }
948
+ }
949
+ function __c4(j: number): any {
812
950
  switch (j) {
813
951
  case 0:
814
952
  return S.suspend(() =>
@@ -819,7 +957,7 @@ function __c2(j: number): any {
819
957
  ).annotate({ identifier: "GetProfileRequest" });
820
958
  }
821
959
  }
822
- function __c3(j: number): any {
960
+ function __c5(j: number): any {
823
961
  switch (j) {
824
962
  case 0:
825
963
  return S.suspend(() =>
@@ -828,24 +966,24 @@ function __c3(j: number): any {
828
966
  }).pipe(T.Http({ method: "GET", uri: "/v1/profiles", code: 200 })),
829
967
  ).annotate({ identifier: "ListProfilesRequest" });
830
968
  case 1:
831
- return S.Array(__S(55, __c1, 23));
969
+ return S.Array(__S(87, __c2, 23));
832
970
  case 2:
833
971
  return S.suspend(() =>
834
972
  S.Struct({
835
973
  count: S.Number,
836
- profiles: __S(97, __c3, 1),
974
+ profiles: __S(161, __c5, 1),
837
975
  }),
838
976
  ).annotate({ identifier: "ProfileListResponse" });
839
977
  }
840
978
  }
841
- function __c4(j: number): any {
979
+ function __c6(j: number): any {
842
980
  switch (j) {
843
981
  case 0:
844
982
  return S.suspend(() =>
845
983
  S.Struct({
846
984
  id: S.String.pipe(T.Label()),
847
985
  projectId: S.optional(S.String.pipe(T.Query())),
848
- dimensions: S.optional(__S(32, __c1, 0)),
986
+ dimensions: S.optional(__S(64, __c2, 0)),
849
987
  proxyUrl: S.optional(S.String),
850
988
  useProxy: S.optional(S.String),
851
989
  userAgent: S.optional(S.String),
@@ -3,7 +3,7 @@ import * as C from "@distilled.cloud/core/category";
3
3
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-steel/specs/openapi.json). Do not edit.
4
4
  import * as S from "@distilled.cloud/core/schema-lite";
5
5
  import * as __L from "@distilled.cloud/core/schema-lite";
6
- import { UnknownSteelError } from "../errors.ts";
6
+ import { SteelServiceErrors } from "../errors.ts";
7
7
  import { SteelProtocol, type SteelOpError, type SteelOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
9
9
  import * as T from "../traits.ts";
@@ -30,9 +30,16 @@ export class NotFound
30
30
  /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
31
31
  code: S.Number,
32
32
  message: S.String,
33
+ body: /*@__PURE__*/ S.optional(
34
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(3, __c0, 3)), S.String]),
35
+ ),
36
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
33
37
  }).pipe(C.withBadRequestError),
34
38
  [{ status: 404 }],
35
- ) {}
39
+ )
40
+ {
41
+ declare readonly body?: ErrorResponse | string;
42
+ }
36
43
 
37
44
  export interface GetProjectRequest {
38
45
  id: string;
@@ -62,6 +69,33 @@ export type ProjectsResponseProjectsList = Array<ProjectsResponseProjectsItem>;
62
69
  export interface ProjectsResponse {
63
70
  projects: ProjectsResponseProjectsList;
64
71
  }
72
+ export interface ErrorResponseContextItem {
73
+ keyword: string;
74
+ message: string;
75
+ params: unknown;
76
+ }
77
+ export type ErrorResponseContextList = Array<ErrorResponseContextItem>;
78
+ /** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
79
+ export type ErrorResponseDetailsMap = { [key: string]: unknown | undefined };
80
+ /** An error response from the API */
81
+ export interface ErrorResponse {
82
+ /** Stable machine-readable reason, e.g. 'budget_exceeded' or 'profile_not_ready'. Branch on this instead of parsing the message. */
83
+ code?: string | undefined;
84
+ context?: ErrorResponseContextList | undefined;
85
+ /** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
86
+ details?: ErrorResponseDetailsMap | undefined;
87
+ error?: string | undefined;
88
+ linkToDocs?: string | undefined;
89
+ message: string;
90
+ /** The request field that caused the error, if any. */
91
+ param?: string | undefined;
92
+ /** Seconds to wait before retrying. Also sent as the Retry-After header. */
93
+ retryAfterSeconds?: number | undefined;
94
+ /** Whether the same request can succeed later without changes. False means fix the request or the account first. */
95
+ retryable?: boolean | undefined;
96
+ /** Where a person turns on the refused feature, e.g. verifying the account. Pass it to your user. */
97
+ unlockUrl?: string | undefined;
98
+ }
65
99
  export type GetProjectError = NotFound | SteelOpError;
66
100
  /** Get project Get a project by ID. */
67
101
  export const getProject: API.OperationMethod<
@@ -70,9 +104,10 @@ export const getProject: API.OperationMethod<
70
104
  GetProjectError,
71
105
  SteelOpContext
72
106
  > = /*@__PURE__*/ API.make(() => ({
73
- input: __S(0, __c0, 0) as any as S.Schema<GetProjectRequest>,
74
- output: __S(4, __c1, 0) as any as S.Schema<Project>,
75
- errors: [NotFound, UnknownSteelError],
107
+ input: __S(4, __c1, 0) as any as S.Schema<GetProjectRequest>,
108
+ output: __S(8, __c2, 0) as any as S.Schema<Project>,
109
+ errors: [NotFound],
110
+ serviceErrors: SteelServiceErrors,
76
111
  protocol: SteelProtocol,
77
112
  retry: Retry.Retry,
78
113
  telemetry: TELEMETRY,
@@ -87,9 +122,10 @@ export const listProjects: API.OperationMethod<
87
122
  ListProjectsError,
88
123
  SteelOpContext
89
124
  > = /*@__PURE__*/ API.make(() => ({
90
- input: __S(8, __c2, 0) as any as S.Schema<ListProjectsRequest>,
91
- output: __S(10, __c2, 2) as any as S.Schema<ProjectsResponse>,
92
- errors: [UnknownSteelError],
125
+ input: __S(12, __c3, 0) as any as S.Schema<ListProjectsRequest>,
126
+ output: __S(14, __c3, 2) as any as S.Schema<ProjectsResponse>,
127
+ errors: [],
128
+ serviceErrors: SteelServiceErrors,
93
129
  protocol: SteelProtocol,
94
130
  retry: Retry.Retry,
95
131
  telemetry: TELEMETRY,
@@ -98,6 +134,37 @@ export const listProjects: API.OperationMethod<
98
134
 
99
135
  // Schema builders: each runs one schema initializer, on that schema's first use.
100
136
  function __c0(j: number): any {
137
+ switch (j) {
138
+ case 0:
139
+ return S.suspend(() =>
140
+ S.Struct({
141
+ keyword: S.String,
142
+ message: S.String,
143
+ params: S.Unknown,
144
+ }),
145
+ ).annotate({ identifier: "ErrorResponseContextItem" });
146
+ case 1:
147
+ return S.Array(__S(0, __c0, 0));
148
+ case 2:
149
+ return S.Record(S.String, S.Unknown);
150
+ case 3:
151
+ return S.suspend(() =>
152
+ S.Struct({
153
+ code: S.optional(S.String),
154
+ context: S.optional(__S(1, __c0, 1)),
155
+ details: S.optional(__S(2, __c0, 2)),
156
+ error: S.optional(S.String),
157
+ linkToDocs: S.optional(S.String),
158
+ message: S.String,
159
+ param: S.optional(S.String),
160
+ retryAfterSeconds: S.optional(S.Number),
161
+ retryable: S.optional(S.Boolean),
162
+ unlockUrl: S.optional(S.String),
163
+ }),
164
+ ).annotate({ identifier: "ErrorResponse" });
165
+ }
166
+ }
167
+ function __c1(j: number): any {
101
168
  switch (j) {
102
169
  case 0:
103
170
  return S.suspend(() =>
@@ -107,7 +174,7 @@ function __c0(j: number): any {
107
174
  ).annotate({ identifier: "GetProjectRequest" });
108
175
  }
109
176
  }
110
- function __c1(j: number): any {
177
+ function __c2(j: number): any {
111
178
  switch (j) {
112
179
  case 0:
113
180
  return S.suspend(() =>
@@ -124,18 +191,18 @@ function __c1(j: number): any {
124
191
  ).annotate({ identifier: "Project" });
125
192
  }
126
193
  }
127
- function __c2(j: number): any {
194
+ function __c3(j: number): any {
128
195
  switch (j) {
129
196
  case 0:
130
197
  return S.suspend(() =>
131
198
  S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/projects", code: 200 })),
132
199
  ).annotate({ identifier: "ListProjectsRequest" });
133
200
  case 1:
134
- return S.Array(__S(4, __c1, 0));
201
+ return S.Array(__S(8, __c2, 0));
135
202
  case 2:
136
203
  return S.suspend(() =>
137
204
  S.Struct({
138
- projects: __S(9, __c2, 1),
205
+ projects: __S(13, __c3, 1),
139
206
  }),
140
207
  ).annotate({ identifier: "ProjectsResponse" });
141
208
  }