@madewithremy/admin 0.1.51 → 0.1.52

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ What changed in `@madewithremy/admin`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.44 aren't recorded here.
6
6
 
7
+ ## 0.1.52
8
+
9
+ ### New
10
+
11
+ - `remy-admin apps list [--search <words>] [--status draft|published]` (`admin.apps.list`): the workspace's apps, last active first, each with its `appId`, `name`, `subdomain`, `isPublished`, `lastDeployedAt` and `createdBy`. It lists every published app and your own drafts. `--search` keeps the apps whose name or subdomain contains every word, so an app the user names can be found for `issues create --app <appId>` without asking for its id.
12
+ - `remy-admin releases wait` on a release that went live returns `primaryUrl`, the address the app is served on: its live custom domain, else its platform subdomain, else its id's own host. `remy-admin releases current` (`admin.releases.dashboardLive`) returns it too.
13
+ - `remy-admin email domains list` (`admin.email.listDomains('sending')`) returns `effectiveSender.anyRecipient`. It's false on the platform's shared address, which only mails the app's verified users and its workspace's members, in dev and live alike, and refuses anyone else with `unverified_recipients`. A subdomain or a verified sending domain lifts it.
14
+
15
+ ### Changed behavior
16
+
17
+ - `remy-admin domains check` returns `reason` beside `isAvailable`: `reserved` (the platform's own, never any app's), `taken` (another app has it) or `invalid`, and null when the subdomain is available. `domains set` refuses with the same codes as before, `subdomain_not_allowed` or `unavailable`, and its message now says which case applies. Code that matched either message's text should match the code instead.
18
+
7
19
  ## 0.1.51
8
20
 
9
21
  ### Changed behavior
package/dist/index.d.ts CHANGED
@@ -295,7 +295,7 @@ interface TasksListParams {
295
295
  * const { traces } = await admin.tasks.list({ limit: 10 });
296
296
  * const broken = traces.filter((t) => t.outcome !== 'answered' || t.toolErrorCount > 0);
297
297
  */
298
- declare function list$c(ctx: AdminContext, params?: TasksListParams): Promise<TasksListResult>;
298
+ declare function list$d(ctx: AdminContext, params?: TasksListParams): Promise<TasksListResult>;
299
299
  /**
300
300
  * One task with its full transcript: the prompt and tools it was given, its
301
301
  * input, each turn's reply and reasoning, and every tool call with what came
@@ -316,7 +316,7 @@ declare function get$9(ctx: AdminContext, traceId: string): Promise<TasksGetResu
316
316
 
317
317
  type tasks_TasksListParams = TasksListParams;
318
318
  declare namespace tasks {
319
- export { get$9 as get, list$c as list };
319
+ export { get$9 as get, list$d as list };
320
320
  export type { tasks_TasksListParams as TasksListParams };
321
321
  }
322
322
 
@@ -725,6 +725,85 @@ declare namespace analytics {
725
725
  export type { analytics_AiSourcesParams as AiSourcesParams, analytics_CrawlersParams as CrawlersParams, analytics_MapParams as MapParams, analytics_SourcesParams as SourcesParams };
726
726
  }
727
727
 
728
+ /**
729
+ * Response shapes for the apps command group — transcribed from the api.
730
+ *
731
+ * Sources (apps/api/src/):
732
+ * roles/http/routes/Apps/create.ts (GET /_internal/v2/apps)
733
+ * customerApps/AppRecord/dao/AppRecordDao.ts (AppListItem)
734
+ */
735
+ /** One page of GET /_internal/v2/apps: the workspace's apps, last active first. */
736
+ interface AppsListPage {
737
+ apps: Array<{
738
+ appId: string;
739
+ name: string;
740
+ isPublished: boolean;
741
+ lastDeployedAt: string | null;
742
+ /** Public (hyphenated) platform subdomain, or null if unset. */
743
+ customSubdomain: string | null;
744
+ createdBy: {
745
+ userId: string;
746
+ name: string;
747
+ };
748
+ }>;
749
+ nextCursor: string | null;
750
+ }
751
+ /** An app in the workspace, as `apps list` shows it. */
752
+ interface WorkspaceApp {
753
+ appId: string;
754
+ name: string;
755
+ /** Its platform subdomain (`<subdomain>.<apex>`), or null if it has none. */
756
+ subdomain: string | null;
757
+ /** Whether it has a live release; a draft is listed only to its creator. */
758
+ isPublished: boolean;
759
+ lastDeployedAt: string | null;
760
+ /** Who made it. */
761
+ createdBy: string;
762
+ }
763
+ /** apps list */
764
+ interface AppsListResult {
765
+ apps: WorkspaceApp[];
766
+ }
767
+
768
+ /**
769
+ * Apps operations: the other apps in this app's workspace.
770
+ *
771
+ * Ops are pure: (ctx, params) → typed result, throwing AdminApiError /
772
+ * AdminTimeoutError. No printing, no process coupling — the CLI skin in
773
+ * commands/apps.ts and the importable client both call these.
774
+ */
775
+
776
+ interface AppsListParams {
777
+ /**
778
+ * Words an app's name or subdomain must all contain, in any case: `remy
779
+ * marketing` finds "Remy Marketing site".
780
+ */
781
+ search?: string;
782
+ /** `published` (has a live release) or `draft`. Default: both. */
783
+ status?: 'draft' | 'published';
784
+ }
785
+ /**
786
+ * The workspace's apps, last active first: every published app, and the
787
+ * drafts of the person this key belongs to (another member's draft isn't
788
+ * listed). An app's `appId` is what `issues --app` and `forApp` take.
789
+ *
790
+ * The list route doesn't search, so this reads every page and matches here,
791
+ * as the editor's app list does in the browser.
792
+ *
793
+ * @throws AdminApiError `invalid_status` (400) — status is not `draft` or
794
+ * `published`.
795
+ * @example
796
+ * const { apps } = await admin.apps.list({ search: 'marketing' });
797
+ * const marketing = admin.forApp(apps[0].appId);
798
+ */
799
+ declare function list$c(ctx: AdminContext, params?: AppsListParams): Promise<AppsListResult>;
800
+
801
+ type apps_AppsListParams = AppsListParams;
802
+ declare namespace apps {
803
+ export { list$c as list };
804
+ export type { apps_AppsListParams as AppsListParams };
805
+ }
806
+
728
807
  /**
729
808
  * Response types for the v2 app-events observability endpoints.
730
809
  *
@@ -4531,6 +4610,12 @@ interface DomainsCheckResult {
4531
4610
  /** Normalized (public hyphenated) form of the requested subdomain. */
4532
4611
  subdomain: string;
4533
4612
  isAvailable: boolean;
4613
+ /**
4614
+ * Why it isn't available, or null when it is: `reserved` (the platform's,
4615
+ * never any app's), `taken` (another app has it) or `invalid` (not 1 to 63
4616
+ * letters, digits and hyphens, or shaped like an app's ID).
4617
+ */
4618
+ reason: 'invalid' | 'reserved' | 'taken' | null;
4534
4619
  }
4535
4620
  /** GET /_internal/v2/apps/:appId/settings/custom-domains */
4536
4621
  interface DomainsCustomListResult {
@@ -5233,6 +5318,13 @@ interface EmailEffectiveSender {
5233
5318
  tier: EmailSenderTier;
5234
5319
  /** Null for the `default` platform tier. */
5235
5320
  domain: string | null;
5321
+ /**
5322
+ * Whether the app can mail any address. False on the shared platform address
5323
+ * (the `default` tier), which only mails the app's verified users and its
5324
+ * workspace's members and refuses anyone else with `unverified_recipients`; a
5325
+ * subdomain or a verified sending domain lifts it.
5326
+ */
5327
+ anyRecipient: boolean;
5236
5328
  }
5237
5329
  /** email list → GET /outbound-email/messages */
5238
5330
  interface EmailListResult {
@@ -7195,7 +7287,8 @@ interface ReleasesGetResult extends ReleaseFailureFields {
7195
7287
  }
7196
7288
  /**
7197
7289
  * Response from GET /_internal/v2/apps/:appId/releases/by-commit/:sha.
7198
- * Plain release row — no databases/diff enrichment — plus previewUrl.
7290
+ * Plain release row — no databases/diff enrichment — plus previewUrl and
7291
+ * primaryUrl.
7199
7292
  * Used by 'releases wait', which polls this endpoint in a loop.
7200
7293
  */
7201
7294
  interface ReleasesByCommitResult extends ReleaseFailureFields {
@@ -7228,6 +7321,12 @@ interface ReleasesByCommitResult extends ReleaseFailureFields {
7228
7321
  * Synthesised synchronously from the release id by buildPreviewUrl().
7229
7322
  */
7230
7323
  previewUrl: string | null;
7324
+ /**
7325
+ * The address the app is served on when status is 'live' (its live custom
7326
+ * domain, else its platform subdomain, else its id's own host; ends in a
7327
+ * slash); null otherwise.
7328
+ */
7329
+ primaryUrl: string | null;
7231
7330
  /**
7232
7331
  * The data sources this release declares app code for. A live release's
7233
7332
  * reader entries carry `readerUnread`: the source's documents its reader
@@ -7820,13 +7919,16 @@ declare function byCommit(ctx: AdminContext, commitSha: string): Promise<{
7820
7919
  }>;
7821
7920
  /**
7822
7921
  * The currently-live release, or null when the app has never been published.
7823
- * Fetched from the dashboard endpoint — same source as `releases current`.
7922
+ * Fetched from the dashboard endpoint — same source as `releases current` —
7923
+ * with the address it's served on as `primaryUrl` (see `primaryUrl` below).
7824
7924
  *
7825
7925
  * @example
7826
7926
  * const live = await admin.releases.dashboardLive();
7827
- * if (live) console.log(live.commitSha, live.publishedAt);
7927
+ * if (live) console.log(live.commitSha, live.publishedAt, live.primaryUrl);
7828
7928
  */
7829
- declare function dashboardLive(ctx: AdminContext): Promise<DashboardLiveRelease | null>;
7929
+ declare function dashboardLive(ctx: AdminContext): Promise<(DashboardLiveRelease & {
7930
+ primaryUrl: string;
7931
+ }) | null>;
7830
7932
  /**
7831
7933
  * The URL the app is served on, as the platform resolves it: its live custom
7832
7934
  * domain, then its platform subdomain, then its id's own host. Ends in a slash.
@@ -7841,8 +7943,9 @@ declare function primaryUrl(ctx: AdminContext): Promise<string>;
7841
7943
  *
7842
7944
  * `previewUrl` is present for a feature-branch build (status 'preview') and is
7843
7945
  * where that build is actually reachable — gated to anyone who can open the app
7844
- * in Remy. Reported as data rather than taught as a URL shape, so the caller
7845
- * never has to construct one.
7946
+ * in Remy. `primaryUrl` is present for a live one: the address the app is
7947
+ * served on. Both are reported as data rather than taught as a URL shape, so
7948
+ * the caller never has to construct one.
7846
7949
  */
7847
7950
  interface ReleaseSummary {
7848
7951
  releaseId: string;
@@ -7852,6 +7955,11 @@ interface ReleaseSummary {
7852
7955
  buildDurationMs: number | null;
7853
7956
  publishedAt: string | null;
7854
7957
  previewUrl?: string;
7958
+ /**
7959
+ * Where the live app is served: its live custom domain, then its platform
7960
+ * subdomain, then its id's own host. Only present when status is `live`.
7961
+ */
7962
+ primaryUrl?: string;
7855
7963
  /** Why it failed; only present when status is `failed`. */
7856
7964
  error?: string;
7857
7965
  /**
@@ -8959,6 +9067,7 @@ declare function buildClient(ctx: AdminContext): {
8959
9067
  agent: BoundOps<typeof agent>;
8960
9068
  tasks: BoundOps<typeof tasks>;
8961
9069
  analytics: BoundOps<typeof analytics>;
9070
+ apps: BoundOps<typeof apps>;
8962
9071
  events: BoundOps<typeof appEvents>;
8963
9072
  crashes: BoundOps<typeof crashes>;
8964
9073
  cron: BoundOps<typeof cron>;
@@ -9048,4 +9157,4 @@ declare class AdminTimeoutError extends Error {
9048
9157
  declare const admin: AdminClient;
9049
9158
 
9050
9159
  export { AdminApiError, AdminTimeoutError, admin, createAdminClient, admin as default };
9051
- export type { AdminClient, AdminClientOptions, AdminContext, AgentThreadDetail, AgentThreadListItem, AgentThreadsGetResult, AgentThreadsListResult, AgentToolCall, AgentTranscriptMessage, AgentTurnError, AnalyticsAiHostRow, AnalyticsAiSourcesResult, AnalyticsAiVendorRow, AnalyticsBatchResult, AnalyticsCrawlersOverviewResult, AnalyticsCrawlersRecentResult, AnalyticsCrawlersRecentRow, AnalyticsCrawlersResult, AnalyticsCrawlersTimeseriesBucket, AnalyticsCrawlersTimeseriesResult, AnalyticsLiveResult, AnalyticsMapPoint, AnalyticsMapResult, AnalyticsMetric, AnalyticsQueryResult, AnalyticsQueryResultRow, AnalyticsSourceRow, AnalyticsSourcesResult, AppCronJobStatus, AppCronJobStatusReason, AppCronRunState, AppEmailSuppression, AppSecretRow, BoughtDomain, CrashGroup, CrashOccurrenceRow, CrashesGetResult, CrashesListResult, CrashesOccurrencesResult, CrashesStatsBucket, CrashesStatsResult, CronJobDecorated, CronOverviewResult, CronRunResult, CronRunSummary, DashboardLiveRelease, DashboardReleaseMethod, DashboardResult, DataLiftFromDevResult, DataLiftFromLiveResult, DataSourceConnector, DataSourceConnectorCredentials, DataSourceConnectorDeletions, DataSourceConnectorGetResult, DataSourceConnectorPolicy, DataSourceConnectorResult, DataSourceInspectReport, DataSourceInspectResult, DataSourceJob, DataSourceJobGetResult, DataSourceJobManifestTokenResult, DataSourceJobPlan, DataSourceJobResult, DataSourceJobSource, DataSourceJobState, DataSourceJobsListResult, DataSourceMapDeployResult, DataSourceMapTestDocument, DataSourceMapTestOutcome, DataSourceMapTestResult, DataSourceMapper, DataSourceObjectSelection, DataSourceQuarantineResult, DataSourceQuarantinedObject, DataSourceReader, DataSourceReaderDeliveries, DataSourceReaderRetryResult, DataSourceReaderStatusResult, DataSourceReaderTestDocument, DataSourceReaderTestResult, DataSourceRemapResult, DataSourceRereadResult, DataSourceSyncResult, DataSourcesBuildProgress, DataSourcesChunkingConfig, DataSourcesChunkingStrategy, DataSourcesConfigResult, DataSourcesConfigUpdateResult, DataSourcesCountResult, DataSourcesCreateResult, DataSourcesDeleteResult, DataSourcesDictionaryPushResult, DataSourcesDictionaryReport, DataSourcesDictionaryStatus, DataSourcesDocument, DataSourcesDocumentConfirmResult, DataSourcesDocumentDeleteManyResult, DataSourcesDocumentDeleteResult, DataSourcesDocumentSelector, DataSourcesDocumentStatus, DataSourcesDocumentsResult, DataSourcesDropResult, DataSourcesEntitiesResult, DataSourcesHydrateResult, DataSourcesHydration, DataSourcesIndex, DataSourcesIngestConfig, DataSourcesIngestUpdate, DataSourcesLinkResult, DataSourcesListEntry, DataSourcesListResult, DataSourcesMigration, DataSourcesMoveResult, DataSourcesPassage, DataSourcesPassagesResult, DataSourcesPlacement, DataSourcesPromoteResult, DataSourcesRelink, DataSourcesRetrievalConfig, DataSourcesRetrievalUpdate, DataSourcesRevectorizeResult, DataSourcesSampleResult, DataSourcesSearchCitation, DataSourcesSearchResult, DataSourcesSearchResultItem, DataSourcesUploadTokenResult, DatasetFile, DbHistoryResult, DbQueryResult, DiagnosticsAuditEnvironment, DiagnosticsDashboardResult, DiagnosticsFinding, DiagnosticsLighthouseScores, DiagnosticsPayload, DiagnosticsReleaseResult, DiagnosticsRuntimeFindings, DomainsCheckResult, DomainsCustomAddResult, DomainsCustomCheckResult, DomainsCustomHostnameUiStatus, DomainsCustomHostnameView, DomainsCustomListResult, DomainsCustomRemoveResult, DomainsCustomRetryResult, DomainsDnsInstructions, DomainsGetResult, DomainsSetResult, EmailBatchLifecycle, EmailBatchResult, EmailBatchSummary, EmailBatchesResult, EmailDomainBase, EmailEffectiveSender, EmailInboxResult, EmailListResult, EmailMessageKind, EmailMessageResult, EmailMessageStatus, EmailSenderTier, EmailSendingStatusResult, EmailStatsResult, EmailSummary, EmailSuppressResult, EmailSuppressionsResult, EmailUnsuppressResult, EvalAggregates, EvalCompareResult, EvalExpectation, EvalQueriesAddResult, EvalQueriesListResult, EvalQuery, EvalQueryResult, EvalQueryStyle, EvalRetrieval, EvalRun, EvalRunResult, EvalRunState, EvalRunsListResult, EvalSet, EvalSetGetResult, EvalSetResult, EvalSetState, EvalSetsListResult, EventChannelActivity, EventsChannelsListResult, EventsPublishResult, EventsTailFrame, FilesDeleteResult, FilesFileMeta, FilesListEntry, FilesListResult, FilesLsResult, FilesScanBadge, FilesScanFlagged, FilesScanStore, FilesStatResult, FilesStoreSummaryEntry, FilesUploadUrlResult, FilesUrlResult, FrontendErrorType, InboundDnsInstructions, InboundEmailDomainAddResult, InboundEmailDomainCheckResult, InboundEmailDomainDeleteResult, InboundEmailDomainUiStatus, InboundEmailDomainVerifyResult, InboundEmailDomainView, InboundEmailDomainsListResult, InboxEmailPreview, IssueAuthorKind, IssueCommentRow, IssueEventType, IssueRow, IssueStatus, IssuesCommentResult, IssuesCreateResult, IssuesDeleteResult, IssuesGetResult, IssuesListResult, IssuesUpdateResult, JewelPairRow, JewelPairSummaryRow, JewelVerdict, JewelsDatasetSummary, JewelsDryrunResult, JewelsExportResult, JewelsGradeResult, JewelsGrading, JewelsOverviewResult, JewelsPairResult, JewelsPairsResult, JewelsQueueResult, JewelsResolveResult, JewelsRunResult, JewelsRunsResult, JewelsTimeseriesBucket, JewelsTimeseriesResult, JewelsTrainResult, LiftedDatabase, MethodsInvokeResult, OperationProgress, OutboundDnsInstructions, OutboundDnsRecord, OutboundEmailDomainAddResult, OutboundEmailDomainCheckResult, OutboundEmailDomainDeleteResult, OutboundEmailDomainUiStatus, OutboundEmailDomainVerifyResult, OutboundEmailDomainView, OutboundEmailDomainsListResult, PlatformSuppression, PrerenderGetResult, PrerenderInvalidateResult, PrerenderPage, PrerenderPagesResult, PrerenderViewResult, PreviewShareLink, PreviewShareListResult, PreviewShareResult, PreviewShareRevokeResult, RegisteredDomainConnection, RegisteredDomainOffer, RegisteredDomainQuote, RegisteredDomainRecordType, RegisteredDomainRecords, RegisteredDomainStatus, RegisteredDomainView, RegisteredDomainZoneRecord, RegisteredDomainsBuyResult, RegisteredDomainsContactResult, RegisteredDomainsContactSetResult, RegisteredDomainsListResult, RegisteredDomainsQuoteResult, RegisteredDomainsRecordDeleteResult, RegisteredDomainsRecordResult, RegisteredDomainsSearchResult, RegisteredDomainsZoneResult, RegistrantContact, ReleaseFailureFields, ReleaseFragment, ReleasesByCommitResult, ReleasesGetResult, ReleasesListResult, RequestsGetResult, RequestsListResult, RequestsListRow, RequestsStatsMethodBucket, RequestsStatsMethodResult, RequestsStatsSummaryBucket, RequestsStatsSummaryResult, SecretsDeleteResult, SecretsGetResult, SecretsListResult, SecretsSetResult, SettingsResult, SuppressionSource, TaskTraceOutcome, TaskTraceSummary, TaskTranscriptMessage, TaskTurnError, TasksGetResult, TasksListResult, TrainingLogEntry, TrainingRunRow, TrainingRunStatus, UserAuthProvider, UserListItem, UserRecord, UsersCreateApiKeyResult, UsersListResult, UsersRevokeApiKeyResult, UsersSetRoleResult, V2AppSettings, V2BuildLogEntry, V2BuildStats, V2CommitInfo, V2EmailMessage, V2ReleaseStatus, VoiceAvailableNumber, VoiceNumbersBuyResult, VoiceNumbersListResult, VoiceNumbersReleaseResult, VoiceNumbersSearchResult, VoiceNumbersSetNameResult, VoicePhoneNumberStatus, VoicePhoneNumberView, VoiceResolvedPolicy, VoiceSessionChannel, VoiceSessionCost, VoiceSessionCostLine, VoiceSessionDetail, VoiceSessionGetResult, VoiceSessionListItem, VoiceSessionSip, VoiceSessionSpeechEntry, VoiceSessionStatus, VoiceSessionToolEntry, VoiceSessionTranscriptEntry, VoiceSessionsListResult, VoiceSettingsCeilings, VoiceSettingsGetResult, VoiceSettingsOverrides, VoiceSettingsSetResult, WorkspaceRegistrantContact };
9160
+ export type { AdminClient, AdminClientOptions, AdminContext, AgentThreadDetail, AgentThreadListItem, AgentThreadsGetResult, AgentThreadsListResult, AgentToolCall, AgentTranscriptMessage, AgentTurnError, AnalyticsAiHostRow, AnalyticsAiSourcesResult, AnalyticsAiVendorRow, AnalyticsBatchResult, AnalyticsCrawlersOverviewResult, AnalyticsCrawlersRecentResult, AnalyticsCrawlersRecentRow, AnalyticsCrawlersResult, AnalyticsCrawlersTimeseriesBucket, AnalyticsCrawlersTimeseriesResult, AnalyticsLiveResult, AnalyticsMapPoint, AnalyticsMapResult, AnalyticsMetric, AnalyticsQueryResult, AnalyticsQueryResultRow, AnalyticsSourceRow, AnalyticsSourcesResult, AppCronJobStatus, AppCronJobStatusReason, AppCronRunState, AppEmailSuppression, AppSecretRow, AppsListPage, AppsListResult, BoughtDomain, CrashGroup, CrashOccurrenceRow, CrashesGetResult, CrashesListResult, CrashesOccurrencesResult, CrashesStatsBucket, CrashesStatsResult, CronJobDecorated, CronOverviewResult, CronRunResult, CronRunSummary, DashboardLiveRelease, DashboardReleaseMethod, DashboardResult, DataLiftFromDevResult, DataLiftFromLiveResult, DataSourceConnector, DataSourceConnectorCredentials, DataSourceConnectorDeletions, DataSourceConnectorGetResult, DataSourceConnectorPolicy, DataSourceConnectorResult, DataSourceInspectReport, DataSourceInspectResult, DataSourceJob, DataSourceJobGetResult, DataSourceJobManifestTokenResult, DataSourceJobPlan, DataSourceJobResult, DataSourceJobSource, DataSourceJobState, DataSourceJobsListResult, DataSourceMapDeployResult, DataSourceMapTestDocument, DataSourceMapTestOutcome, DataSourceMapTestResult, DataSourceMapper, DataSourceObjectSelection, DataSourceQuarantineResult, DataSourceQuarantinedObject, DataSourceReader, DataSourceReaderDeliveries, DataSourceReaderRetryResult, DataSourceReaderStatusResult, DataSourceReaderTestDocument, DataSourceReaderTestResult, DataSourceRemapResult, DataSourceRereadResult, DataSourceSyncResult, DataSourcesBuildProgress, DataSourcesChunkingConfig, DataSourcesChunkingStrategy, DataSourcesConfigResult, DataSourcesConfigUpdateResult, DataSourcesCountResult, DataSourcesCreateResult, DataSourcesDeleteResult, DataSourcesDictionaryPushResult, DataSourcesDictionaryReport, DataSourcesDictionaryStatus, DataSourcesDocument, DataSourcesDocumentConfirmResult, DataSourcesDocumentDeleteManyResult, DataSourcesDocumentDeleteResult, DataSourcesDocumentSelector, DataSourcesDocumentStatus, DataSourcesDocumentsResult, DataSourcesDropResult, DataSourcesEntitiesResult, DataSourcesHydrateResult, DataSourcesHydration, DataSourcesIndex, DataSourcesIngestConfig, DataSourcesIngestUpdate, DataSourcesLinkResult, DataSourcesListEntry, DataSourcesListResult, DataSourcesMigration, DataSourcesMoveResult, DataSourcesPassage, DataSourcesPassagesResult, DataSourcesPlacement, DataSourcesPromoteResult, DataSourcesRelink, DataSourcesRetrievalConfig, DataSourcesRetrievalUpdate, DataSourcesRevectorizeResult, DataSourcesSampleResult, DataSourcesSearchCitation, DataSourcesSearchResult, DataSourcesSearchResultItem, DataSourcesUploadTokenResult, DatasetFile, DbHistoryResult, DbQueryResult, DiagnosticsAuditEnvironment, DiagnosticsDashboardResult, DiagnosticsFinding, DiagnosticsLighthouseScores, DiagnosticsPayload, DiagnosticsReleaseResult, DiagnosticsRuntimeFindings, DomainsCheckResult, DomainsCustomAddResult, DomainsCustomCheckResult, DomainsCustomHostnameUiStatus, DomainsCustomHostnameView, DomainsCustomListResult, DomainsCustomRemoveResult, DomainsCustomRetryResult, DomainsDnsInstructions, DomainsGetResult, DomainsSetResult, EmailBatchLifecycle, EmailBatchResult, EmailBatchSummary, EmailBatchesResult, EmailDomainBase, EmailEffectiveSender, EmailInboxResult, EmailListResult, EmailMessageKind, EmailMessageResult, EmailMessageStatus, EmailSenderTier, EmailSendingStatusResult, EmailStatsResult, EmailSummary, EmailSuppressResult, EmailSuppressionsResult, EmailUnsuppressResult, EvalAggregates, EvalCompareResult, EvalExpectation, EvalQueriesAddResult, EvalQueriesListResult, EvalQuery, EvalQueryResult, EvalQueryStyle, EvalRetrieval, EvalRun, EvalRunResult, EvalRunState, EvalRunsListResult, EvalSet, EvalSetGetResult, EvalSetResult, EvalSetState, EvalSetsListResult, EventChannelActivity, EventsChannelsListResult, EventsPublishResult, EventsTailFrame, FilesDeleteResult, FilesFileMeta, FilesListEntry, FilesListResult, FilesLsResult, FilesScanBadge, FilesScanFlagged, FilesScanStore, FilesStatResult, FilesStoreSummaryEntry, FilesUploadUrlResult, FilesUrlResult, FrontendErrorType, InboundDnsInstructions, InboundEmailDomainAddResult, InboundEmailDomainCheckResult, InboundEmailDomainDeleteResult, InboundEmailDomainUiStatus, InboundEmailDomainVerifyResult, InboundEmailDomainView, InboundEmailDomainsListResult, InboxEmailPreview, IssueAuthorKind, IssueCommentRow, IssueEventType, IssueRow, IssueStatus, IssuesCommentResult, IssuesCreateResult, IssuesDeleteResult, IssuesGetResult, IssuesListResult, IssuesUpdateResult, JewelPairRow, JewelPairSummaryRow, JewelVerdict, JewelsDatasetSummary, JewelsDryrunResult, JewelsExportResult, JewelsGradeResult, JewelsGrading, JewelsOverviewResult, JewelsPairResult, JewelsPairsResult, JewelsQueueResult, JewelsResolveResult, JewelsRunResult, JewelsRunsResult, JewelsTimeseriesBucket, JewelsTimeseriesResult, JewelsTrainResult, LiftedDatabase, MethodsInvokeResult, OperationProgress, OutboundDnsInstructions, OutboundDnsRecord, OutboundEmailDomainAddResult, OutboundEmailDomainCheckResult, OutboundEmailDomainDeleteResult, OutboundEmailDomainUiStatus, OutboundEmailDomainVerifyResult, OutboundEmailDomainView, OutboundEmailDomainsListResult, PlatformSuppression, PrerenderGetResult, PrerenderInvalidateResult, PrerenderPage, PrerenderPagesResult, PrerenderViewResult, PreviewShareLink, PreviewShareListResult, PreviewShareResult, PreviewShareRevokeResult, RegisteredDomainConnection, RegisteredDomainOffer, RegisteredDomainQuote, RegisteredDomainRecordType, RegisteredDomainRecords, RegisteredDomainStatus, RegisteredDomainView, RegisteredDomainZoneRecord, RegisteredDomainsBuyResult, RegisteredDomainsContactResult, RegisteredDomainsContactSetResult, RegisteredDomainsListResult, RegisteredDomainsQuoteResult, RegisteredDomainsRecordDeleteResult, RegisteredDomainsRecordResult, RegisteredDomainsSearchResult, RegisteredDomainsZoneResult, RegistrantContact, ReleaseFailureFields, ReleaseFragment, ReleasesByCommitResult, ReleasesGetResult, ReleasesListResult, RequestsGetResult, RequestsListResult, RequestsListRow, RequestsStatsMethodBucket, RequestsStatsMethodResult, RequestsStatsSummaryBucket, RequestsStatsSummaryResult, SecretsDeleteResult, SecretsGetResult, SecretsListResult, SecretsSetResult, SettingsResult, SuppressionSource, TaskTraceOutcome, TaskTraceSummary, TaskTranscriptMessage, TaskTurnError, TasksGetResult, TasksListResult, TrainingLogEntry, TrainingRunRow, TrainingRunStatus, UserAuthProvider, UserListItem, UserRecord, UsersCreateApiKeyResult, UsersListResult, UsersRevokeApiKeyResult, UsersSetRoleResult, V2AppSettings, V2BuildLogEntry, V2BuildStats, V2CommitInfo, V2EmailMessage, V2ReleaseStatus, VoiceAvailableNumber, VoiceNumbersBuyResult, VoiceNumbersListResult, VoiceNumbersReleaseResult, VoiceNumbersSearchResult, VoiceNumbersSetNameResult, VoicePhoneNumberStatus, VoicePhoneNumberView, VoiceResolvedPolicy, VoiceSessionChannel, VoiceSessionCost, VoiceSessionCostLine, VoiceSessionDetail, VoiceSessionGetResult, VoiceSessionListItem, VoiceSessionSip, VoiceSessionSpeechEntry, VoiceSessionStatus, VoiceSessionToolEntry, VoiceSessionTranscriptEntry, VoiceSessionsListResult, VoiceSettingsCeilings, VoiceSettingsGetResult, VoiceSettingsOverrides, VoiceSettingsSetResult, WorkspaceApp, WorkspaceRegistrantContact };
package/dist/index.js CHANGED
@@ -281,6 +281,42 @@ function crawlers(ctx, params) {
281
281
  );
282
282
  }
283
283
 
284
+ // src/ops/apps.ts
285
+ var apps_exports = {};
286
+ __export(apps_exports, {
287
+ list: () => list2
288
+ });
289
+ var PAGE_SIZE = 500;
290
+ async function list2(ctx, params = {}) {
291
+ const words = (params.search ?? "").toLowerCase().split(/\s+/).filter(Boolean);
292
+ const apps = [];
293
+ let cursor;
294
+ while (true) {
295
+ const page = await call(
296
+ ctx,
297
+ "GET",
298
+ `/_internal/v2/apps${qs({ status: params.status, limit: PAGE_SIZE, cursor })}`
299
+ );
300
+ for (const app of page.apps) {
301
+ const text = `${app.name} ${app.customSubdomain ?? ""}`.toLowerCase();
302
+ if (words.every((word) => text.includes(word))) {
303
+ apps.push({
304
+ appId: app.appId,
305
+ name: app.name,
306
+ subdomain: app.customSubdomain,
307
+ isPublished: app.isPublished,
308
+ lastDeployedAt: app.lastDeployedAt,
309
+ createdBy: app.createdBy.name
310
+ });
311
+ }
312
+ }
313
+ if (!page.nextCursor) {
314
+ return { apps };
315
+ }
316
+ cursor = page.nextCursor;
317
+ }
318
+ }
319
+
284
320
  // src/ops/events.ts
285
321
  var events_exports = {};
286
322
  __export(events_exports, {
@@ -307,11 +343,11 @@ function publish(ctx, params) {
307
343
  var crashes_exports = {};
308
344
  __export(crashes_exports, {
309
345
  get: () => get2,
310
- list: () => list2,
346
+ list: () => list3,
311
347
  occurrences: () => occurrences,
312
348
  stats: () => stats
313
349
  });
314
- function list2(ctx, params = {}) {
350
+ function list3(ctx, params = {}) {
315
351
  return call(
316
352
  ctx,
317
353
  "GET",
@@ -343,10 +379,10 @@ function stats(ctx, params = {}) {
343
379
  // src/ops/cron.ts
344
380
  var cron_exports = {};
345
381
  __export(cron_exports, {
346
- list: () => list3,
382
+ list: () => list4,
347
383
  run: () => run
348
384
  });
349
- function list3(ctx, params = {}) {
385
+ function list4(ctx, params = {}) {
350
386
  return call(
351
387
  ctx,
352
388
  "GET",
@@ -423,7 +459,7 @@ __export(dataSources_exports, {
423
459
  drop: () => drop,
424
460
  entities: () => entities,
425
461
  link: () => link,
426
- list: () => list4,
462
+ list: () => list5,
427
463
  move: () => move,
428
464
  passages: () => passages,
429
465
  promote: () => promote,
@@ -666,7 +702,7 @@ async function waitForCandidate(ctx, params) {
666
702
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
667
703
  const outcome = await pollUntil(
668
704
  async () => {
669
- const { dataSources } = await list4(ctx);
705
+ const { dataSources } = await list5(ctx);
670
706
  const source = dataSources.find((s) => s.slug === params.slug);
671
707
  if (!source) {
672
708
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -748,7 +784,7 @@ async function allDocuments(ctx, params) {
748
784
  }
749
785
  return out;
750
786
  }
751
- function list4(ctx) {
787
+ function list5(ctx) {
752
788
  return call(ctx, "GET", base(ctx.appId));
753
789
  }
754
790
  function search(ctx, params) {
@@ -867,7 +903,7 @@ async function waitForMove(ctx, params) {
867
903
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
868
904
  const outcome = await pollUntil(
869
905
  async () => {
870
- const { dataSources } = await list4(ctx);
906
+ const { dataSources } = await list5(ctx);
871
907
  const source2 = dataSources.find((s) => s.slug === params.slug);
872
908
  if (!source2) {
873
909
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -1048,7 +1084,7 @@ __export(dataSourceJobs_exports, {
1048
1084
  cancel: () => cancel,
1049
1085
  describeProgress: () => describeProgress,
1050
1086
  get: () => get3,
1051
- list: () => list5,
1087
+ list: () => list6,
1052
1088
  pause: () => pause,
1053
1089
  resume: () => resume,
1054
1090
  retry: () => retry,
@@ -1084,7 +1120,7 @@ async function uploadManifest(ctx, params) {
1084
1120
  await uploadDirect(token.upload, params.content, "manifest.jsonl");
1085
1121
  return { key: token.key };
1086
1122
  }
1087
- function list5(ctx, params) {
1123
+ function list6(ctx, params) {
1088
1124
  return call(
1089
1125
  ctx,
1090
1126
  "GET",
@@ -1322,7 +1358,7 @@ async function waitForHydration(ctx, params) {
1322
1358
  const timeoutMs = params.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS3;
1323
1359
  const outcome = await pollUntil(
1324
1360
  async () => {
1325
- const { dataSources } = await list4(ctx);
1361
+ const { dataSources } = await list5(ctx);
1326
1362
  const source2 = dataSources.find((s) => s.slug === params.slug);
1327
1363
  if (!source2) {
1328
1364
  throw new Error(`Data source "${params.slug}" not found.`);
@@ -1665,11 +1701,11 @@ __export(releases_exports, {
1665
1701
  byCommit: () => byCommit,
1666
1702
  dashboardLive: () => dashboardLive,
1667
1703
  get: () => get5,
1668
- list: () => list6,
1704
+ list: () => list7,
1669
1705
  primaryUrl: () => primaryUrl,
1670
1706
  waitForCommit: () => waitForCommit
1671
1707
  });
1672
- function list6(ctx, params = {}) {
1708
+ function list7(ctx, params = {}) {
1673
1709
  return call(
1674
1710
  ctx,
1675
1711
  "GET",
@@ -1696,7 +1732,7 @@ async function dashboardLive(ctx) {
1696
1732
  "GET",
1697
1733
  `/_internal/v2/apps/${ctx.appId}/dashboard`
1698
1734
  );
1699
- return dashboard.liveRelease;
1735
+ return dashboard.liveRelease ? { ...dashboard.liveRelease, primaryUrl: dashboard.primaryUrl } : null;
1700
1736
  }
1701
1737
  async function primaryUrl(ctx) {
1702
1738
  const dashboard = await call(
@@ -1714,7 +1750,8 @@ function summarizeRelease(release) {
1714
1750
  status: release.status,
1715
1751
  buildDurationMs: release.buildDurationMs ?? null,
1716
1752
  publishedAt: release.publishedAt ?? null,
1717
- ...release.previewUrl ? { previewUrl: release.previewUrl } : {}
1753
+ ...release.previewUrl ? { previewUrl: release.previewUrl } : {},
1754
+ ...release.primaryUrl ? { primaryUrl: release.primaryUrl } : {}
1718
1755
  };
1719
1756
  const readers = (release.dataSources ?? []).filter((d) => d.reader);
1720
1757
  if (readers.length > 0 && release.status === "live") {
@@ -2020,7 +2057,7 @@ __export(email_exports, {
2020
2057
  checkDomain: () => checkDomain,
2021
2058
  get: () => get7,
2022
2059
  inbox: () => inbox,
2023
- list: () => list7,
2060
+ list: () => list8,
2024
2061
  listDomains: () => listDomains,
2025
2062
  removeDomain: () => removeDomain,
2026
2063
  stats: () => stats2,
@@ -2055,7 +2092,7 @@ async function resolveDomainId(ctx, direction, domain) {
2055
2092
  }
2056
2093
  return match.id;
2057
2094
  }
2058
- function list7(ctx, params = {}) {
2095
+ function list8(ctx, params = {}) {
2059
2096
  return call(
2060
2097
  ctx,
2061
2098
  "GET",
@@ -2256,7 +2293,7 @@ __export(infra_exports, {
2256
2293
  destroy: () => destroy,
2257
2294
  get: () => get8,
2258
2295
  hibernate: () => hibernate,
2259
- list: () => list8,
2296
+ list: () => list9,
2260
2297
  logs: () => logs,
2261
2298
  provision: () => provision,
2262
2299
  rename: () => rename,
@@ -2269,7 +2306,7 @@ var POLL_MS5 = 3e3;
2269
2306
  function base6(appId) {
2270
2307
  return `/_internal/v2/apps/${appId}/infra`;
2271
2308
  }
2272
- function list8(ctx, params) {
2309
+ function list9(ctx, params) {
2273
2310
  return call(
2274
2311
  ctx,
2275
2312
  "GET",
@@ -2390,7 +2427,7 @@ __export(issues_exports, {
2390
2427
  edit: () => edit,
2391
2428
  filed: () => filed,
2392
2429
  get: () => get9,
2393
- list: () => list9,
2430
+ list: () => list10,
2394
2431
  reopen: () => reopen
2395
2432
  });
2396
2433
  function authorship(ctx) {
@@ -2405,7 +2442,7 @@ function listQuery(params) {
2405
2442
  cursor: params.cursor
2406
2443
  });
2407
2444
  }
2408
- function list9(ctx, params = {}) {
2445
+ function list10(ctx, params = {}) {
2409
2446
  return call(
2410
2447
  ctx,
2411
2448
  "GET",
@@ -2637,10 +2674,10 @@ var methods_exports = {};
2637
2674
  __export(methods_exports, {
2638
2675
  METHOD_RUN_TIMEOUT_MS: () => METHOD_RUN_TIMEOUT_MS,
2639
2676
  invoke: () => invoke,
2640
- list: () => list10
2677
+ list: () => list11
2641
2678
  });
2642
2679
  var METHOD_RUN_TIMEOUT_MS = 6e5;
2643
- async function list10(ctx) {
2680
+ async function list11(ctx) {
2644
2681
  const dashboard = await call(
2645
2682
  ctx,
2646
2683
  "GET",
@@ -2703,7 +2740,7 @@ function invalidate(ctx, params = {}) {
2703
2740
  // src/ops/previews.ts
2704
2741
  var previews_exports = {};
2705
2742
  __export(previews_exports, {
2706
- list: () => list11,
2743
+ list: () => list12,
2707
2744
  revoke: () => revoke,
2708
2745
  share: () => share
2709
2746
  });
@@ -2715,7 +2752,7 @@ function share(ctx, params) {
2715
2752
  { branch: params.branch, days: params.days, label: params.label }
2716
2753
  );
2717
2754
  }
2718
- function list11(ctx, branch) {
2755
+ function list12(ctx, branch) {
2719
2756
  return call(
2720
2757
  ctx,
2721
2758
  "GET",
@@ -2891,11 +2928,11 @@ async function exportVideo(_ctx, params) {
2891
2928
  var requests_exports = {};
2892
2929
  __export(requests_exports, {
2893
2930
  get: () => get10,
2894
- list: () => list12,
2931
+ list: () => list13,
2895
2932
  statsForMethod: () => statsForMethod,
2896
2933
  statsSummary: () => statsSummary
2897
2934
  });
2898
- function list12(ctx, params = {}) {
2935
+ function list13(ctx, params = {}) {
2899
2936
  return call(
2900
2937
  ctx,
2901
2938
  "GET",
@@ -2929,10 +2966,10 @@ var secrets_exports = {};
2929
2966
  __export(secrets_exports, {
2930
2967
  del: () => del2,
2931
2968
  get: () => get11,
2932
- list: () => list13,
2969
+ list: () => list14,
2933
2970
  set: () => set2
2934
2971
  });
2935
- function list13(ctx) {
2972
+ function list14(ctx) {
2936
2973
  return call(
2937
2974
  ctx,
2938
2975
  "GET",
@@ -2995,11 +3032,11 @@ function updateSettings(ctx, partial) {
2995
3032
  var users_exports = {};
2996
3033
  __export(users_exports, {
2997
3034
  createApiKey: () => createApiKey,
2998
- list: () => list14,
3035
+ list: () => list15,
2999
3036
  revokeApiKey: () => revokeApiKey,
3000
3037
  setRole: () => setRole
3001
3038
  });
3002
- function list14(ctx, params = {}) {
3039
+ function list15(ctx, params = {}) {
3003
3040
  return call(
3004
3041
  ctx,
3005
3042
  "GET",
@@ -3192,6 +3229,7 @@ function buildClient(ctx) {
3192
3229
  agent: bindOps(agent_exports, ctx),
3193
3230
  tasks: bindOps(tasks_exports, ctx),
3194
3231
  analytics: bindOps(analytics_exports, ctx),
3232
+ apps: bindOps(apps_exports, ctx),
3195
3233
  events: bindOps(events_exports, ctx),
3196
3234
  crashes: bindOps(crashes_exports, ctx),
3197
3235
  cron: bindOps(cron_exports, ctx),