@whooshbang/sdk 1.0.0-rc.14

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FlowXO LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # `@whooshbang/sdk`
2
+
3
+ Fetch-injected, ESM-only client for the release-candidate WhooshBang V1
4
+ contract. The package has no automatic retry policy, persistence, telemetry,
5
+ Node-only runtime import, or Cloudflare binding.
6
+
7
+ Install the current release candidate from the public npm registry:
8
+
9
+ ```sh
10
+ npm install @whooshbang/sdk@next
11
+ ```
12
+
13
+ ```ts
14
+ import { WhooshBangClient, confirmInteraction } from "@whooshbang/sdk";
15
+
16
+ const whooshBang = new WhooshBangClient({
17
+ baseUrl: "http://127.0.0.1:8787",
18
+ credential: "synthetic-local-credential",
19
+ fetch,
20
+ });
21
+
22
+ const message = await whooshBang.createMessage(
23
+ {
24
+ to: { subscriber_id: "customer_123" },
25
+ content: { type: "text", text: "A deployment is waiting." },
26
+ interaction: confirmInteraction({
27
+ prompt: "Approve the synthetic deployment?",
28
+ confirmLabel: "Approve",
29
+ denyLabel: "Deny",
30
+ expiresInSeconds: 900,
31
+ }),
32
+ },
33
+ { idempotencyKey: "deploy-approval-987", timeoutMs: 10_000 },
34
+ );
35
+ ```
36
+
37
+ ## Interaction builders
38
+
39
+ `confirmInteraction`, `selectInteraction`, and `inputInteraction` produce
40
+ exactly the C0 tagged interaction union and enforce every documented bound —
41
+ prompt and label lengths, two to six unique select options, correlation-id
42
+ shape — before any request is built. A violation raises
43
+ `WhooshBangValidationError` listing the offending field paths and rule names.
44
+ The offending values are deliberately absent: builder input carries prompts and
45
+ option labels, which never belong in an error, a log, or a stack trace.
46
+
47
+ Supply `expiresInSeconds` (30 through 86400) to compute the expiry locally, or
48
+ `expiresAt` to set it exactly. The 30-second-to-24-hour window is measured from
49
+ server acceptance, so only the value this package computes is bounded here.
50
+
51
+ ## Bounded response inspection
52
+
53
+ `getMessage` and `getInteraction` accept `wait`, the server-held long poll in
54
+ whole seconds from 0 through 30. Omitting it uses the documented server default
55
+ of 30. A wait that expires is a successful current-state read, not an error, so
56
+ a listener-less consumer simply reads again. Inspection never acknowledges,
57
+ consumes, retries, or replays anything.
58
+
59
+ `interactionAnswer` reads a terminal summary as the same tagged union the
60
+ machine stream and signed customer events carry, and returns nothing once the
61
+ typed answer has left its retention window — `answered` and `answered_at`
62
+ survive that deletion, the answer does not.
63
+
64
+ ## Endpoint lifecycle and webhook verification
65
+
66
+ `createCustomerEndpoint`, `verifyCustomerEndpoint`, `rotateCustomerEndpoint`,
67
+ `pauseCustomerEndpoint`, `resumeCustomerEndpoint`, `disableCustomerEndpoint`,
68
+ `listCustomerEndpoints`, `getCustomerEndpoint`, and
69
+ `listCustomerEndpointAttempts` cover the endpoint lifecycle. The signing secret
70
+ is revealed exactly once, by create and by rotate; an equivalent idempotent
71
+ replay returns the same logical endpoint without it.
72
+
73
+ `verifyWhooshBangEvent` verifies the Standard Webhooks envelope over the exact
74
+ raw request bytes and returns the typed customer event. Read the body as bytes:
75
+ framework JSON re-serialization changes the signed input. Verification enforces
76
+ the replay window, fails closed on an unknown signature version, and accepts
77
+ both the previous and the current secret so a rotation overlap has no gap. Use
78
+ `verifyWhooshBangWebhook` (or `verifyWebhookSignature`) for signature-only
79
+ verification of any signed body.
80
+
81
+ ## Machine clients
82
+
83
+ `createMachineCredential` generates the C0-03 secret with Web Crypto and
84
+ returns the readable bearer plus a digest-only `registration`. Only the
85
+ registration may be sent; the service never receives, stores, or can return the
86
+ secret. `registerMachineCredential`, `revokeMachineCredential`,
87
+ `revokeMachineClient`, `pollMachineEvents`, and `acknowledgeMachineEvent`
88
+ complete the stream lifecycle. Rotate by registering the replacement first and
89
+ revoking the original second.
90
+
91
+ The machine stream is proved against the deterministic C0-05 contract mock.
92
+ The production machine-stream service is a separate story.
93
+
94
+ ## Errors
95
+
96
+ | Class | Meaning |
97
+ | --- | --- |
98
+ | `WhooshBangValidationError` | Caller input broke a documented bound. No request was made. Extends `TypeError`. |
99
+ | `WhooshBangContractError` | A request or response did not match the pinned contract. |
100
+ | `WhooshBangProblemError` | The API returned Problem Details, with `code`, `status`, `diagnosticId`, `retryable`, and `retryAt` preserved. |
101
+ | `WhooshBangProtocolError` | The response was not a usable WhooshBang response. |
102
+ | `WhooshBangTransportError` | The request could not be completed. |
103
+ | `WhooshBangAbortError` | The caller's `AbortSignal` fired. |
104
+ | `WhooshBangTimeoutError` | The caller's `timeoutMs` elapsed. |
105
+
106
+ The last three carry `outcomeUnknown`: a cancelled or failed side effect may
107
+ already have been applied, and the client never resolves that on your behalf.
108
+
109
+ Use a verified human-session token with the same client to call `getAccount`,
110
+ `listProjects`, `createProject`, `getProject`, `listApiCredentials`,
111
+ `createApiCredential`, `rotateApiCredential`, and `revokeApiCredential`.
112
+ Credential create and rotate calls intentionally have no response-replay key:
113
+ their complete bearer is a one-time response and cannot be retrieved later.
114
+ Treat a transport failure as outcome unknown, inspect safe metadata, and issue
115
+ then revoke a replacement. Product delivery methods continue to use project-
116
+ or machine-scoped credentials; the client does not persist either credential
117
+ kind.
118
+
119
+ Delivery, project creation, endpoint create/rotate, machine administration, and
120
+ acknowledgement side-effects require an explicit idempotency key. Credential
121
+ lifecycle create/rotate/revoke calls follow their one-time-reveal or intrinsic
122
+ repeat-safe contract instead. The client sends each call exactly once. A
123
+ transport failure on a side effect raises an error with
124
+ `outcomeUnknown: true`; the caller decides whether a new logical operation is
125
+ appropriate. With a caller key, an explicit retry returns the original result
126
+ and creates no duplicate.
127
+
128
+ ## Cancellation and deadlines
129
+
130
+ Every method accepts `signal` and `timeoutMs` (1 through 300000 milliseconds).
131
+ When only one is supplied it reaches `fetch` unchanged. Neither adds a retry:
132
+ they bound waiting, and neither claims a server outcome after cancellation.
133
+
134
+ ## Optional logging
135
+
136
+ `logger` receives one record per attempted request containing the operation name,
137
+ outcome, duration, HTTP status, public diagnostic identifier, problem code,
138
+ retryability, and retry time. Credentials, URLs, request bodies, prompts,
139
+ answers, and signing material are structurally absent rather than redacted. A
140
+ hook that throws never changes the operation's outcome. Caller input is checked
141
+ before the attempt begins, so a local refusal throws at your call site rather
142
+ than arriving as a log record.
143
+
144
+ ## Examples
145
+
146
+ Runnable scripts for the interactive send, bounded polling, raw-body webhook
147
+ verification, endpoint lifecycle, and machine bootstrap flows live in the
148
+ repository under `packages/sdk-js/examples/`. They are deliberately not part of
149
+ the published tarball, which carries only `dist` and this README. From a
150
+ repository checkout they run against any base URL and default to the local
151
+ deterministic mock:
152
+
153
+ ```sh
154
+ npx @whooshbang/contract-mock@next --port 8787 --scenario machine-event-replay
155
+ node packages/sdk-js/examples/send-interactive-message.mjs
156
+ ```
157
+
158
+ ## Compatibility
159
+
160
+ The exact runtime dependency is
161
+ `@whooshbang/contracts@1.0.0-rc.13`. Successful payloads are
162
+ validated with its packaged validators, while additive response fields remain
163
+ available on the returned object.
@@ -0,0 +1,11 @@
1
+ import type { ContractValidationError } from "@whooshbang/contracts";
2
+ export type ResponseValidator<T> = {
3
+ (value: unknown): value is T;
4
+ readonly errors?: readonly ContractValidationError[] | null;
5
+ };
6
+ /**
7
+ * Accepts only forward-compatible success payloads whose validator failures
8
+ * are exclusively unknown object properties. Validation runs against a clone;
9
+ * callers receive the original payload with additive fields preserved.
10
+ */
11
+ export declare function validateAdditiveCompatible<T>(value: unknown, validator: ResponseValidator<T>): value is T;
@@ -0,0 +1,65 @@
1
+ import { contractValidationErrors } from "@whooshbang/contracts";
2
+ function decodeJsonPointerSegment(value) {
3
+ return value.replaceAll("~1", "/").replaceAll("~0", "~");
4
+ }
5
+ function removeAdditionalProperty(value, error) {
6
+ const additionalProperty = error.params.additionalProperty;
7
+ if (error.keyword !== "additionalProperties" ||
8
+ typeof additionalProperty !== "string") {
9
+ return false;
10
+ }
11
+ const path = error.instancePath === ""
12
+ ? []
13
+ : error.instancePath.slice(1).split("/").map(decodeJsonPointerSegment);
14
+ let target = value;
15
+ for (const segment of path) {
16
+ if (typeof target !== "object" ||
17
+ target === null ||
18
+ !Object.hasOwn(target, segment)) {
19
+ return false;
20
+ }
21
+ target = target[segment];
22
+ }
23
+ if (typeof target !== "object" ||
24
+ target === null ||
25
+ Array.isArray(target) ||
26
+ !Object.hasOwn(target, additionalProperty)) {
27
+ return false;
28
+ }
29
+ return Reflect.deleteProperty(target, additionalProperty);
30
+ }
31
+ /**
32
+ * Accepts only forward-compatible success payloads whose validator failures
33
+ * are exclusively unknown object properties. Validation runs against a clone;
34
+ * callers receive the original payload with additive fields preserved.
35
+ */
36
+ export function validateAdditiveCompatible(value, validator) {
37
+ if (validator(value)) {
38
+ return true;
39
+ }
40
+ let projection;
41
+ try {
42
+ projection = structuredClone(value);
43
+ }
44
+ catch {
45
+ return false;
46
+ }
47
+ for (let pass = 0; pass < 100; pass += 1) {
48
+ const errors = contractValidationErrors(validator);
49
+ let removed = false;
50
+ for (const error of errors) {
51
+ if (error.keyword === "additionalProperties" &&
52
+ removeAdditionalProperty(projection, error)) {
53
+ removed = true;
54
+ }
55
+ }
56
+ if (!removed) {
57
+ return false;
58
+ }
59
+ if (validator(projection)) {
60
+ return true;
61
+ }
62
+ }
63
+ return false;
64
+ }
65
+ //# sourceMappingURL=additive-compatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"additive-compatibility.js","sourceRoot":"","sources":["../src/additive-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AASjE,SAAS,wBAAwB,CAAC,KAAa;IAC7C,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,wBAAwB,CAC/B,KAAc,EACd,KAA8B;IAE9B,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC;IAC3D,IACE,KAAK,CAAC,OAAO,KAAK,sBAAsB;QACxC,OAAO,kBAAkB,KAAK,QAAQ,EACtC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,GACR,KAAK,CAAC,YAAY,KAAK,EAAE;QACvB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAC3E,IAAI,MAAM,GAAY,KAAK,CAAC;IAC5B,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;QAC3B,IACE,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,KAAK,IAAI;YACf,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,GAAI,MAAkC,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;IACD,IACE,OAAO,MAAM,KAAK,QAAQ;QAC1B,MAAM,KAAK,IAAI;QACf,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACrB,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC1C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACxC,KAAc,EACd,SAA+B;IAE/B,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,UAAmB,CAAC;IACxB,IAAI,CAAC;QACH,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,MAAM,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IACE,KAAK,CAAC,OAAO,KAAK,sBAAsB;gBACxC,wBAAwB,CAAC,UAAU,EAAE,KAAK,CAAC,EAC3C,CAAC;gBACD,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;QACH,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,148 @@
1
+ import type { AccountProjection, ApiCredential, ApiCredentialCollection, ApiCredentialRotation, ApiCredentialSecretReveal, CreateApiCredentialRequest, CreateCustomerEndpointRequest, CreateMachineClientRequest, CreateMessageRequest, CreateProjectRequest, CreateSubscriptionLinkRequest, CustomerEndpoint, CustomerEndpointAttemptCollection, CustomerEndpointCollection, CustomerEndpointMutationResult, InteractionSummary, MachineClient, MachineCredential, MachineEventAckRequest, MachineEventAckResponse, MachineEventPollResponse, Message, Problem, Project, ProjectCollection, ProviderCapabilitiesCollection, RegisterMachineCredentialRequest, RotateApiCredentialRequest, RotateCustomerEndpointRequest, SubscriptionLink } from "@whooshbang/contracts";
2
+ export type WhooshBangFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
3
+ /**
4
+ * The outcome of one SDK invocation, as reported to an optional logging hook.
5
+ *
6
+ * Every field here is safe to persist: the operation name, how it ended, how
7
+ * long it took, and the public identifiers the service already publishes for
8
+ * support. Credentials, URLs, request bodies, prompts, answers, and signing
9
+ * material are structurally absent rather than redacted.
10
+ */
11
+ export interface WhooshBangLogRecord {
12
+ readonly diagnosticId?: string;
13
+ readonly durationMs: number;
14
+ readonly operation: string;
15
+ readonly outcome: "abort" | "contract" | "problem" | "protocol" | "success" | "timeout" | "transport";
16
+ readonly problemCode?: Problem["code"];
17
+ readonly retryAt?: string;
18
+ readonly retryable?: boolean;
19
+ readonly status?: number;
20
+ }
21
+ export type WhooshBangLogger = (record: WhooshBangLogRecord) => void;
22
+ export interface WhooshBangClientOptions {
23
+ readonly baseUrl: string | URL;
24
+ readonly credential: string;
25
+ readonly fetch?: WhooshBangFetch;
26
+ readonly logger?: WhooshBangLogger;
27
+ }
28
+ export interface RequestOptions {
29
+ readonly signal?: AbortSignal;
30
+ /**
31
+ * Local deadline in whole milliseconds, 1 through 300000.
32
+ *
33
+ * Expiry raises `WhooshBangTimeoutError` and never claims a server outcome.
34
+ * It bounds waiting; it is not a retry budget.
35
+ */
36
+ readonly timeoutMs?: number;
37
+ }
38
+ export interface SideEffectRequestOptions extends RequestOptions {
39
+ readonly idempotencyKey: string;
40
+ }
41
+ /**
42
+ * Options for the bounded response-inspection reads.
43
+ *
44
+ * `wait` is the server-held long poll in whole seconds, 0 through 30. Omitting
45
+ * it uses the documented server default of 30. A wait that expires is a
46
+ * successful current-state read, not an error.
47
+ */
48
+ export interface ResponseInspectionOptions extends RequestOptions {
49
+ readonly wait?: number;
50
+ }
51
+ export interface PollMachineEventsOptions extends RequestOptions {
52
+ readonly after?: string;
53
+ readonly limit?: number;
54
+ readonly wait?: number;
55
+ }
56
+ export interface ListProjectsOptions extends RequestOptions {
57
+ readonly after?: string;
58
+ readonly limit?: number;
59
+ }
60
+ export interface ListApiCredentialsOptions extends RequestOptions {
61
+ readonly after?: string;
62
+ readonly limit?: number;
63
+ }
64
+ export declare class WhooshBangClient {
65
+ #private;
66
+ constructor(options: WhooshBangClientOptions);
67
+ getAccount(options?: RequestOptions): Promise<AccountProjection>;
68
+ listProjects(options?: ListProjectsOptions): Promise<ProjectCollection>;
69
+ createProject(request: CreateProjectRequest, options: SideEffectRequestOptions): Promise<Project>;
70
+ getProject(projectId: string, options?: RequestOptions): Promise<Project>;
71
+ listApiCredentials(projectId: string, environmentId: string, options?: ListApiCredentialsOptions): Promise<ApiCredentialCollection>;
72
+ createApiCredential(projectId: string, environmentId: string, request: CreateApiCredentialRequest, options?: RequestOptions): Promise<ApiCredentialSecretReveal>;
73
+ rotateApiCredential(projectId: string, environmentId: string, credentialId: string, request: RotateApiCredentialRequest, options?: RequestOptions): Promise<ApiCredentialRotation>;
74
+ revokeApiCredential(projectId: string, environmentId: string, credentialId: string, options?: RequestOptions): Promise<ApiCredential>;
75
+ createSubscriptionLink(request: CreateSubscriptionLinkRequest, options: SideEffectRequestOptions): Promise<SubscriptionLink>;
76
+ getSubscriptionLink(subscriptionLinkId: string, options?: RequestOptions): Promise<SubscriptionLink>;
77
+ cancelSubscriptionLink(subscriptionLinkId: string, options: SideEffectRequestOptions): Promise<SubscriptionLink>;
78
+ createMessage(request: CreateMessageRequest, options: SideEffectRequestOptions): Promise<Message>;
79
+ /**
80
+ * Reads the canonical message state, optionally holding for an open
81
+ * interaction's terminal state.
82
+ *
83
+ * A `wait` that expires still resolves with the current message. Inspection
84
+ * never acknowledges, consumes, retries, or replays anything.
85
+ */
86
+ getMessage(messageId: string, options?: ResponseInspectionOptions): Promise<Message>;
87
+ /**
88
+ * Reads the canonical interaction summary, optionally holding for its
89
+ * terminal state.
90
+ *
91
+ * Expiry without resolution returns the current `open` summary successfully
92
+ * and can be re-polled immediately.
93
+ */
94
+ getInteraction(interactionId: string, options?: ResponseInspectionOptions): Promise<InteractionSummary>;
95
+ cancelMessage(messageId: string, options: SideEffectRequestOptions): Promise<Message>;
96
+ getCapabilities(options?: RequestOptions): Promise<ProviderCapabilitiesCollection>;
97
+ listCustomerEndpoints(projectId: string, environmentId: string, options?: RequestOptions): Promise<CustomerEndpointCollection>;
98
+ /**
99
+ * Creates one signing endpoint.
100
+ *
101
+ * The signing secret is revealed exactly once, in this result. An equivalent
102
+ * idempotent replay returns the same logical endpoint without it, so a caller
103
+ * that loses the value must rotate rather than re-read.
104
+ */
105
+ createCustomerEndpoint(projectId: string, environmentId: string, request: CreateCustomerEndpointRequest, options: SideEffectRequestOptions): Promise<CustomerEndpointMutationResult>;
106
+ getCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpoint>;
107
+ verifyCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpoint>;
108
+ /**
109
+ * Starts a rotation with a bounded overlap window.
110
+ *
111
+ * Both secrets verify for `overlap_seconds`, so a receiver that accepts the
112
+ * previous and the new secret together has no verification gap.
113
+ */
114
+ rotateCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, request: RotateCustomerEndpointRequest, options: SideEffectRequestOptions): Promise<CustomerEndpointMutationResult>;
115
+ pauseCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpoint>;
116
+ resumeCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpoint>;
117
+ disableCustomerEndpoint(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpoint>;
118
+ listCustomerEndpointAttempts(projectId: string, environmentId: string, endpointId: string, options?: RequestOptions): Promise<CustomerEndpointAttemptCollection>;
119
+ /**
120
+ * The environment-scoped forms of the product operations.
121
+ *
122
+ * They exist for a caller whose authority selects an account rather than a
123
+ * project — a person's OAuth grant — and name the project and environment in
124
+ * the path that the flat forms take from a credential. Request, response,
125
+ * and semantics are otherwise identical, so a caller that changes authority
126
+ * changes which method it calls and nothing else.
127
+ */
128
+ createSubscriptionLinkInEnvironment(projectId: string, environmentId: string, request: CreateSubscriptionLinkRequest, options: SideEffectRequestOptions): Promise<SubscriptionLink>;
129
+ getSubscriptionLinkInEnvironment(projectId: string, environmentId: string, subscriptionLinkId: string, options?: RequestOptions): Promise<SubscriptionLink>;
130
+ createMessageInEnvironment(projectId: string, environmentId: string, request: CreateMessageRequest, options: SideEffectRequestOptions): Promise<Message>;
131
+ getMessageInEnvironment(projectId: string, environmentId: string, messageId: string, options?: ResponseInspectionOptions): Promise<Message>;
132
+ getInteractionInEnvironment(projectId: string, environmentId: string, interactionId: string, options?: ResponseInspectionOptions): Promise<InteractionSummary>;
133
+ createMachineClientInEnvironment(projectId: string, environmentId: string, request: CreateMachineClientRequest, options: SideEffectRequestOptions): Promise<MachineClient>;
134
+ getCapabilitiesInEnvironment(projectId: string, environmentId: string, options?: RequestOptions): Promise<ProviderCapabilitiesCollection>;
135
+ createMachineClient(request: CreateMachineClientRequest, options: SideEffectRequestOptions): Promise<MachineClient>;
136
+ getMachineClient(machineClientId: string, options?: RequestOptions): Promise<MachineClient>;
137
+ /**
138
+ * Registers a locally generated credential by digest only.
139
+ *
140
+ * The readable secret never leaves the caller's process. See
141
+ * `createMachineCredential` for the generator that produces the pair.
142
+ */
143
+ registerMachineCredential(machineClientId: string, request: RegisterMachineCredentialRequest, options: SideEffectRequestOptions): Promise<MachineCredential>;
144
+ revokeMachineCredential(machineClientId: string, credentialId: string, options: SideEffectRequestOptions): Promise<MachineCredential>;
145
+ revokeMachineClient(machineClientId: string, options: SideEffectRequestOptions): Promise<MachineClient>;
146
+ pollMachineEvents(options?: PollMachineEventsOptions): Promise<MachineEventPollResponse>;
147
+ acknowledgeMachineEvent(eventId: string, request: MachineEventAckRequest, options: SideEffectRequestOptions): Promise<MachineEventAckResponse>;
148
+ }