@sylphx/sdk 0.32.2 → 0.32.5

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.
@@ -40,6 +40,22 @@ export interface CreateSourceMapRequest {
40
40
  /** The source map to upload. */
41
41
  sourceMap: SourceMap;
42
42
  }
43
+ /** Creates a check; Idempotency-Key replays the same lifecycle. */
44
+ export interface CreateUptimeCheckRequest {
45
+ /** The authorized environment. */
46
+ parent: string;
47
+ /** Safe observation policy. */
48
+ uptimeCheck: UptimeCheck;
49
+ /** Unique DNS label, 1 through 63 characters. */
50
+ uptimeCheckId: string;
51
+ }
52
+ /** Tombstones a lifecycle; a recreated name receives a fresh uid. */
53
+ export interface DeleteUptimeCheckRequest {
54
+ /** Exact resource name. */
55
+ name: string;
56
+ /** Current resource etag. */
57
+ etag?: string;
58
+ }
43
59
  /**
44
60
  * An Error Event is one immutable error occurrence, with breadcrumbs and
45
61
  * correlation.
@@ -237,6 +253,18 @@ export interface GetTraceRequest {
237
253
  /** The name of the trace to get. */
238
254
  name: string;
239
255
  }
256
+ /** Reads one check with durable samples and coverage. */
257
+ export interface GetUptimeCheckRequest {
258
+ /** Exact check name. */
259
+ name: string;
260
+ /** Continue the latest target population from status.next_target_page_token. */
261
+ targetPageToken?: string;
262
+ }
263
+ /** Reads the durable source subscription, independent of the current check set. */
264
+ export interface GetUptimeSourceRequest {
265
+ /** The singleton `uptime_sources/manifest` in an authorized environment. */
266
+ name: string;
267
+ }
240
268
  /** The request of ListErrorEvents. */
241
269
  export interface ListErrorEventsRequest {
242
270
  /** The parent to list in. */
@@ -315,6 +343,22 @@ export interface ListSourceMapsResponse {
315
343
  /** The token of the next page; empty on the last. */
316
344
  nextPageToken?: string;
317
345
  }
346
+ /** Lists one environment, ordered by check id. */
347
+ export interface ListUptimeChecksRequest {
348
+ /** The authorized environment. */
349
+ parent: string;
350
+ /** At most 100 checks per page. */
351
+ pageSize?: number;
352
+ /** Opaque continuation from this exact parent. */
353
+ pageToken?: string;
354
+ }
355
+ /** One page; callers follow next_page_token to read the full population. */
356
+ export interface ListUptimeChecksResponse {
357
+ /** Checks in this page. */
358
+ uptimeChecks?: UptimeCheck[];
359
+ /** Empty on the last page. */
360
+ nextPageToken?: string;
361
+ }
318
362
  /**
319
363
  * A Log Entry is one typed, bounded log record of a project environment,
320
364
  * correlated to a trace. Entries are immutable; ingest is idempotent per
@@ -539,6 +583,193 @@ export interface UpdateScrubbingPolicyRequest {
539
583
  /** The fields to write; unset writes every populated field. */
540
584
  updateMask?: string;
541
585
  }
586
+ /**
587
+ * Changes policy or pauses/resumes a check. The supplied meta.etag fences
588
+ * concurrent updates. A new generation invalidates every outstanding claim.
589
+ */
590
+ export interface UpdateUptimeCheckRequest {
591
+ /** Exact resource name, etag and writable policy. */
592
+ uptimeCheck: UptimeCheck;
593
+ /** Writable spec fields; omitted replaces the complete spec. */
594
+ updateMask?: string;
595
+ }
596
+ /** Sets the subscription's delegation and pause policy; replaces the whole spec. */
597
+ export interface UpdateUptimeSourceRequest {
598
+ /** Subscription with an etag from Get, or empty on initial setup. */
599
+ uptimeSource: UptimeSource;
600
+ /** Only `spec` is supported; omission also replaces the whole spec. */
601
+ updateMask?: string;
602
+ }
603
+ /**
604
+ * An UptimeCheck observes safe transport behavior or the public revision of
605
+ * every authorized bound host/path. Workflows owns its durable clock.
606
+ */
607
+ export interface UptimeCheck {
608
+ /** The tenant-scoped check name. */
609
+ name?: string;
610
+ /** A new immutable identity on every creation, including name reuse. */
611
+ readonly uid?: string;
612
+ /** Resource metadata, generation and etag. */
613
+ meta?: common.ResourceMeta;
614
+ /** Safe desired observation policy. */
615
+ spec?: UptimeCheckSpec;
616
+ /** Durable evidence, including missing coverage. */
617
+ readonly status?: UptimeCheckStatus;
618
+ }
619
+ /**
620
+ * Exactly one target is required. Private targets name a service in this
621
+ * environment; a ready observation never invokes or wakes that service.
622
+ */
623
+ export interface UptimeCheckSpec {
624
+ /** HTTPS public URL, without credentials, query, fragment or redirects. */
625
+ publicUri?: string;
626
+ /** Same-environment Hosting Service resource name. */
627
+ service?: string;
628
+ /**
629
+ * True enumerates every authorized bound public Host/path and compares
630
+ * independent public response identity with the selected serving Release.
631
+ */
632
+ boundPublicRevisions?: boolean;
633
+ /** HTTP, READY or JOURNEY. JOURNEY is valid only for a Job target. */
634
+ instrument?: string;
635
+ /** GET or HEAD; defaults to HEAD. No headers, credentials or request body. */
636
+ method?: string;
637
+ /** Private HTTP path; defaults to /healthz. Not used by READY. */
638
+ path?: string;
639
+ /** 30, 60, 300 or 900 seconds; defaults to 60 seconds. */
640
+ interval?: string;
641
+ /**
642
+ * HTTP: 1, 2, 5 or 10 seconds. Journey: 10 through 900 seconds, including
643
+ * admission and execution. Defaults to 10 seconds.
644
+ */
645
+ timeout?: string;
646
+ /**
647
+ * Transport successes; defaults to 200 through 299. Denial and rate limits
648
+ * always remain unknown, even when included here.
649
+ */
650
+ expectStatus?: number[];
651
+ /** Bounded literal substring, only with GET. */
652
+ expectBody?: string;
653
+ /** Consecutive known failures before a transport alert; defaults to two. */
654
+ failuresBeforeAlert?: number;
655
+ /** Paused checks dispatch nothing and accrue no expected slots. */
656
+ paused?: boolean;
657
+ /** ticket or page; defaults to ticket. */
658
+ severity?: string;
659
+ /**
660
+ * Existing email: or registered webhook: targets. Events owns signing,
661
+ * delivery and replay. No unregistered callback is silently considered sent.
662
+ */
663
+ notify?: string[];
664
+ /**
665
+ * Access delegation naming Observability's workload principal, confined to
666
+ * this environment and the needed read/invoke permissions. Every dispatch
667
+ * exchanges it afresh; expiration or revocation prevents outbound work.
668
+ */
669
+ executionDelegation?: string;
670
+ /**
671
+ * Same-environment Workflows Job containing a versioned journey bundle.
672
+ * It runs once per slot with no retries; it is not an HTTP request body.
673
+ */
674
+ job?: string;
675
+ }
676
+ /**
677
+ * The durable check projection. Missing, denied and unknown evidence never
678
+ * becomes success; unknown does not resolve an open episode.
679
+ */
680
+ export interface UptimeCheckStatus {
681
+ /** Last reconciled generation. */
682
+ readonly observedGeneration?: string;
683
+ /** Ready, Reconciling, Stalled. */
684
+ readonly conditions?: common.Condition[];
685
+ /** Time of the last committed observation, absent before the first sample. */
686
+ readonly lastSampleTime?: string;
687
+ /** up, down, match, mismatch or unknown. */
688
+ readonly lastResult?: string;
689
+ /** Whether any target has an open firing episode. */
690
+ readonly firing?: boolean;
691
+ /** Exactly the 24-hour, 7-day and 30-day windows. */
692
+ readonly coverage?: UptimeCoverage[];
693
+ /** Latest target population page (up to 100), including unknown targets. */
694
+ readonly targets?: UptimeTargetStatus[];
695
+ /** Continue with GetUptimeCheck.target_page_token; aggregates cover all targets. */
696
+ readonly nextTargetPageToken?: string;
697
+ }
698
+ /** Coverage counts due slots over persisted active lifetimes across updates. */
699
+ export interface UptimeCoverage {
700
+ /** 86400, 604800 or 2592000 seconds. */
701
+ readonly windowSeconds?: string;
702
+ /** Due observations, including missing slots. */
703
+ readonly expected?: string;
704
+ /** Known successful observations. */
705
+ readonly succeeded?: string;
706
+ /** Known failed observations. */
707
+ readonly failed?: string;
708
+ /** Received but inconclusive observations. */
709
+ readonly unknown?: string;
710
+ /** Due observations with no sample. */
711
+ readonly missing?: string;
712
+ }
713
+ /** Persistent subscription to the environment's complete source-controlled checks. */
714
+ export interface UptimeSource {
715
+ /** Only `uptime_sources/manifest` is supported. */
716
+ name?: string;
717
+ /** Never reused; ownership receipts survive an empty source set. */
718
+ readonly uid?: string;
719
+ /** Lifecycle-bound etag and generation. */
720
+ meta?: common.ResourceMeta;
721
+ /** Delegated source reconciliation policy. */
722
+ spec?: UptimeSourceSpec;
723
+ /** Last applied source and visible reconciliation outcome. */
724
+ readonly status?: UptimeSourceStatus;
725
+ }
726
+ /** A tenant human grants the Observability workload the required Access scopes. */
727
+ export interface UptimeSourceSpec {
728
+ /** Exact Access delegation reference; credentials never enter this resource. */
729
+ executionDelegation?: string;
730
+ /** Stops source reconciliation; existing checks keep their own pause policy. */
731
+ paused?: boolean;
732
+ }
733
+ /** A source read failure never means a valid empty declaration set. */
734
+ export interface UptimeSourceStatus {
735
+ /** Subscription generation last fully converged. */
736
+ readonly observedGeneration?: string;
737
+ /** Reconciling or Ready, independently of probe health. */
738
+ readonly conditions?: common.Condition[];
739
+ /** Last fully converged source identity. */
740
+ readonly sourceUid?: string;
741
+ /** Opaque owner-provided revision of the complete desired set. */
742
+ readonly appliedRevision?: string;
743
+ /** Finite error code, empty after successful convergence. */
744
+ readonly reason?: string;
745
+ /** Latest completed reconciliation attempt. */
746
+ readonly lastAttemptTime?: string;
747
+ /** Stable attested Observability workload principal to name as delegate. */
748
+ readonly delegatePrincipal?: string;
749
+ }
750
+ /** Latest independent public evidence for one exact bound Host/path. */
751
+ export interface UptimeTargetStatus {
752
+ /** Stable target identity within this check lifecycle. */
753
+ readonly target?: string;
754
+ /** Exact public URL or same-environment service name. */
755
+ readonly uri?: string;
756
+ /** Current selected serving Release, never desired or merely latest source. */
757
+ readonly expectedRelease?: string;
758
+ /** Admitted positive-weight source population, empty when unknown. */
759
+ readonly expectedSourceShas?: string[];
760
+ /** Exactly one validated response header, empty when unknown. */
761
+ readonly observedSourceSha?: string;
762
+ /** up, down, match, mismatch or unknown. */
763
+ readonly result?: string;
764
+ /** Why evidence is unknown or failed, without losing the distinction. */
765
+ readonly reason?: string;
766
+ /** Actual observation time. */
767
+ readonly sampleTime?: string;
768
+ /** Open episode latch; only proven equality or transport success resolves. */
769
+ readonly firing?: boolean;
770
+ /** Existing Events carrier receipts; receiver delivery is read from Events. */
771
+ readonly eventsDeliveries?: string[];
772
+ }
542
773
  /** The request of WriteLogEntries. */
543
774
  export interface WriteLogEntriesRequest {
544
775
  /** The parent the method acts in. */
@@ -580,6 +811,10 @@ export type SpanKind = 'internal' | 'server' | 'client' | 'producer' | 'consumer
580
811
  * Namespace of Sylphx Observability on `Sylphx`.
581
812
  */
582
813
  export declare class ObservabilityApi {
814
+ /** The `uptime_sources` collection. */
815
+ readonly uptimeSources: UptimeSourcesCollection;
816
+ /** The `uptime_checks` collection. */
817
+ readonly uptimeChecks: UptimeChecksCollection;
583
818
  /** The `log_entries` collection. */
584
819
  readonly logEntries: LogEntriesCollection;
585
820
  /** The `traces` collection. */
@@ -596,6 +831,74 @@ export declare class ObservabilityApi {
596
831
  readonly scrubbingPolicies: ScrubbingPoliciesCollection;
597
832
  constructor(client: runtime.Client);
598
833
  }
834
+ /** `uptime_sources` of Sylphx Observability: Resource type `observability.sylphx.com/UptimeSource`. */
835
+ export declare class UptimeSourcesCollection {
836
+ private readonly client;
837
+ constructor(client: runtime.Client);
838
+ /**
839
+ * Gets the environment's manifest subscription (`uptime_sources/manifest`).
840
+ *
841
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_sources/*}` · permission `observability:read` · effect `read`
842
+ *
843
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
844
+ */
845
+ get(request: GetUptimeSourceRequest): Promise<UptimeSource>;
846
+ /**
847
+ * Configures manifest reconciliation; absent subscriptions require an empty etag.
848
+ *
849
+ * `PATCH /v1/{uptime_source.name=orgs/*\/projects/*\/envs/*\/uptime_sources/*}` · permission `observability:write` · effect `write`
850
+ *
851
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`.
852
+ */
853
+ update(request: UpdateUptimeSourceRequest): Promise<UptimeSource>;
854
+ }
855
+ /** `uptime_checks` of Sylphx Observability: Resource type `observability.sylphx.com/UptimeCheck`. */
856
+ export declare class UptimeChecksCollection {
857
+ private readonly client;
858
+ constructor(client: runtime.Client);
859
+ /**
860
+ * Creates one tenant uptime check.
861
+ *
862
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/uptime_checks` · permission `observability:write` · effect `write`
863
+ *
864
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
865
+ */
866
+ create(request: CreateUptimeCheckRequest): Promise<UptimeCheck>;
867
+ /**
868
+ * Gets one tenant uptime check.
869
+ *
870
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:read` · effect `read`
871
+ *
872
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
873
+ */
874
+ get(request: GetUptimeCheckRequest): Promise<UptimeCheck>;
875
+ /**
876
+ * Lists checks and aggregate status. GetUptimeCheck reads target pages.
877
+ *
878
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/uptime_checks` · permission `observability:read` · effect `read`
879
+ *
880
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
881
+ */
882
+ list(request: ListUptimeChecksRequest): Promise<ListUptimeChecksResponse>;
883
+ /** Every item of every page of `list`. */
884
+ listAll(request: ListUptimeChecksRequest): AsyncGenerator<UptimeCheck>;
885
+ /**
886
+ * Updates one tenant uptime check.
887
+ *
888
+ * `PATCH /v1/{uptime_check.name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:write` · effect `write`
889
+ *
890
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
891
+ */
892
+ update(request: UpdateUptimeCheckRequest): Promise<UptimeCheck>;
893
+ /**
894
+ * Deletes one tenant uptime check.
895
+ *
896
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:write` · effect `destructive`
897
+ *
898
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
899
+ */
900
+ delete(request: DeleteUptimeCheckRequest): Promise<Record<string, never>>;
901
+ }
599
902
  /** `log_entries` of Sylphx Observability: Resource type `observability.sylphx.com/LogEntry`. */
600
903
  export declare class LogEntriesCollection {
601
904
  private readonly client;
@@ -17,6 +17,11 @@ runtime.registerSchemas({
17
17
  'sylphx.observability.v1.CreateSourceMapRequest': [
18
18
  ['sourceMap', 'source_map', 'sylphx.observability.v1.SourceMap'],
19
19
  ],
20
+ 'sylphx.observability.v1.CreateUptimeCheckRequest': [
21
+ ['uptimeCheck', 'uptime_check', 'sylphx.observability.v1.UptimeCheck'],
22
+ ['uptimeCheckId', 'uptime_check_id'],
23
+ ],
24
+ 'sylphx.observability.v1.DeleteUptimeCheckRequest': [],
20
25
  'sylphx.observability.v1.ErrorEvent': [
21
26
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
22
27
  ['eventTime', 'event_time'],
@@ -67,6 +72,10 @@ runtime.registerSchemas({
67
72
  'sylphx.observability.v1.GetScrubbingPolicyRequest': [],
68
73
  'sylphx.observability.v1.GetSourceMapRequest': [],
69
74
  'sylphx.observability.v1.GetTraceRequest': [],
75
+ 'sylphx.observability.v1.GetUptimeCheckRequest': [
76
+ ['targetPageToken', 'target_page_token'],
77
+ ],
78
+ 'sylphx.observability.v1.GetUptimeSourceRequest': [],
70
79
  'sylphx.observability.v1.ListErrorEventsRequest': [
71
80
  ['pageSize', 'page_size'],
72
81
  ['pageToken', 'page_token'],
@@ -102,6 +111,14 @@ runtime.registerSchemas({
102
111
  ['sourceMaps', 'source_maps', 'sylphx.observability.v1.SourceMap'],
103
112
  ['nextPageToken', 'next_page_token'],
104
113
  ],
114
+ 'sylphx.observability.v1.ListUptimeChecksRequest': [
115
+ ['pageSize', 'page_size'],
116
+ ['pageToken', 'page_token'],
117
+ ],
118
+ 'sylphx.observability.v1.ListUptimeChecksResponse': [
119
+ ['uptimeChecks', 'uptime_checks', 'sylphx.observability.v1.UptimeCheck'],
120
+ ['nextPageToken', 'next_page_token'],
121
+ ],
105
122
  'sylphx.observability.v1.LogEntry': [
106
123
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
107
124
  ['logTime', 'log_time'],
@@ -176,6 +193,62 @@ runtime.registerSchemas({
176
193
  ['scrubbingPolicy', 'scrubbing_policy', 'sylphx.observability.v1.ScrubbingPolicy'],
177
194
  ['updateMask', 'update_mask'],
178
195
  ],
196
+ 'sylphx.observability.v1.UpdateUptimeCheckRequest': [
197
+ ['uptimeCheck', 'uptime_check', 'sylphx.observability.v1.UptimeCheck'],
198
+ ['updateMask', 'update_mask'],
199
+ ],
200
+ 'sylphx.observability.v1.UpdateUptimeSourceRequest': [
201
+ ['uptimeSource', 'uptime_source', 'sylphx.observability.v1.UptimeSource'],
202
+ ['updateMask', 'update_mask'],
203
+ ],
204
+ 'sylphx.observability.v1.UptimeCheck': [
205
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
206
+ ['spec', 'spec', 'sylphx.observability.v1.UptimeCheckSpec'],
207
+ ['status', 'status', 'sylphx.observability.v1.UptimeCheckStatus'],
208
+ ],
209
+ 'sylphx.observability.v1.UptimeCheckSpec': [
210
+ ['publicUri', 'public_uri'],
211
+ ['boundPublicRevisions', 'bound_public_revisions'],
212
+ ['expectStatus', 'expect_status'],
213
+ ['expectBody', 'expect_body'],
214
+ ['failuresBeforeAlert', 'failures_before_alert'],
215
+ ['executionDelegation', 'execution_delegation'],
216
+ ],
217
+ 'sylphx.observability.v1.UptimeCheckStatus': [
218
+ ['observedGeneration', 'observed_generation'],
219
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
220
+ ['lastSampleTime', 'last_sample_time'],
221
+ ['lastResult', 'last_result'],
222
+ ['coverage', 'coverage', 'sylphx.observability.v1.UptimeCoverage'],
223
+ ['targets', 'targets', 'sylphx.observability.v1.UptimeTargetStatus'],
224
+ ['nextTargetPageToken', 'next_target_page_token'],
225
+ ],
226
+ 'sylphx.observability.v1.UptimeCoverage': [
227
+ ['windowSeconds', 'window_seconds'],
228
+ ],
229
+ 'sylphx.observability.v1.UptimeSource': [
230
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
231
+ ['spec', 'spec', 'sylphx.observability.v1.UptimeSourceSpec'],
232
+ ['status', 'status', 'sylphx.observability.v1.UptimeSourceStatus'],
233
+ ],
234
+ 'sylphx.observability.v1.UptimeSourceSpec': [
235
+ ['executionDelegation', 'execution_delegation'],
236
+ ],
237
+ 'sylphx.observability.v1.UptimeSourceStatus': [
238
+ ['observedGeneration', 'observed_generation'],
239
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
240
+ ['sourceUid', 'source_uid'],
241
+ ['appliedRevision', 'applied_revision'],
242
+ ['lastAttemptTime', 'last_attempt_time'],
243
+ ['delegatePrincipal', 'delegate_principal'],
244
+ ],
245
+ 'sylphx.observability.v1.UptimeTargetStatus': [
246
+ ['expectedRelease', 'expected_release'],
247
+ ['expectedSourceShas', 'expected_source_shas'],
248
+ ['observedSourceSha', 'observed_source_sha'],
249
+ ['sampleTime', 'sample_time'],
250
+ ['eventsDeliveries', 'events_deliveries'],
251
+ ],
179
252
  'sylphx.observability.v1.WriteLogEntriesRequest': [
180
253
  ['logEntries', 'log_entries', 'sylphx.observability.v1.LogEntry'],
181
254
  ],
@@ -198,6 +271,10 @@ runtime.registerSchemas({
198
271
  * Namespace of Sylphx Observability on `Sylphx`.
199
272
  */
200
273
  export class ObservabilityApi {
274
+ /** The `uptime_sources` collection. */
275
+ uptimeSources;
276
+ /** The `uptime_checks` collection. */
277
+ uptimeChecks;
201
278
  /** The `log_entries` collection. */
202
279
  logEntries;
203
280
  /** The `traces` collection. */
@@ -213,6 +290,8 @@ export class ObservabilityApi {
213
290
  /** The `scrubbing_policies` collection. */
214
291
  scrubbingPolicies;
215
292
  constructor(client) {
293
+ this.uptimeSources = new UptimeSourcesCollection(client);
294
+ this.uptimeChecks = new UptimeChecksCollection(client);
216
295
  this.logEntries = new LogEntriesCollection(client);
217
296
  this.traces = new TracesCollection(client);
218
297
  this.generations = new GenerationsCollection(client);
@@ -222,6 +301,147 @@ export class ObservabilityApi {
222
301
  this.scrubbingPolicies = new ScrubbingPoliciesCollection(client);
223
302
  }
224
303
  }
304
+ /** `uptime_sources` of Sylphx Observability: Resource type `observability.sylphx.com/UptimeSource`. */
305
+ export class UptimeSourcesCollection {
306
+ client;
307
+ constructor(client) {
308
+ this.client = client;
309
+ }
310
+ /**
311
+ * Gets the environment's manifest subscription (`uptime_sources/manifest`).
312
+ *
313
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_sources/*}` · permission `observability:read` · effect `read`
314
+ *
315
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
316
+ */
317
+ async get(request) {
318
+ return this.client.call({
319
+ method: 'GET',
320
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/uptime_sources/*', 'name')}`,
321
+ responseType: 'sylphx.observability.v1.UptimeSource',
322
+ mutation: false,
323
+ });
324
+ }
325
+ /**
326
+ * Configures manifest reconciliation; absent subscriptions require an empty etag.
327
+ *
328
+ * `PATCH /v1/{uptime_source.name=orgs/*\/projects/*\/envs/*\/uptime_sources/*}` · permission `observability:write` · effect `write`
329
+ *
330
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`.
331
+ */
332
+ async update(request) {
333
+ return this.client.call({
334
+ method: 'PATCH',
335
+ path: `/v1/${runtime.pathParam(request.uptimeSource?.name, 'orgs/*/projects/*/envs/*/uptime_sources/*', 'uptime_source.name')}`,
336
+ query: { update_mask: request.updateMask },
337
+ body: request.uptimeSource ?? {},
338
+ bodyType: 'sylphx.observability.v1.UptimeSource',
339
+ responseType: 'sylphx.observability.v1.UptimeSource',
340
+ mutation: true,
341
+ });
342
+ }
343
+ }
344
+ /** `uptime_checks` of Sylphx Observability: Resource type `observability.sylphx.com/UptimeCheck`. */
345
+ export class UptimeChecksCollection {
346
+ client;
347
+ constructor(client) {
348
+ this.client = client;
349
+ }
350
+ /**
351
+ * Creates one tenant uptime check.
352
+ *
353
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/uptime_checks` · permission `observability:write` · effect `write`
354
+ *
355
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
356
+ */
357
+ async create(request) {
358
+ return this.client.call({
359
+ method: 'POST',
360
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/uptime_checks`,
361
+ query: { uptime_check_id: request.uptimeCheckId },
362
+ body: request.uptimeCheck ?? {},
363
+ bodyType: 'sylphx.observability.v1.UptimeCheck',
364
+ responseType: 'sylphx.observability.v1.UptimeCheck',
365
+ mutation: true,
366
+ });
367
+ }
368
+ /**
369
+ * Gets one tenant uptime check.
370
+ *
371
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:read` · effect `read`
372
+ *
373
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
374
+ */
375
+ async get(request) {
376
+ return this.client.call({
377
+ method: 'GET',
378
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/uptime_checks/*', 'name')}`,
379
+ query: { target_page_token: request.targetPageToken },
380
+ responseType: 'sylphx.observability.v1.UptimeCheck',
381
+ mutation: false,
382
+ });
383
+ }
384
+ /**
385
+ * Lists checks and aggregate status. GetUptimeCheck reads target pages.
386
+ *
387
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/uptime_checks` · permission `observability:read` · effect `read`
388
+ *
389
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
390
+ */
391
+ async list(request) {
392
+ return this.client.call({
393
+ method: 'GET',
394
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/uptime_checks`,
395
+ query: { page_size: request.pageSize, page_token: request.pageToken },
396
+ responseType: 'sylphx.observability.v1.ListUptimeChecksResponse',
397
+ mutation: false,
398
+ });
399
+ }
400
+ /** Every item of every page of `list`. */
401
+ async *listAll(request) {
402
+ let next = request;
403
+ for (;;) {
404
+ const page = await this.list(next);
405
+ yield* page.uptimeChecks ?? [];
406
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
407
+ return;
408
+ next = { ...request, pageToken: page.nextPageToken };
409
+ }
410
+ }
411
+ /**
412
+ * Updates one tenant uptime check.
413
+ *
414
+ * `PATCH /v1/{uptime_check.name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:write` · effect `write`
415
+ *
416
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
417
+ */
418
+ async update(request) {
419
+ return this.client.call({
420
+ method: 'PATCH',
421
+ path: `/v1/${runtime.pathParam(request.uptimeCheck?.name, 'orgs/*/projects/*/envs/*/uptime_checks/*', 'uptime_check.name')}`,
422
+ query: { update_mask: request.updateMask },
423
+ body: request.uptimeCheck ?? {},
424
+ bodyType: 'sylphx.observability.v1.UptimeCheck',
425
+ responseType: 'sylphx.observability.v1.UptimeCheck',
426
+ mutation: true,
427
+ });
428
+ }
429
+ /**
430
+ * Deletes one tenant uptime check.
431
+ *
432
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/uptime_checks/*}` · permission `observability:write` · effect `destructive`
433
+ *
434
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`.
435
+ */
436
+ async delete(request) {
437
+ return this.client.call({
438
+ method: 'DELETE',
439
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/uptime_checks/*', 'name')}`,
440
+ query: { etag: request.etag },
441
+ mutation: true,
442
+ });
443
+ }
444
+ }
225
445
  /** `log_entries` of Sylphx Observability: Resource type `observability.sylphx.com/LogEntry`. */
226
446
  export class LogEntriesCollection {
227
447
  client;