apify-client 3.0.0-beta.76 → 3.0.0-beta.78

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.
@@ -53,6 +53,7 @@ export const ErrorType = lazySchema(() => z.enum(["3d-secure-auth-failed", "acce
53
53
  export const ErrorDetail = lazySchema(() => z.looseObject({
54
54
  type: ErrorType().optional(),
55
55
  message: z.string().optional(),
56
+ data: z.record(z.string(), z.unknown()).optional(),
56
57
  }));
57
58
  export const ErrorResponse = lazySchema(() => z.looseObject({
58
59
  error: ErrorDetail(),
@@ -100,6 +101,8 @@ export const DefaultRunOptions = lazySchema(() => z.looseObject({
100
101
  memoryMbytes: z.int().optional(),
101
102
  restartOnError: z.boolean().nullable().optional(),
102
103
  maxItems: z.int().nullable().optional(),
104
+ maxTotalChargeUsd: z.number().nullable().optional(),
105
+ isMaxTotalChargeUsdSetByUser: z.boolean().nullable().optional(),
103
106
  forcePermissionLevel: ActorPermissionLevel().nullable().optional(),
104
107
  }));
105
108
  export const ActorStandby = lazySchema(() => z.looseObject({
@@ -111,6 +114,9 @@ export const ActorStandby = lazySchema(() => z.looseObject({
111
114
  memoryMbytes: z.int().nullable().optional(),
112
115
  disableStandbyFieldsOverride: z.boolean().nullable().optional(),
113
116
  shouldPassActorInput: z.boolean().nullable().optional(),
117
+ tenancy: z.string().nullable().optional(),
118
+ isConsoleAuthEnabled: z.boolean().nullable().optional(),
119
+ isTokenlessEnabled: z.boolean().nullable().optional(),
114
120
  }));
115
121
  export const ExampleRunInput = lazySchema(() => z.looseObject({
116
122
  body: z.string().optional(),
@@ -137,6 +143,7 @@ export const EnvVar = lazySchema(() => z.looseObject({
137
143
  name: z.string(),
138
144
  value: z.string().optional(),
139
145
  isSecret: z.boolean().nullable().optional(),
146
+ valueHash: z.string().optional(),
140
147
  }));
141
148
  export const Version = lazySchema(() => z.looseObject({
142
149
  versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),
@@ -148,6 +155,9 @@ export const Version = lazySchema(() => z.looseObject({
148
155
  gitRepoUrl: z.string().nullable().optional(),
149
156
  tarballUrl: z.string().nullable().optional(),
150
157
  gitHubGistUrl: z.string().nullable().optional(),
158
+ githubWebhookId: z.int().nullable().optional(),
159
+ gitlabWebhookId: z.int().nullable().optional(),
160
+ bitbucketWebhookId: z.string().nullable().optional(),
151
161
  }));
152
162
  export const CommonActorPricingInfo = lazySchema(() => z.looseObject({
153
163
  apifyMarginPercentage: z.number(),
@@ -155,6 +165,7 @@ export const CommonActorPricingInfo = lazySchema(() => z.looseObject({
155
165
  startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
156
166
  notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
157
167
  notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
168
+ notifiedAboutRentalToPpePriceChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
158
169
  reasonForChange: z.string().nullable().optional(),
159
170
  isPriceChangeNotificationSuppressed: z.boolean().optional(),
160
171
  forceContainsSignificantPriceChange: z.boolean().optional(),
@@ -186,6 +197,7 @@ export const PayPerEventActorPricingInfo = lazySchema(() => CommonActorPricingIn
186
197
  actorChargeEvents: z.record(z.string(), ActorChargeEvent()).optional(),
187
198
  }),
188
199
  minimalMaxTotalChargeUsd: z.number().nullable().optional(),
200
+ isPPEPlatformUsagePaidByUser: z.boolean().nullable().optional(),
189
201
  }));
190
202
  /** A single tier's price-per-dataset-item entry. */
191
203
  export const TieredPricingPerDatasetItemEntry = lazySchema(() => z.looseObject({
@@ -303,6 +315,10 @@ export const UpdateVersionRequest = lazySchema(() => z.looseObject({
303
315
  tarballUrl: z.string().optional(),
304
316
  gitHubGistUrl: z.string().optional(),
305
317
  }));
318
+ export const UpdateBuildOnPushRequest = lazySchema(() => z.looseObject({
319
+ providerId: z.string(),
320
+ enabled: z.boolean(),
321
+ }));
306
322
  export const ListOfEnvVars = lazySchema(() => z.looseObject({
307
323
  total: z.int(),
308
324
  items: z.array(EnvVar()),
@@ -320,6 +336,40 @@ export const WebhookCondition = lazySchema(() => z.looseObject({
320
336
  actorTaskId: z.string().nullable().optional(),
321
337
  actorRunId: z.string().nullable().optional(),
322
338
  }));
339
+ /** Slack message configuration. Present only when `actionType` is `SLACK_MESSAGE`. */
340
+ export const WebhookSlackMessage = lazySchema(() => z.looseObject({
341
+ userIntegrationId: z.string().optional(),
342
+ channelId: z.string().optional(),
343
+ messageTemplate: z.string().optional(),
344
+ }));
345
+ /** Selects which dataset item fields are included in the output. */
346
+ export const WebhookDatasetTransformation = lazySchema(() => z.looseObject({
347
+ fields: z.array(z.string()).optional(),
348
+ omit: z.array(z.string()).optional(),
349
+ }));
350
+ /** Gmail email configuration. Present only when `actionType` is `GOOGLE_MAIL`. */
351
+ export const WebhookGoogleMail = lazySchema(() => z.looseObject({
352
+ userIntegrationId: z.string().optional(),
353
+ emailTo: z.array(z.string()).optional(),
354
+ subject: z.string().optional(),
355
+ body: z.string().optional(),
356
+ attachmentFormat: z.string().optional(),
357
+ attachmentTransformation: WebhookDatasetTransformation().optional(),
358
+ }));
359
+ /** Google Drive upload configuration. Present only when `actionType` is `GOOGLE_DRIVE`. */
360
+ export const WebhookGoogleDrive = lazySchema(() => z.looseObject({
361
+ userIntegrationId: z.string().optional(),
362
+ filename: z.string().optional(),
363
+ format: z.string().nullable().optional(),
364
+ transformation: WebhookDatasetTransformation().optional(),
365
+ }));
366
+ /** GitHub issue configuration. Present only when `actionType` is `GITHUB_ISSUE`. */
367
+ export const WebhookGithubIssue = lazySchema(() => z.looseObject({
368
+ userIntegrationId: z.string().optional(),
369
+ repository: z.string().optional(),
370
+ title: z.string().optional(),
371
+ body: z.string().optional(),
372
+ }));
323
373
  /** Status of the webhook dispatch indicating whether the HTTP request was successful. */
324
374
  export const WebhookDispatchStatus = lazySchema(() => z.enum(["ACTIVE", "SUCCEEDED", "FAILED"]).or(z.string()));
325
375
  export const WebhookLastDispatch = lazySchema(() => z.looseObject({
@@ -330,29 +380,59 @@ export const WebhookLastDispatch = lazySchema(() => z.looseObject({
330
380
  export const WebhookStats = lazySchema(() => z.looseObject({
331
381
  totalDispatches: z.int().optional(),
332
382
  }));
333
- export const WebhookListItem = lazySchema(() => z.looseObject({
383
+ export const WebhookResource = lazySchema(() => z.looseObject({
334
384
  id: z.string(),
335
385
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
336
386
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
337
387
  userId: z.string(),
338
388
  isAdHoc: z.boolean().nullable().optional(),
339
- isApifyIntegration: z.boolean().optional(),
340
389
  isEnabled: z.boolean().optional(),
341
390
  actionType: z.string().optional(),
391
+ isApifyIntegration: z.boolean().nullable().optional(),
342
392
  shouldInterpolateStrings: z.boolean().nullable().optional(),
343
393
  eventTypes: z.array(WebhookEventType()),
344
394
  condition: WebhookCondition(),
345
395
  ignoreSslErrors: z.boolean(),
346
- doNotRetry: z.boolean(),
347
- requestUrl: z.url({ normalize: true }),
396
+ doNotRetry: z.boolean().nullable().optional(),
397
+ requestUrl: z.url({ normalize: true }).nullable().optional(),
398
+ payloadTemplate: z.string().nullable().optional(),
399
+ headersTemplate: z.string().nullable().optional(),
400
+ title: z.string().nullable().optional(),
401
+ description: z.string().nullable().optional(),
402
+ slackMessage: WebhookSlackMessage().optional(),
403
+ googleMail: WebhookGoogleMail().optional(),
404
+ googleDrive: WebhookGoogleDrive().optional(),
405
+ githubIssue: WebhookGithubIssue().optional(),
348
406
  lastDispatch: WebhookLastDispatch().nullable().optional(),
349
407
  stats: WebhookStats().nullable().optional(),
350
408
  }));
351
- export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
352
- items: z.array(WebhookListItem()),
409
+ /** Paginated list of webhooks with all their fields, including `payloadTemplate`. */
410
+ export const ListOfWebhookResources = lazySchema(() => PaginationResponse().extend({
411
+ items: z.array(WebhookResource()),
353
412
  }));
354
- export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
355
- data: ListOfWebhooks(),
413
+ export const ListOfWebhookResourcesResponse = lazySchema(() => z.looseObject({
414
+ data: ListOfWebhookResources(),
415
+ }));
416
+ /** An OAuth connection configured on an Actor. Secret credentials are never returned. */
417
+ export const ActorOAuthConnection = lazySchema(() => z.looseObject({
418
+ _id: z.string(),
419
+ actorId: z.string(),
420
+ oAuthProviderType: z.enum(["CUSTOM", "GOOGLE"]).or(z.string()),
421
+ createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
422
+ modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
423
+ credentials: z.looseObject({
424
+ clientId: z.string().optional(),
425
+ scope: z.string().optional(),
426
+ label: z.string().optional(),
427
+ imageUrl: z.string().optional(),
428
+ }).optional(),
429
+ }));
430
+ export const ListOfActorOAuthConnections = lazySchema(() => z.looseObject({
431
+ total: z.int(),
432
+ items: z.array(ActorOAuthConnection()),
433
+ }));
434
+ export const ListOfActorOAuthConnectionsResponse = lazySchema(() => z.looseObject({
435
+ data: ListOfActorOAuthConnections(),
356
436
  }));
357
437
  /** Status of an Actor job (run or build). */
358
438
  export const ActorJobStatus = lazySchema(() => z.enum(["READY", "RUNNING", "SUCCEEDED", "FAILED", "TIMING-OUT", "TIMED-OUT", "ABORTING", "ABORTED"]).or(z.string()));
@@ -361,6 +441,9 @@ export const BuildMeta = lazySchema(() => z.looseObject({
361
441
  origin: RunOrigin(),
362
442
  clientIp: z.string().optional(),
363
443
  userAgent: z.string().optional(),
444
+ githubActionsRunUrl: z.string().optional(),
445
+ actorRunId: z.string().optional(),
446
+ webhookDispatchId: z.string().optional(),
364
447
  }));
365
448
  export const BuildListItem = lazySchema(() => z.looseObject({
366
449
  id: z.string(),
@@ -369,7 +452,7 @@ export const BuildListItem = lazySchema(() => z.looseObject({
369
452
  status: ActorJobStatus(),
370
453
  startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
371
454
  finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
372
- usageTotalUsd: z.number(),
455
+ usageTotalUsd: z.number().optional(),
373
456
  buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
374
457
  buildNumberInt: z.int().optional(),
375
458
  meta: BuildMeta().optional(),
@@ -391,29 +474,44 @@ export const BuildOptions = lazySchema(() => z.looseObject({
391
474
  betaPackages: z.boolean().nullable().optional(),
392
475
  memoryMbytes: z.int().nullable().optional(),
393
476
  diskMbytes: z.int().nullable().optional(),
477
+ tag: z.string().nullable().optional(),
478
+ debug: z.boolean().nullable().optional(),
394
479
  }));
395
480
  export const BuildUsage = lazySchema(() => z.looseObject({
396
481
  ACTOR_COMPUTE_UNITS: z.number().nullable().optional(),
397
482
  }));
483
+ /** Additional information about the Actor. */
484
+ export const ActorDefinitionMeta = lazySchema(() => z.looseObject({
485
+ templateId: z.string().optional(),
486
+ generatedBy: z.string().optional(),
487
+ }));
398
488
  /** The definition of the Actor, the full specification of this field can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) */
399
489
  export const ActorDefinition = lazySchema(() => z.looseObject({
400
490
  actorSpecification: z.literal(1).optional(),
401
491
  name: z.string().optional(),
492
+ title: z.string().optional(),
493
+ description: z.string().optional(),
402
494
  version: z.string().regex(/^[0-9]+(\.[0-9]+)+$/).optional(),
403
495
  buildTag: z.string().optional(),
496
+ meta: ActorDefinitionMeta().optional(),
404
497
  environmentVariables: z.record(z.string(), z.string()).optional(),
405
498
  dockerfile: z.string().optional(),
406
499
  dockerContextDir: z.string().optional(),
407
500
  readme: z.string().nullable().optional(),
408
501
  input: z.record(z.string(), z.unknown()).nullable().optional(),
502
+ output: z.record(z.string(), z.unknown()).nullable().optional(),
409
503
  changelog: z.string().nullable().optional(),
410
504
  storages: z.looseObject({
411
505
  dataset: z.record(z.string(), z.unknown()).optional(),
506
+ datasets: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
507
+ keyValueStore: z.record(z.string(), z.unknown()).optional(),
412
508
  }).optional(),
413
509
  defaultMemoryMbytes: z.union([z.string(), z.int()]).optional(),
414
510
  minMemoryMbytes: z.int().min(128).optional(),
415
511
  maxMemoryMbytes: z.int().min(128).optional(),
416
512
  usesStandbyMode: z.boolean().optional(),
513
+ webServerSchema: z.record(z.string(), z.unknown()).optional(),
514
+ webServerMcpPath: z.string().optional(),
417
515
  }));
418
516
  export const Build = lazySchema(() => z.looseObject({
419
517
  id: z.string(),
@@ -430,6 +528,11 @@ export const Build = lazySchema(() => z.looseObject({
430
528
  usageUsd: BuildUsage().nullable().optional(),
431
529
  inputSchema: z.string().nullable().optional(),
432
530
  readme: z.string().nullable().optional(),
531
+ changelog: z.string().nullable().optional(),
532
+ exitCode: z.int().nullable().optional(),
533
+ gitCommitId: z.string().optional(),
534
+ gitBranchName: z.string().optional(),
535
+ createdByOrganizationMemberUserId: z.string().optional(),
433
536
  buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
434
537
  imageDigest: z.string().nullable().optional(),
435
538
  actVersion: z.looseObject({
@@ -438,6 +541,8 @@ export const Build = lazySchema(() => z.looseObject({
438
541
  versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),
439
542
  gitRepoUrl: z.string().optional(),
440
543
  sourceFiles: z.array(SourceCodeFile()).optional(),
544
+ gitHubGistUrl: z.string().optional(),
545
+ tarballUrl: z.string().optional(),
441
546
  }).optional(),
442
547
  actorDefinition: ActorDefinition().nullable().optional(),
443
548
  }));
@@ -451,6 +556,14 @@ export const RunMeta = lazySchema(() => z.looseObject({
451
556
  userAgent: z.string().nullable().optional(),
452
557
  scheduleId: z.string().nullable().optional(),
453
558
  scheduledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
559
+ actorRunId: z.string().optional(),
560
+ webhookDispatchId: z.string().optional(),
561
+ scheduledAct2Id: z.string().optional(),
562
+ scheduledActorTaskId: z.string().optional(),
563
+ }));
564
+ /** Standby configuration of the run. Present only on Actor Standby runs. */
565
+ export const RunStandby = lazySchema(() => z.looseObject({
566
+ deployment: z.string(),
454
567
  }));
455
568
  export const RunListItem = lazySchema(() => z.looseObject({
456
569
  id: z.string(),
@@ -468,6 +581,7 @@ export const RunListItem = lazySchema(() => z.looseObject({
468
581
  defaultKeyValueStoreId: z.string(),
469
582
  defaultDatasetId: z.string(),
470
583
  defaultRequestQueueId: z.string(),
584
+ standby: RunStandby().nullable().optional(),
471
585
  }));
472
586
  export const ListOfRuns = lazySchema(() => PaginationResponse().extend({
473
587
  items: z.array(RunListItem()),
@@ -509,13 +623,26 @@ export const RunStats = lazySchema(() => z.looseObject({
509
623
  metamorph: z.int().min(0).optional(),
510
624
  computeUnits: z.number().min(0).optional(),
511
625
  }));
626
+ /** Cost of a single pay-per-event event type charged during the run. */
627
+ export const RunEventUsage = lazySchema(() => z.looseObject({
628
+ eventTotalUsd: z.number(),
629
+ eventTitle: z.string(),
630
+ }));
631
+ /** Information about the third-party integration that created the resource. */
632
+ export const IntegrationTracking = lazySchema(() => z.looseObject({
633
+ platform: z.string().optional(),
634
+ appId: z.string().optional(),
635
+ isAiTool: z.boolean().optional(),
636
+ }));
512
637
  export const RunOptions = lazySchema(() => z.looseObject({
513
638
  build: z.string(),
514
639
  timeoutSecs: z.int().min(0),
515
640
  memoryMbytes: z.int().min(128).max(32768),
516
641
  diskMbytes: z.int().min(0),
642
+ restartOnError: z.boolean().nullable().optional(),
517
643
  maxItems: z.int().min(0).nullable().optional(),
518
644
  maxTotalChargeUsd: z.number().min(0).nullable().optional(),
645
+ isMaxTotalChargeUsdSetByUser: z.boolean().optional(),
519
646
  }));
520
647
  /** Defines the general access level for the resource. */
521
648
  export const GeneralAccess = lazySchema(() => z.enum(["ANYONE_WITH_ID_CAN_READ", "ANYONE_WITH_NAME_CAN_READ", "FOLLOW_USER_SETTING", "RESTRICTED"]).or(z.string()));
@@ -532,6 +659,7 @@ export const RunUsage = lazySchema(() => z.looseObject({
532
659
  DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
533
660
  PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
534
661
  PROXY_SERPS: z.int().nullable().optional(),
662
+ PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
535
663
  }));
536
664
  /** Resource usage costs in USD. All values are monetary amounts in US dollars. */
537
665
  export const RunUsageUsd = lazySchema(() => z.looseObject({
@@ -547,6 +675,7 @@ export const RunUsageUsd = lazySchema(() => z.looseObject({
547
675
  DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
548
676
  PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
549
677
  PROXY_SERPS: z.number().nullable().optional(),
678
+ PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
550
679
  }));
551
680
  /** Information about a metamorph event that occurred during the run. */
552
681
  export const RunMetamorphEvent = lazySchema(() => z.looseObject({
@@ -554,6 +683,7 @@ export const RunMetamorphEvent = lazySchema(() => z.looseObject({
554
683
  actorId: z.string(),
555
684
  buildId: z.string(),
556
685
  inputKey: z.string().nullable().optional(),
686
+ buildTags: z.array(z.string()).optional(),
557
687
  }));
558
688
  /** Represents an Actor run and its associated data. */
559
689
  export const Run = lazySchema(() => z.looseObject({
@@ -570,6 +700,14 @@ export const Run = lazySchema(() => z.looseObject({
570
700
  pricingInfo: ActorRunPricingInfo().optional(),
571
701
  stats: RunStats(),
572
702
  chargedEventCounts: z.record(z.string(), z.int()).optional(),
703
+ accountedChargedEventCounts: z.record(z.string(), z.int()).nullable().optional(),
704
+ eventUsage: z.record(z.string(), RunEventUsage()).optional(),
705
+ externalChargedTotalUsd: z.number().optional(),
706
+ standby: RunStandby().nullable().optional(),
707
+ integrationTracking: IntegrationTracking().optional(),
708
+ createdByOrganizationMemberUserId: z.string().optional(),
709
+ consoleUrl: z.url({ normalize: true }).optional(),
710
+ output: z.record(z.string(), z.url({ normalize: true })).optional(),
573
711
  options: RunOptions(),
574
712
  buildId: z.string(),
575
713
  exitCode: z.int().nullable().optional(),
@@ -610,6 +748,7 @@ export const DatasetStats = lazySchema(() => z.looseObject({
610
748
  export const DatasetResource = lazySchema(() => z.looseObject({
611
749
  id: z.string(),
612
750
  name: z.string().nullable().optional(),
751
+ title: z.string().nullable().optional(),
613
752
  userId: z.string(),
614
753
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
615
754
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -684,6 +823,7 @@ export const KeyValueStoreStats = lazySchema(() => z.looseObject({
684
823
  export const KeyValueStoreResource = lazySchema(() => z.looseObject({
685
824
  id: z.string(),
686
825
  name: z.string().nullable().optional(),
826
+ title: z.string().nullable().optional(),
687
827
  userId: z.string().nullable().optional(),
688
828
  username: z.string().nullable().optional(),
689
829
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -763,6 +903,7 @@ export const RequestQueueStats = lazySchema(() => z.looseObject({
763
903
  export const RequestQueueResource = lazySchema(() => z.looseObject({
764
904
  id: QueueId(),
765
905
  name: z.string().nullable().optional(),
906
+ title: z.string().nullable().optional(),
766
907
  userId: QueueUserId(),
767
908
  actId: z.string().nullable().optional(),
768
909
  actRunId: z.string().nullable().optional(),
@@ -812,9 +953,13 @@ export const RequestBase = lazySchema(() => z.looseObject({
812
953
  }));
813
954
  /** A unique identifier assigned to the request. */
814
955
  export const RequestId = lazySchema(() => z.string());
956
+ /** The timestamp when the lock on this request expires. */
957
+ export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
815
958
  /** A request stored in the request queue, including its metadata and processing state. */
816
959
  export const RequestResource = lazySchema(() => RequestBase().extend({
817
960
  id: RequestId().optional(),
961
+ lockExpiresAt: LockExpiresAt().optional(),
962
+ lockByClient: z.string().optional(),
818
963
  }).required({ id: true }));
819
964
  /** A paginated list of requests from the request queue. */
820
965
  export const ListOfRequests = lazySchema(() => z.looseObject({
@@ -916,8 +1061,6 @@ export const RequestResponse = lazySchema(() => z.looseObject({
916
1061
  export const UpdateRequestResponse = lazySchema(() => z.looseObject({
917
1062
  data: RequestRegistration(),
918
1063
  }));
919
- /** The timestamp when the lock on this request expires. */
920
- export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
921
1064
  /** Information about a request lock. */
922
1065
  export const RequestLockInfo = lazySchema(() => z.looseObject({
923
1066
  lockExpiresAt: LockExpiresAt(),
@@ -972,6 +1115,7 @@ export const LockedRequestQueueHeadResponse = lazySchema(() => z.looseObject({
972
1115
  }));
973
1116
  export const TaskStats = lazySchema(() => z.looseObject({
974
1117
  totalRuns: z.int().optional(),
1118
+ lastRunStartedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
975
1119
  }));
976
1120
  export const TaskListItem = lazySchema(() => z.looseObject({
977
1121
  id: z.string(),
@@ -979,11 +1123,13 @@ export const TaskListItem = lazySchema(() => z.looseObject({
979
1123
  actId: z.string(),
980
1124
  actName: z.string().nullable().optional(),
981
1125
  name: z.string(),
1126
+ title: z.string().nullable().optional(),
982
1127
  username: z.string().nullable().optional(),
983
1128
  actUsername: z.string().nullable().optional(),
984
1129
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
985
1130
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
986
1131
  stats: TaskStats().nullable().optional(),
1132
+ isPublic: z.boolean().optional(),
987
1133
  }));
988
1134
  export const ListOfTasks = lazySchema(() => PaginationResponse().extend({
989
1135
  items: z.array(TaskListItem()),
@@ -998,6 +1144,8 @@ export const TaskOptions = lazySchema(() => z.looseObject({
998
1144
  maxItems: z.int().nullable().optional(),
999
1145
  maxTotalChargeUsd: z.number().nullable().optional(),
1000
1146
  restartOnError: z.boolean().nullable().optional(),
1147
+ isMaxTotalChargeUsdSetByUser: z.boolean().nullable().optional(),
1148
+ forcePermissionLevel: ActorPermissionLevel().nullable().optional(),
1001
1149
  }));
1002
1150
  /**
1003
1151
  * The input configuration for the Actor task. This is a user-defined JSON object
@@ -1016,6 +1164,12 @@ export const TaskPublicConfig = lazySchema(() => z.looseObject({
1016
1164
  inputSchemaFields: z.array(z.string()).nullable().optional(),
1017
1165
  datasetName: z.string().nullable().optional(),
1018
1166
  datasetView: z.string().nullable().optional(),
1167
+ categorization: z.string().nullable().optional(),
1168
+ highlightedFields: z.array(z.string()).nullable().optional(),
1169
+ faq: z.array(z.looseObject({
1170
+ question: z.string(),
1171
+ answer: z.string(),
1172
+ })).nullable().optional(),
1019
1173
  }));
1020
1174
  export const CreateTaskRequest = lazySchema(() => z.looseObject({
1021
1175
  actId: z.string(),
@@ -1032,6 +1186,7 @@ export const Task = lazySchema(() => z.looseObject({
1032
1186
  userId: z.string(),
1033
1187
  actId: z.string(),
1034
1188
  name: z.string(),
1189
+ nameLowerCase: z.string().optional(),
1035
1190
  username: z.string().nullable().optional(),
1036
1191
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1037
1192
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -1060,24 +1215,6 @@ export const UpdateTaskRequest = lazySchema(() => z.looseObject({
1060
1215
  publicConfig: TaskPublicConfig().optional(),
1061
1216
  isPublic: z.boolean().optional(),
1062
1217
  }));
1063
- export const WebhookResource = lazySchema(() => z.looseObject({
1064
- id: z.string(),
1065
- createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1066
- modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1067
- userId: z.string(),
1068
- isAdHoc: z.boolean().nullable().optional(),
1069
- shouldInterpolateStrings: z.boolean().nullable().optional(),
1070
- eventTypes: z.array(WebhookEventType()),
1071
- condition: WebhookCondition(),
1072
- ignoreSslErrors: z.boolean(),
1073
- doNotRetry: z.boolean().nullable().optional(),
1074
- requestUrl: z.url({ normalize: true }).nullable().optional(),
1075
- payloadTemplate: z.string().nullable().optional(),
1076
- headersTemplate: z.string().nullable().optional(),
1077
- description: z.string().nullable().optional(),
1078
- lastDispatch: WebhookLastDispatch().nullable().optional(),
1079
- stats: WebhookStats().nullable().optional(),
1080
- }));
1081
1218
  export const UpdateRunRequest = lazySchema(() => z.looseObject({
1082
1219
  runId: z.string().optional(),
1083
1220
  statusMessage: z.string().optional(),
@@ -1089,17 +1226,60 @@ export const ChargeRunRequest = lazySchema(() => z.looseObject({
1089
1226
  count: z.int(),
1090
1227
  requestId: z.string().optional(),
1091
1228
  }));
1229
+ /** An account a user connected through an Actor OAuth connection. */
1230
+ export const ActorOAuthAccount = lazySchema(() => z.looseObject({
1231
+ _id: z.string(),
1232
+ userId: z.string(),
1233
+ connectionId: z.string(),
1234
+ createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1235
+ modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1236
+ authorizedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1237
+ description: z.string().nullable().optional(),
1238
+ data: z.record(z.string(), z.unknown()),
1239
+ }));
1240
+ export const ListOfActorOAuthAccounts = lazySchema(() => z.looseObject({
1241
+ total: z.int(),
1242
+ items: z.array(ActorOAuthAccount()),
1243
+ }));
1244
+ export const ListOfActorOAuthAccountsResponse = lazySchema(() => z.looseObject({
1245
+ data: ListOfActorOAuthAccounts(),
1246
+ }));
1247
+ export const ActorOAuthAccountResponse = lazySchema(() => z.looseObject({
1248
+ data: ActorOAuthAccount(),
1249
+ }));
1092
1250
  export const StorageOwnership = lazySchema(() => z.enum(["ownedByMe", "sharedWithMe"]).or(z.string()));
1251
+ export const KeyValueStoreListStats = lazySchema(() => z.looseObject({
1252
+ readCount: z.int().optional(),
1253
+ writeCount: z.int().optional(),
1254
+ deleteCount: z.int().optional(),
1255
+ listCount: z.int().optional(),
1256
+ s3StorageBytes: z.int().optional(),
1257
+ }));
1258
+ export const KeyValueStoreListItem = lazySchema(() => z.looseObject({
1259
+ id: z.string(),
1260
+ name: z.string().nullable().optional(),
1261
+ title: z.string().nullable().optional(),
1262
+ userId: z.string().nullable().optional(),
1263
+ username: z.string().nullable().optional(),
1264
+ createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1265
+ modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1266
+ accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1267
+ actId: z.string().nullable().optional(),
1268
+ actRunId: z.string().nullable().optional(),
1269
+ schema: z.union([z.record(z.string(), z.unknown()), z.string()]).nullable().optional(),
1270
+ generalAccess: GeneralAccess().nullable().optional(),
1271
+ stats: KeyValueStoreListStats().optional(),
1272
+ }));
1093
1273
  export const ListOfKeyValueStores = lazySchema(() => PaginationResponse().extend({
1094
1274
  unnamed: z.boolean().optional(),
1095
- items: z.array(KeyValueStoreResource()),
1275
+ items: z.array(KeyValueStoreListItem()),
1096
1276
  }));
1097
1277
  export const ListOfKeyValueStoresResponse = lazySchema(() => z.looseObject({
1098
1278
  data: ListOfKeyValueStores(),
1099
1279
  }));
1100
1280
  export const DatasetListItem = lazySchema(() => z.looseObject({
1101
1281
  id: z.string(),
1102
- name: z.string(),
1282
+ name: z.string().nullable().optional(),
1103
1283
  userId: z.string(),
1104
1284
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1105
1285
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -1120,12 +1300,22 @@ export const ListOfDatasets = lazySchema(() => PaginationResponse().extend({
1120
1300
  export const ListOfDatasetsResponse = lazySchema(() => z.looseObject({
1121
1301
  data: ListOfDatasets(),
1122
1302
  }));
1303
+ /** Statistics about request queue operations and storage, as returned in request queue lists. */
1304
+ export const RequestQueueListStats = lazySchema(() => z.looseObject({
1305
+ deleteCount: z.int().optional(),
1306
+ headItemReadCount: z.int().optional(),
1307
+ readCount: z.int().optional(),
1308
+ writeCount: z.int().optional(),
1309
+ s3StorageBytes: z.int().optional(),
1310
+ dynamodbStorageBytes: z.int().optional(),
1311
+ }));
1123
1312
  /** A shortened request queue object for list responses. */
1124
1313
  export const RequestQueueListItem = lazySchema(() => z.looseObject({
1125
1314
  id: QueueId(),
1126
- name: z.string(),
1315
+ name: z.string().nullable().optional(),
1316
+ title: z.string().nullable().optional(),
1127
1317
  userId: QueueUserId(),
1128
- username: z.string(),
1318
+ username: z.string().optional(),
1129
1319
  createdAt: QueueCreatedAt(),
1130
1320
  modifiedAt: QueueModifiedAt(),
1131
1321
  accessedAt: QueueAccessedAt(),
@@ -1137,7 +1327,7 @@ export const RequestQueueListItem = lazySchema(() => z.looseObject({
1137
1327
  actRunId: z.string().nullable().optional(),
1138
1328
  hadMultipleClients: HadMultipleClients(),
1139
1329
  generalAccess: GeneralAccess().nullable().optional(),
1140
- stats: RequestQueueStats().optional(),
1330
+ stats: RequestQueueListStats().optional(),
1141
1331
  }));
1142
1332
  /** A paginated list of request queues. */
1143
1333
  export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend({
@@ -1148,6 +1338,37 @@ export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend(
1148
1338
  export const ListOfRequestQueuesResponse = lazySchema(() => z.looseObject({
1149
1339
  data: ListOfRequestQueues(),
1150
1340
  }));
1341
+ export const WebhookListItem = lazySchema(() => z.looseObject({
1342
+ id: z.string(),
1343
+ createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1344
+ modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1345
+ userId: z.string(),
1346
+ isAdHoc: z.boolean().nullable().optional(),
1347
+ isApifyIntegration: z.boolean().optional(),
1348
+ isEnabled: z.boolean().optional(),
1349
+ actionType: z.string().optional(),
1350
+ shouldInterpolateStrings: z.boolean().nullable().optional(),
1351
+ eventTypes: z.array(WebhookEventType()),
1352
+ condition: WebhookCondition(),
1353
+ ignoreSslErrors: z.boolean(),
1354
+ doNotRetry: z.boolean(),
1355
+ requestUrl: z.url({ normalize: true }).nullable().optional(),
1356
+ headersTemplate: z.string().nullable().optional(),
1357
+ title: z.string().nullable().optional(),
1358
+ description: z.string().nullable().optional(),
1359
+ slackMessage: WebhookSlackMessage().optional(),
1360
+ googleMail: WebhookGoogleMail().optional(),
1361
+ googleDrive: WebhookGoogleDrive().optional(),
1362
+ githubIssue: WebhookGithubIssue().optional(),
1363
+ lastDispatch: WebhookLastDispatch().nullable().optional(),
1364
+ stats: WebhookStats().nullable().optional(),
1365
+ }));
1366
+ export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
1367
+ items: z.array(WebhookListItem()),
1368
+ }));
1369
+ export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
1370
+ data: ListOfWebhooks(),
1371
+ }));
1151
1372
  export const CreateWebhookRequest = lazySchema(() => z.looseObject({
1152
1373
  isAdHoc: z.boolean().nullable().optional(),
1153
1374
  eventTypes: z.array(WebhookEventType()),
@@ -1179,10 +1400,16 @@ export const UpdateWebhookRequest = lazySchema(() => z.looseObject({
1179
1400
  }));
1180
1401
  /** A summary of the webhook that triggered this dispatch. */
1181
1402
  export const WebhookDispatchWebhookSummary = lazySchema(() => z.looseObject({
1403
+ _id: z.string().optional(),
1182
1404
  actionType: z.string().optional(),
1183
1405
  condition: WebhookCondition().optional(),
1184
1406
  requestUrl: z.url({ normalize: true }).nullable().optional(),
1185
1407
  isAdHoc: z.boolean().optional(),
1408
+ isApifyIntegration: z.boolean().nullable().optional(),
1409
+ slackMessage: WebhookSlackMessage().optional(),
1410
+ googleMail: WebhookGoogleMail().optional(),
1411
+ googleDrive: WebhookGoogleDrive().optional(),
1412
+ githubIssue: WebhookGithubIssue().optional(),
1186
1413
  }));
1187
1414
  export const WebhookDispatch = lazySchema(() => z.looseObject({
1188
1415
  id: z.string(),
@@ -1204,6 +1431,7 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
1204
1431
  errorMessage: z.string().nullable().optional(),
1205
1432
  responseStatus: z.int().nullable().optional(),
1206
1433
  responseBody: z.string().nullable().optional(),
1434
+ debugPostMessage: z.record(z.string(), z.unknown()).optional(),
1207
1435
  })).optional(),
1208
1436
  }));
1209
1437
  export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
@@ -1228,6 +1456,10 @@ export const ScheduleBase = lazySchema(() => z.looseObject({
1228
1456
  nextRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1229
1457
  lastRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1230
1458
  }));
1459
+ /** Notification settings for this schedule. */
1460
+ export const ScheduleNotifications = lazySchema(() => z.looseObject({
1461
+ email: z.boolean().optional(),
1462
+ }));
1231
1463
  export const ScheduleListItemActionRunActor = lazySchema(() => z.looseObject({
1232
1464
  id: z.string(),
1233
1465
  type: z.literal("RUN_ACTOR"),
@@ -1240,6 +1472,9 @@ export const ScheduleListItemActionRunActorTask = lazySchema(() => z.looseObject
1240
1472
  }));
1241
1473
  export const ScheduleListItemAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleListItemActionRunActor(), ScheduleListItemActionRunActorTask()]));
1242
1474
  export const ScheduleListItem = lazySchema(() => ScheduleBase().extend({
1475
+ title: z.string().nullable().optional(),
1476
+ notifications: ScheduleNotifications().optional(),
1477
+ integrationTracking: IntegrationTracking().optional(),
1243
1478
  actions: z.array(ScheduleListItemAction()),
1244
1479
  }));
1245
1480
  export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
@@ -1248,10 +1483,6 @@ export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
1248
1483
  export const ListOfSchedulesResponse = lazySchema(() => z.looseObject({
1249
1484
  data: ListOfSchedules(),
1250
1485
  }));
1251
- /** Notification settings for this schedule. */
1252
- export const ScheduleNotifications = lazySchema(() => z.looseObject({
1253
- email: z.boolean().optional(),
1254
- }));
1255
1486
  export const ScheduleActionRunInput = lazySchema(() => z.looseObject({
1256
1487
  body: z.string().nullable().optional(),
1257
1488
  contentType: z.string().nullable().optional(),
@@ -1279,6 +1510,14 @@ export const CreateOrUpdateScheduleRequest = lazySchema(() => z.looseObject({
1279
1510
  notifications: ScheduleNotifications().optional(),
1280
1511
  actions: z.array(ScheduleCreateAction()).nullable().optional(),
1281
1512
  }));
1513
+ /** State of the schedule editor in Apify Console. It's removed when an API update changes `cronExpression` or `timezone`. */
1514
+ export const ScheduleUiState = lazySchema(() => z.looseObject({
1515
+ version: z.int().optional(),
1516
+ data: z.looseObject({
1517
+ cronExpression: z.string().optional(),
1518
+ timezone: z.string().optional(),
1519
+ }).optional(),
1520
+ }));
1282
1521
  export const ScheduleActionRunActor = lazySchema(() => z.looseObject({
1283
1522
  id: z.string(),
1284
1523
  type: z.literal("RUN_ACTOR"),
@@ -1297,6 +1536,8 @@ export const Schedule = lazySchema(() => ScheduleBase().extend({
1297
1536
  description: z.string().nullable().optional(),
1298
1537
  title: z.string().nullable().optional(),
1299
1538
  notifications: ScheduleNotifications().optional(),
1539
+ uiState: ScheduleUiState().optional(),
1540
+ integrationTracking: IntegrationTracking().optional(),
1300
1541
  actions: z.array(ScheduleAction()),
1301
1542
  }));
1302
1543
  export const ScheduleResponse = lazySchema(() => z.looseObject({
@@ -1323,6 +1564,13 @@ export const CurrentPricingInfo = lazySchema(() => z.looseObject({
1323
1564
  reasonForChange: z.string().nullable().optional(),
1324
1565
  minimalMaxTotalChargeUsd: z.number().nullable().optional(),
1325
1566
  pricingPerEvent: z.record(z.string(), z.unknown()).nullable().optional(),
1567
+ pricePerUnitUsd: z.number().optional(),
1568
+ trialMinutes: z.int().optional(),
1569
+ unitName: z.string().optional(),
1570
+ tieredPricing: z.record(z.string(), z.looseObject({
1571
+ tieredPricePerUnitUsd: z.number().optional(),
1572
+ })).optional(),
1573
+ notifiedAboutRentalToPpePriceChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1326
1574
  }));
1327
1575
  export const StoreActor = lazySchema(() => z.looseObject({
1328
1576
  id: z.string(),
@@ -1344,6 +1592,13 @@ export const StoreActor = lazySchema(() => z.looseObject({
1344
1592
  bookmarkCount: z.int().optional(),
1345
1593
  badge: z.string().nullable().optional(),
1346
1594
  readmeSummary: z.string().optional(),
1595
+ inputSchema: z.looseObject({
1596
+ type: z.string(),
1597
+ properties: z.record(z.string(), z.looseObject({
1598
+ type: z.union([z.string(), z.array(z.string())]).optional(),
1599
+ })),
1600
+ required: z.array(z.string()).optional(),
1601
+ }).optional(),
1347
1602
  }));
1348
1603
  export const ListOfStoreActors = lazySchema(() => PaginationResponse().extend({
1349
1604
  items: z.array(StoreActor()),
@@ -1368,12 +1623,14 @@ export const UserPublicInfoResponse = lazySchema(() => z.looseObject({
1368
1623
  data: UserPublicInfo(),
1369
1624
  }));
1370
1625
  export const ProxyGroup = lazySchema(() => z.looseObject({
1626
+ id: z.string().optional(),
1371
1627
  name: z.string(),
1372
1628
  description: z.string().nullable(),
1373
- availableCount: z.int(),
1629
+ availableCount: z.int().optional(),
1374
1630
  }));
1631
+ /** Proxy access info. Omitted when the user has no access to Apify Proxy. */
1375
1632
  export const ProxyResource = lazySchema(() => z.looseObject({
1376
- password: z.string(),
1633
+ password: z.string().nullable().optional(),
1377
1634
  groups: z.array(ProxyGroup()),
1378
1635
  }));
1379
1636
  /**
@@ -1408,6 +1665,17 @@ export const UserPlan = lazySchema(() => z.looseObject({
1408
1665
  maxScheduleCount: z.int().optional(),
1409
1666
  maxConcurrentActorRuns: z.int().optional(),
1410
1667
  planPricing: z.record(z.string(), z.unknown()).optional(),
1668
+ planVersion: z.number().optional(),
1669
+ legacyPlanId: z.string().optional(),
1670
+ planTags: z.array(z.string()).optional(),
1671
+ overageThresholdUsd: z.number().optional(),
1672
+ maxMonthlyUnblockerUnits: z.int().optional(),
1673
+ maxPublicActorTaskCount: z.int().optional(),
1674
+ maxPublicActorTaskCountPerActor: z.int().optional(),
1675
+ forceBillingInterval: z.string().optional(),
1676
+ personalizedSupport: z.string().nullable().optional(),
1677
+ monitoringLevel: z.enum(["STANDARD"]).or(z.string()).nullable().optional(),
1678
+ isPayingCustomer: z.boolean().optional(),
1411
1679
  }));
1412
1680
  export const EffectivePlatformFeature = lazySchema(() => z.looseObject({
1413
1681
  isEnabled: z.boolean(),
@@ -1432,12 +1700,13 @@ export const UserPrivateInfo = lazySchema(() => z.looseObject({
1432
1700
  id: z.string().optional(),
1433
1701
  username: z.string(),
1434
1702
  profile: UserProfile().optional(),
1435
- email: z.string().optional(),
1703
+ email: z.string().nullable().optional(),
1436
1704
  proxy: ProxyResource().optional(),
1437
1705
  plan: UserPlan().optional(),
1438
1706
  effectivePlatformFeatures: EffectivePlatformFeatures().optional(),
1439
1707
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
1440
1708
  isPaying: z.boolean().optional(),
1709
+ organizationOwnerUserId: z.string().nullable().optional(),
1441
1710
  }));
1442
1711
  export const UserPrivateInfoResponse = lazySchema(() => z.looseObject({
1443
1712
  data: UserPrivateInfo(),
@@ -1492,6 +1761,7 @@ export const Limits = lazySchema(() => z.looseObject({
1492
1761
  maxTeamAccountSeatCount: z.int(),
1493
1762
  dataRetentionDays: z.int(),
1494
1763
  maxScheduleCount: z.int().optional(),
1764
+ maxMonthlyUnblockerUnits: z.number().optional(),
1495
1765
  }));
1496
1766
  export const CurrentUsage = lazySchema(() => z.looseObject({
1497
1767
  monthlyUsageUsd: z.number(),
@@ -1505,6 +1775,7 @@ export const CurrentUsage = lazySchema(() => z.looseObject({
1505
1775
  activeActorJobCount: z.int(),
1506
1776
  teamAccountSeatCount: z.int(),
1507
1777
  scheduleCount: z.int().optional(),
1778
+ monthlyUnblockerUnits: z.number().optional(),
1508
1779
  }));
1509
1780
  export const AccountLimits = lazySchema(() => z.looseObject({
1510
1781
  monthlyUsageCycle: UsageCycle(),
@@ -1518,6 +1789,52 @@ export const UpdateLimitsRequest = lazySchema(() => z.looseObject({
1518
1789
  maxMonthlyUsageUsd: z.number().optional(),
1519
1790
  dataRetentionDays: z.int().optional(),
1520
1791
  }));
1792
+ /** A place the user can create a repository in, such as their own account or an organization, group or workspace they can access. */
1793
+ export const GitProviderWorkspace = lazySchema(() => z.looseObject({
1794
+ id: z.string(),
1795
+ label: z.string(),
1796
+ }));
1797
+ /** A connected git provider account the user can create repositories through. */
1798
+ export const GitProviderIntegration = lazySchema(() => z.looseObject({
1799
+ id: z.string(),
1800
+ provider: z.enum(["github", "gitlab", "bitbucket"]).or(z.string()),
1801
+ workspaces: z.array(GitProviderWorkspace()),
1802
+ addWorkspaceUrl: z.string().optional(),
1803
+ }));
1804
+ export const ListOfGitProviderIntegrationsResponse = lazySchema(() => z.looseObject({
1805
+ data: z.array(GitProviderIntegration()),
1806
+ }));
1807
+ /** A file to commit into the new repository. */
1808
+ export const GitRepoFile = lazySchema(() => z.looseObject({
1809
+ path: z.string(),
1810
+ content: z.string(),
1811
+ encoding: z.enum(["utf-8", "base64"]).or(z.string()),
1812
+ }));
1813
+ export const CreateGitRepoRequest = lazySchema(() => z.looseObject({
1814
+ workspace: z.string(),
1815
+ repoName: z.string(),
1816
+ isPrivate: z.boolean(),
1817
+ files: z.array(GitRepoFile()).optional(),
1818
+ templateArchiveUrl: z.string().optional(),
1819
+ }));
1820
+ /** URLs of a newly created repository. */
1821
+ export const GitRepo = lazySchema(() => z.looseObject({
1822
+ sshUrl: z.string(),
1823
+ httpsUrl: z.string(),
1824
+ htmlUrl: z.string(),
1825
+ }));
1826
+ export const GitRepoResponse = lazySchema(() => z.looseObject({
1827
+ data: GitRepo(),
1828
+ }));
1829
+ export const RegisterDeploymentKeyRequest = lazySchema(() => z.looseObject({
1830
+ actorId: z.string(),
1831
+ repoName: z.string(),
1832
+ }));
1833
+ export const RegisterDeploymentKeyResponse = lazySchema(() => z.looseObject({
1834
+ data: z.looseObject({
1835
+ repoName: z.string(),
1836
+ }),
1837
+ }));
1521
1838
  export const BrowserInfoResponse = lazySchema(() => z.looseObject({
1522
1839
  method: z.string(),
1523
1840
  clientIp: z.string().nullable(),