@farthershore/client 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/README.md +252 -2
  3. package/dist/index.js +7009 -0
  4. package/dist/types/api.generated.d.ts +1362 -0
  5. package/dist/types/credentials.d.ts +78 -0
  6. package/dist/types/envelope.d.ts +48 -0
  7. package/dist/types/errors.d.ts +86 -0
  8. package/dist/types/generated/schemas.d.ts +3670 -0
  9. package/dist/types/helpers/abort.d.ts +7 -0
  10. package/dist/types/helpers/paginate.d.ts +32 -0
  11. package/dist/types/helpers/poll.d.ts +26 -0
  12. package/dist/types/helpers/refs.d.ts +84 -0
  13. package/dist/types/helpers/wait-for-frontend-build.d.ts +51 -0
  14. package/dist/types/index.d.ts +24 -0
  15. package/dist/types/operations/agents.d.ts +240 -0
  16. package/dist/types/operations/agreements.d.ts +174 -0
  17. package/dist/types/operations/analytics.d.ts +47 -0
  18. package/dist/types/operations/audit-notifications.d.ts +90 -0
  19. package/dist/types/operations/auth.d.ts +24 -0
  20. package/dist/types/operations/backends.d.ts +255 -0
  21. package/dist/types/operations/billing.d.ts +71 -0
  22. package/dist/types/operations/businesses.d.ts +795 -0
  23. package/dist/types/operations/change-sets.d.ts +462 -0
  24. package/dist/types/operations/consumers.d.ts +168 -0
  25. package/dist/types/operations/define.d.ts +102 -0
  26. package/dist/types/operations/environments.d.ts +55 -0
  27. package/dist/types/operations/frontend.d.ts +31 -0
  28. package/dist/types/operations/index.d.ts +4773 -0
  29. package/dist/types/operations/maker-tokens.d.ts +194 -0
  30. package/dist/types/operations/organizations.d.ts +373 -0
  31. package/dist/types/operations/personas.d.ts +136 -0
  32. package/dist/types/operations/plans-usage.d.ts +84 -0
  33. package/dist/types/operations/platform.d.ts +455 -0
  34. package/dist/types/operations/portal.d.ts +442 -0
  35. package/dist/types/operations/promo-codes.d.ts +139 -0
  36. package/dist/types/operations/variables.d.ts +188 -0
  37. package/dist/types/operations/webhooks.d.ts +130 -0
  38. package/dist/types/surface-types.d.ts +76 -0
  39. package/dist/types/surface.d.ts +35 -0
  40. package/dist/types/transport.d.ts +114 -0
  41. package/dist/types/types.d.ts +440 -0
  42. package/dist/types/version.d.ts +8 -0
  43. package/package.json +53 -3
@@ -0,0 +1,7 @@
1
+ import { FartherShoreTransportError } from "../errors.js";
2
+ /** The error a helper throws when its caller cancels it. */
3
+ export declare function abortedError(_signal: AbortSignal): FartherShoreTransportError;
4
+ /** Throw when `signal` has fired. */
5
+ export declare function throwIfAborted(signal: AbortSignal | undefined): void;
6
+ /** Sleep `ms`, settling early (rejected) when `signal` fires. */
7
+ export declare function sleepFor(ms: number, signal?: AbortSignal): Promise<void>;
@@ -0,0 +1,32 @@
1
+ import type { CallOptions } from "../operations/define.js";
2
+ import type { OperationMeta } from "../surface-types.js";
3
+ /** A namespaced method `paginate` can walk. */
4
+ export type PaginatedMethod<I, O> = ((input: I, options?: CallOptions) => Promise<O>) & {
5
+ readonly meta: Pick<OperationMeta, "path" | "pagination"> & Partial<Pick<OperationMeta, "maxPageSize">>;
6
+ };
7
+ /** The element type of one page. */
8
+ export type PageItem<O> = O extends readonly (infer T)[] ? T : O extends {
9
+ data: readonly (infer T)[];
10
+ } ? T : O extends {
11
+ items: readonly (infer T)[];
12
+ } ? T : unknown;
13
+ export type PaginateOptions = {
14
+ /** Stop after this many items (across pages). */
15
+ maxItems?: number;
16
+ /** Cancels the walk (and the in-flight page request). */
17
+ signal?: AbortSignal;
18
+ };
19
+ export declare const NOT_PAGINATED = "NOT_PAGINATED";
20
+ export declare const PAGINATION_NOT_ADVANCING = "PAGINATION_NOT_ADVANCING";
21
+ /** A starting `offset` or `limit` that is not a non-negative whole number. */
22
+ export declare const INVALID_PAGE_PARAMETER = "INVALID_PAGE_PARAMETER";
23
+ /**
24
+ * Iterate every item of a paginated method, page by page.
25
+ *
26
+ * ```ts
27
+ * for await (const env of paginate(fs.environments.read, { businessId })) …
28
+ * ```
29
+ */
30
+ export declare function paginate<I extends object | undefined, O>(method: PaginatedMethod<I, O>, input: I, options?: PaginateOptions): AsyncGenerator<PageItem<O>, void, undefined>;
31
+ /** Collect a paginated method into one array (bounded by `maxItems`). */
32
+ export declare function collect<I extends object | undefined, O>(method: PaginatedMethod<I, O>, input: I, options?: PaginateOptions): Promise<PageItem<O>[]>;
@@ -0,0 +1,26 @@
1
+ export type PollOptions<T> = {
2
+ /** Read the current state. */
3
+ check: (signal?: AbortSignal) => Promise<T>;
4
+ /** True once `value` is the state being waited for. */
5
+ until: (value: T) => boolean;
6
+ /** Wait between checks (default 1000 ms). */
7
+ intervalMs?: number;
8
+ /** Give up after this many milliseconds from the start. */
9
+ deadlineMs: number;
10
+ /** Cancels the wait. */
11
+ signal?: AbortSignal;
12
+ /** Test seams. */
13
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
14
+ now?: () => number;
15
+ };
16
+ export type PollResult<T> = {
17
+ /** The last value read. */
18
+ value: T;
19
+ /** True when the deadline passed before `until` held. */
20
+ timedOut: boolean;
21
+ };
22
+ /**
23
+ * Check until `until(value)` holds or the deadline passes. Always checks at
24
+ * least once; the last value is returned either way.
25
+ */
26
+ export declare function poll<T>(options: PollOptions<T>): Promise<PollResult<T>>;
@@ -0,0 +1,84 @@
1
+ import type { CallOptions, ListQuery } from "../operations/define.js";
2
+ import type { BusinessSummary, EnvironmentListResult, EnvironmentSummary } from "../types.js";
3
+ /** What the business lookups call. `fs` satisfies it. */
4
+ export type BusinessListSource = {
5
+ businesses: {
6
+ list(input: {
7
+ limit: number;
8
+ offset: number;
9
+ query?: ListQuery;
10
+ }, options?: CallOptions): Promise<readonly BusinessSummary[]>;
11
+ };
12
+ };
13
+ /** What the environment lookups call. `fs` satisfies it. */
14
+ export type EnvironmentListSource = {
15
+ environments: {
16
+ read(input: {
17
+ businessId: string;
18
+ limit: number;
19
+ offset: number;
20
+ query?: ListQuery;
21
+ }, options?: CallOptions): Promise<EnvironmentListResult>;
22
+ };
23
+ };
24
+ export type RefSource = BusinessListSource & EnvironmentListSource;
25
+ export type LookupOptions = {
26
+ signal?: AbortSignal;
27
+ };
28
+ /**
29
+ * Whether `ref` names a business: its id, its name (case-insensitive), or a
30
+ * runtime/portal hostname or the hostname's first label.
31
+ */
32
+ export declare function findBusinessByRef<B extends {
33
+ id: string;
34
+ name: string;
35
+ runtimeHostname?: string | null;
36
+ portalHostname?: string | null;
37
+ }>(businesses: readonly B[], ref: string): B | undefined;
38
+ /**
39
+ * Walk the caller's business list up to the page cap. `complete` is false
40
+ * when the walk stopped at the cap with the last page still full.
41
+ */
42
+ export declare function listAllBusinesses(source: BusinessListSource, query?: ListQuery, options?: LookupOptions): Promise<{
43
+ businesses: BusinessSummary[];
44
+ complete: boolean;
45
+ }>;
46
+ /**
47
+ * Paged business-ref lookup:
48
+ * - `matched`: the ref names this business (sound at any page depth);
49
+ * - `absent`: PROVEN absence — the FIRST page came back short, so one
50
+ * request saw the whole list. A short page deeper in the walk is not
51
+ * proof: a row deleted between two fetches shifts the window;
52
+ * - `inconclusive`: no proof either way (page cap, or a deep short page).
53
+ */
54
+ export declare function findBusinessPaged(source: BusinessListSource, ref: string, options?: LookupOptions): Promise<{
55
+ outcome: "matched";
56
+ business: BusinessSummary;
57
+ } | {
58
+ outcome: "absent";
59
+ } | {
60
+ outcome: "inconclusive";
61
+ }>;
62
+ /** Every environment of a business (the server's own paging, to the end). */
63
+ export declare function listAllEnvironments(source: EnvironmentListSource, businessId: string, query?: ListQuery, options?: LookupOptions): Promise<EnvironmentSummary[]>;
64
+ /** Resolve a business id, slug, name or hostname to the business id. */
65
+ export declare function resolveBusiness(source: BusinessListSource, ref: string, options?: LookupOptions): Promise<string>;
66
+ /** Resolve an environment name (case-insensitive) or id to its row. */
67
+ export declare function resolveEnvironment(source: EnvironmentListSource, businessId: string, ref: string, options?: LookupOptions): Promise<EnvironmentSummary>;
68
+ /** Reference resolvers bound to one client. */
69
+ export type Refs = {
70
+ /** A business id, slug, name or hostname → the business id. */
71
+ business(slugOrId: string, options?: LookupOptions): Promise<string>;
72
+ /** An environment name or id → the environment row. */
73
+ environment(businessId: string, nameOrId: string, options?: LookupOptions): Promise<EnvironmentSummary>;
74
+ };
75
+ /**
76
+ * Bind the resolvers to a client:
77
+ *
78
+ * ```ts
79
+ * const refs = createRefs(fs);
80
+ * const businessId = await refs.business("acme");
81
+ * const preview = await refs.environment(businessId, "preview");
82
+ * ```
83
+ */
84
+ export declare function createRefs(source: RefSource): Refs;
@@ -0,0 +1,51 @@
1
+ import type { CallOptions } from "../operations/define.js";
2
+ import type { FrontendBuildRow, FrontendStatusResult } from "../types.js";
3
+ /** What the wait calls. `fs` satisfies it. */
4
+ export type FrontendStatusSource = {
5
+ frontend: {
6
+ status(input: {
7
+ businessId: string;
8
+ environmentId?: string;
9
+ ref?: string;
10
+ }, options?: CallOptions): Promise<FrontendStatusResult>;
11
+ };
12
+ };
13
+ /** A build status, or `UNKNOWN` before the wait has seen a build. */
14
+ export type BuildWaitStatus = FrontendBuildRow["status"] | "UNKNOWN";
15
+ /** A refused build's typed reason, as `frontend status` returns it (e.g.
16
+ * `FRONTEND_SIGN_IN_MISSING`: the built portal cannot sign visitors in). */
17
+ export type BuildDiagnostic = FrontendBuildRow["diagnostics"][number];
18
+ export interface BuildWaitResult {
19
+ status: BuildWaitStatus;
20
+ buildId: string | null;
21
+ ref: string | null;
22
+ error: string | null;
23
+ /** Typed reasons for a refused build; `[]` when there are none. */
24
+ diagnostics: BuildDiagnostic[];
25
+ /** True only when the platform serves this exact successful build as custom-react. */
26
+ activated: boolean;
27
+ /** The currently served build, retained for timeout diagnostics. */
28
+ activeBuildId: string | null;
29
+ /** True when the wait ended because the deadline passed, not a verdict. */
30
+ timedOut: boolean;
31
+ }
32
+ /**
33
+ * Poll `frontend status` until the build identified by `buildId` settles.
34
+ *
35
+ * Without a build id it follows the newest build that appears after the wait
36
+ * starts (or the newest for `ref`).
37
+ */
38
+ export declare function waitForFrontendBuild(source: FrontendStatusSource, input: {
39
+ businessId: string;
40
+ environmentId?: string | undefined;
41
+ buildId?: string | null;
42
+ /** Immutable Git commit SHA expected from a push or release. */
43
+ ref?: string | undefined;
44
+ timeoutMs: number;
45
+ intervalMs?: number;
46
+ /** Cancels the wait (and the in-flight status read). */
47
+ signal?: AbortSignal;
48
+ /** Injectable so tests don't sleep. */
49
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
50
+ now?: () => number;
51
+ }): Promise<BuildWaitResult>;
@@ -0,0 +1,24 @@
1
+ export { createFartherShore, listOperations, DRY_RUN_NOT_SUPPORTED, UNKNOWN_OPERATION, } from "./surface.js";
2
+ export type { CreateFartherShoreOptions, FartherShore } from "./surface.js";
3
+ export type { FartherShoreApi } from "./api.generated.js";
4
+ export type { DerivedApi, DryRunPreview, Method, MethodInput, MethodOutput, OperationMeta, } from "./surface-types.js";
5
+ export type { CallOptions, ListQuery, RequestBody, } from "./operations/define.js";
6
+ export type { MethodPath } from "./operations/index.js";
7
+ export * from "./types.js";
8
+ export { collect, paginate, INVALID_PAGE_PARAMETER, NOT_PAGINATED, PAGINATION_NOT_ADVANCING, } from "./helpers/paginate.js";
9
+ export type { PageItem, PaginatedMethod, PaginateOptions, } from "./helpers/paginate.js";
10
+ export { createRefs, findBusinessByRef, findBusinessPaged, listAllBusinesses, listAllEnvironments, resolveBusiness, resolveEnvironment, } from "./helpers/refs.js";
11
+ export type { BusinessListSource, EnvironmentListSource, LookupOptions, RefSource, Refs, } from "./helpers/refs.js";
12
+ export { poll } from "./helpers/poll.js";
13
+ export type { PollOptions, PollResult } from "./helpers/poll.js";
14
+ export { waitForFrontendBuild } from "./helpers/wait-for-frontend-build.js";
15
+ export type { BuildDiagnostic, BuildWaitResult, BuildWaitStatus, FrontendStatusSource, } from "./helpers/wait-for-frontend-build.js";
16
+ export { createTransport, CLIENT_HEADER, REDIRECT_NOT_FOLLOWED, REQUEST_TIMEOUT_MS, SURFACE_HEADER, } from "./transport.js";
17
+ export type { CreateTransportOptions, OrganizationSummary, OrganizationsResponse, RawRequestOptions, RawResponse, RetryMode, RetryOptions, Transport, TransportRequestOptions, } from "./transport.js";
18
+ export { bearerCredentials, cliExchangeCredentials, consumerCredentials, isExchangeCredential, } from "./credentials.js";
19
+ export type { AccessGrant, AccessTokenRequest, CredentialContext, CredentialSource, } from "./credentials.js";
20
+ export { FartherShoreError, FartherShoreTransportError } from "./errors.js";
21
+ export type { FartherShoreErrorJSON, FartherShoreErrorOptions, RetryDisposition, TransportErrorCode, } from "./errors.js";
22
+ export { diagnosticsOf, errorEnvelopeOf } from "./envelope.js";
23
+ export type { ErrorEnvelope } from "./envelope.js";
24
+ export { CLIENT_VERSION } from "./version.js";
@@ -0,0 +1,240 @@
1
+ import type { AgentConfig } from "../types.js";
2
+ type BusinessRef = {
3
+ businessId: string;
4
+ };
5
+ type AgentRef = BusinessRef & {
6
+ role: string;
7
+ };
8
+ export declare const agentOperations: {
9
+ "agents.list": import("./define.js").OperationEntry<BusinessRef, {
10
+ agents: import("../generated/schemas.js").components["schemas"]["Agent"][];
11
+ availableRoles: string[];
12
+ }, {
13
+ agents: import("../generated/schemas.js").components["schemas"]["Agent"][];
14
+ availableRoles: string[];
15
+ }>;
16
+ "agents.status": import("./define.js").OperationEntry<AgentRef, {
17
+ id: string;
18
+ role: string;
19
+ enabled: boolean;
20
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
21
+ lastRunAt: string | null;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ recentRuns: import("../generated/schemas.js").components["schemas"]["AgentRun"][];
25
+ usage: {
26
+ tokensIn: number;
27
+ tokensOut: number;
28
+ actionsCount: number;
29
+ };
30
+ catalog: import("../generated/schemas.js").components["schemas"]["AgentCatalogEntry"][];
31
+ }, {
32
+ id: string;
33
+ role: string;
34
+ enabled: boolean;
35
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
36
+ lastRunAt: string | null;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ recentRuns: import("../generated/schemas.js").components["schemas"]["AgentRun"][];
40
+ usage: {
41
+ tokensIn: number;
42
+ tokensOut: number;
43
+ actionsCount: number;
44
+ };
45
+ catalog: import("../generated/schemas.js").components["schemas"]["AgentCatalogEntry"][];
46
+ }>;
47
+ "agents.runs.show": import("./define.js").OperationEntry<BusinessRef & {
48
+ role: string;
49
+ } & {
50
+ runId: string;
51
+ }, {
52
+ run: {
53
+ id: string;
54
+ status: "queued" | "dispatched" | "succeeded" | "failed" | "stale";
55
+ trigger: "tick" | "manual";
56
+ dispatchedAt: string | null;
57
+ finishedAt: string | null;
58
+ errorCode: string | null;
59
+ errorMessage: string | null;
60
+ createdAt: string;
61
+ degraded: boolean;
62
+ result: {
63
+ [key: string]: unknown;
64
+ } | null;
65
+ trace: {
66
+ [key: string]: unknown;
67
+ } | null;
68
+ };
69
+ launches: import("../generated/schemas.js").components["schemas"]["AgentLaunch"][];
70
+ actions: import("../generated/schemas.js").components["schemas"]["AgentAction"][];
71
+ }, {
72
+ run: {
73
+ id: string;
74
+ status: "queued" | "dispatched" | "succeeded" | "failed" | "stale";
75
+ trigger: "tick" | "manual";
76
+ dispatchedAt: string | null;
77
+ finishedAt: string | null;
78
+ errorCode: string | null;
79
+ errorMessage: string | null;
80
+ createdAt: string;
81
+ degraded: boolean;
82
+ result: {
83
+ [key: string]: unknown;
84
+ } | null;
85
+ trace: {
86
+ [key: string]: unknown;
87
+ } | null;
88
+ };
89
+ launches: import("../generated/schemas.js").components["schemas"]["AgentLaunch"][];
90
+ actions: import("../generated/schemas.js").components["schemas"]["AgentAction"][];
91
+ }>;
92
+ "agents.enable": import("./define.js").OperationEntry<BusinessRef & {
93
+ role: string;
94
+ } & {
95
+ config?: AgentConfig;
96
+ }, {
97
+ id: string;
98
+ role: string;
99
+ enabled: boolean;
100
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
101
+ lastRunAt: string | null;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ }, {
105
+ id: string;
106
+ role: string;
107
+ enabled: boolean;
108
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
109
+ lastRunAt: string | null;
110
+ createdAt: string;
111
+ updatedAt: string;
112
+ }>;
113
+ "agents.disable": import("./define.js").OperationEntry<BusinessRef & {
114
+ role: string;
115
+ } & {
116
+ config?: AgentConfig;
117
+ }, {
118
+ id: string;
119
+ role: string;
120
+ enabled: boolean;
121
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
122
+ lastRunAt: string | null;
123
+ createdAt: string;
124
+ updatedAt: string;
125
+ }, {
126
+ id: string;
127
+ role: string;
128
+ enabled: boolean;
129
+ config: import("../generated/schemas.js").components["schemas"]["AgentConfig"];
130
+ lastRunAt: string | null;
131
+ createdAt: string;
132
+ updatedAt: string;
133
+ }>;
134
+ "bulletin.list": import("./define.js").OperationEntry<BusinessRef & {
135
+ kind?: string;
136
+ status?: string;
137
+ cursor?: string;
138
+ limit?: number | string;
139
+ }, {
140
+ items: import("../generated/schemas.js").components["schemas"]["BulletinPost"][];
141
+ nextCursor: string | null;
142
+ }, {
143
+ items: import("../generated/schemas.js").components["schemas"]["BulletinPost"][];
144
+ nextCursor: string | null;
145
+ }>;
146
+ "bulletin.read": import("./define.js").OperationEntry<BusinessRef & {
147
+ postId: string;
148
+ }, {
149
+ id: string;
150
+ kind: string;
151
+ role: string;
152
+ title: string;
153
+ body: string;
154
+ dataJson: {
155
+ [key: string]: unknown;
156
+ };
157
+ severity: string;
158
+ status: string;
159
+ changeSetId: string | null;
160
+ createdAt: string;
161
+ updatedAt: string;
162
+ }, {
163
+ id: string;
164
+ kind: string;
165
+ role: string;
166
+ title: string;
167
+ body: string;
168
+ dataJson: {
169
+ [key: string]: unknown;
170
+ };
171
+ severity: string;
172
+ status: string;
173
+ changeSetId: string | null;
174
+ createdAt: string;
175
+ updatedAt: string;
176
+ }>;
177
+ "bulletin.ack": import("./define.js").OperationEntry<BusinessRef & {
178
+ postId: string;
179
+ }, {
180
+ id: string;
181
+ kind: string;
182
+ role: string;
183
+ title: string;
184
+ body: string;
185
+ dataJson: {
186
+ [key: string]: unknown;
187
+ };
188
+ severity: string;
189
+ status: string;
190
+ changeSetId: string | null;
191
+ createdAt: string;
192
+ updatedAt: string;
193
+ }, {
194
+ id: string;
195
+ kind: string;
196
+ role: string;
197
+ title: string;
198
+ body: string;
199
+ dataJson: {
200
+ [key: string]: unknown;
201
+ };
202
+ severity: string;
203
+ status: string;
204
+ changeSetId: string | null;
205
+ createdAt: string;
206
+ updatedAt: string;
207
+ }>;
208
+ "bulletin.resolve": import("./define.js").OperationEntry<BusinessRef & {
209
+ postId: string;
210
+ }, {
211
+ id: string;
212
+ kind: string;
213
+ role: string;
214
+ title: string;
215
+ body: string;
216
+ dataJson: {
217
+ [key: string]: unknown;
218
+ };
219
+ severity: string;
220
+ status: string;
221
+ changeSetId: string | null;
222
+ createdAt: string;
223
+ updatedAt: string;
224
+ }, {
225
+ id: string;
226
+ kind: string;
227
+ role: string;
228
+ title: string;
229
+ body: string;
230
+ dataJson: {
231
+ [key: string]: unknown;
232
+ };
233
+ severity: string;
234
+ status: string;
235
+ changeSetId: string | null;
236
+ createdAt: string;
237
+ updatedAt: string;
238
+ }>;
239
+ };
240
+ export {};
@@ -0,0 +1,174 @@
1
+ import { type RequestBody } from "./define.js";
2
+ type BusinessRef = {
3
+ businessId: string;
4
+ };
5
+ type AgreementRef = BusinessRef & {
6
+ agreementId: string;
7
+ };
8
+ export declare const agreementOperations: {
9
+ "agreements.read": import("./define.js").OperationEntry<BusinessRef & {
10
+ subjectId?: string;
11
+ environmentId?: string;
12
+ limit?: number;
13
+ offset?: number;
14
+ }, {
15
+ data: import("../generated/schemas.js").components["schemas"]["EconomicAgreement"][];
16
+ pagination: {
17
+ total: number;
18
+ limit: number;
19
+ offset: number;
20
+ hasMore: boolean;
21
+ };
22
+ }, {
23
+ data: import("../generated/schemas.js").components["schemas"]["EconomicAgreement"][];
24
+ pagination: {
25
+ total: number;
26
+ limit: number;
27
+ offset: number;
28
+ hasMore: boolean;
29
+ };
30
+ }>;
31
+ "agreements.get": import("./define.js").OperationEntry<AgreementRef, {
32
+ id: string;
33
+ environmentId: string | null;
34
+ subjectId: string;
35
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
36
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
37
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
38
+ effectiveAt: string;
39
+ expiresAt: string | null;
40
+ createdAt: string;
41
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
42
+ }, {
43
+ id: string;
44
+ environmentId: string | null;
45
+ subjectId: string;
46
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
47
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
48
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
49
+ effectiveAt: string;
50
+ expiresAt: string | null;
51
+ createdAt: string;
52
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
53
+ }>;
54
+ "agreements.pins": import("./define.js").OperationEntry<BusinessRef & {
55
+ subjectId: string;
56
+ }, {
57
+ subjectId: string;
58
+ environmentId: string | null;
59
+ recurringPricePin: {
60
+ planKey: string;
61
+ version: number;
62
+ recurringFeeCents: number;
63
+ billingInterval: string;
64
+ } | null;
65
+ usagePricingBinding: {
66
+ source: "agreement";
67
+ agreementId: string;
68
+ binding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
69
+ } | {
70
+ source: "plan_default";
71
+ mode: "current";
72
+ };
73
+ migrateToLatest: {
74
+ status: "deferred";
75
+ };
76
+ }, {
77
+ subjectId: string;
78
+ environmentId: string | null;
79
+ recurringPricePin: {
80
+ planKey: string;
81
+ version: number;
82
+ recurringFeeCents: number;
83
+ billingInterval: string;
84
+ } | null;
85
+ usagePricingBinding: {
86
+ source: "agreement";
87
+ agreementId: string;
88
+ binding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
89
+ } | {
90
+ source: "plan_default";
91
+ mode: "current";
92
+ };
93
+ migrateToLatest: {
94
+ status: "deferred";
95
+ };
96
+ }>;
97
+ "agreements.previewCreate": import("./define.js").OperationEntry<BusinessRef & {
98
+ body: RequestBody;
99
+ }, {
100
+ effect: import("../generated/schemas.js").components["schemas"]["AgreementCreateEffect"];
101
+ confirmationToken: string;
102
+ }, {
103
+ effect: import("../generated/schemas.js").components["schemas"]["AgreementCreateEffect"];
104
+ confirmationToken: string;
105
+ }>;
106
+ "agreements.create": import("./define.js").OperationEntry<BusinessRef & {
107
+ body: RequestBody & {
108
+ confirmationToken: string;
109
+ };
110
+ }, {
111
+ id: string;
112
+ environmentId: string | null;
113
+ subjectId: string;
114
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
115
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
116
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
117
+ effectiveAt: string;
118
+ expiresAt: string | null;
119
+ createdAt: string;
120
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
121
+ }, {
122
+ id: string;
123
+ environmentId: string | null;
124
+ subjectId: string;
125
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
126
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
127
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
128
+ effectiveAt: string;
129
+ expiresAt: string | null;
130
+ createdAt: string;
131
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
132
+ }>;
133
+ "agreements.previewAmend": import("./define.js").OperationEntry<BusinessRef & {
134
+ agreementId: string;
135
+ } & {
136
+ body: RequestBody;
137
+ }, {
138
+ effect: import("../generated/schemas.js").components["schemas"]["AgreementAmendEffect"];
139
+ confirmationToken: string;
140
+ }, {
141
+ effect: import("../generated/schemas.js").components["schemas"]["AgreementAmendEffect"];
142
+ confirmationToken: string;
143
+ }>;
144
+ "agreements.amend": import("./define.js").OperationEntry<BusinessRef & {
145
+ agreementId: string;
146
+ } & {
147
+ body: RequestBody & {
148
+ confirmationToken: string;
149
+ };
150
+ }, {
151
+ id: string;
152
+ environmentId: string | null;
153
+ subjectId: string;
154
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
155
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
156
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
157
+ effectiveAt: string;
158
+ expiresAt: string | null;
159
+ createdAt: string;
160
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
161
+ }, {
162
+ id: string;
163
+ environmentId: string | null;
164
+ subjectId: string;
165
+ usagePricingBinding: import("../generated/schemas.js").components["schemas"]["AgreementUsagePricingBinding"];
166
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
167
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
168
+ effectiveAt: string;
169
+ expiresAt: string | null;
170
+ createdAt: string;
171
+ contractPricingVersions: import("../generated/schemas.js").components["schemas"]["ContractPricingVersion"][];
172
+ }>;
173
+ };
174
+ export {};