@farthershore/client 0.4.0 → 0.6.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.
- package/CHANGELOG.md +18 -0
- package/README.md +11 -5
- package/dist/index.js +194 -299
- package/dist/types/api.generated.d.ts +20 -92
- package/dist/types/credentials.d.ts +6 -2
- package/dist/types/generated/schemas.d.ts +119 -281
- package/dist/types/helpers/refs.d.ts +2 -2
- package/dist/types/operations/billing.d.ts +4 -11
- package/dist/types/operations/businesses.d.ts +17 -18
- package/dist/types/operations/consumers.d.ts +37 -0
- package/dist/types/operations/define.d.ts +7 -1
- package/dist/types/operations/index.d.ts +112 -237
- package/dist/types/operations/organizations.d.ts +0 -12
- package/dist/types/operations/platform.d.ts +6 -6
- package/dist/types/operations/portal.d.ts +43 -0
- package/dist/types/operations/webhooks.d.ts +2 -2
- package/dist/types/transport.d.ts +2 -0
- package/dist/types/types.d.ts +27 -32
- package/dist/types/version.d.ts +2 -2
- package/package.json +1 -1
- package/dist/types/operations/agreements.d.ts +0 -174
|
@@ -65,7 +65,7 @@ export declare function listAllEnvironments(source: EnvironmentListSource, busin
|
|
|
65
65
|
export declare function resolveBusiness(source: BusinessListSource, ref: string, options?: LookupOptions): Promise<string>;
|
|
66
66
|
/** Resolve an environment name (case-insensitive) or id to its row. */
|
|
67
67
|
export declare function resolveEnvironment(source: EnvironmentListSource, businessId: string, ref: string, options?: LookupOptions): Promise<EnvironmentSummary>;
|
|
68
|
-
/** Reference
|
|
68
|
+
/** Reference lookups bound to one client. */
|
|
69
69
|
export type Refs = {
|
|
70
70
|
/** A business id, slug, name or hostname → the business id. */
|
|
71
71
|
business(slugOrId: string, options?: LookupOptions): Promise<string>;
|
|
@@ -73,7 +73,7 @@ export type Refs = {
|
|
|
73
73
|
environment(businessId: string, nameOrId: string, options?: LookupOptions): Promise<EnvironmentSummary>;
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
|
-
* Bind the
|
|
76
|
+
* Bind the lookups to a client:
|
|
77
77
|
*
|
|
78
78
|
* ```ts
|
|
79
79
|
* const refs = createRefs(fs);
|
|
@@ -5,24 +5,17 @@ type BusinessRef = {
|
|
|
5
5
|
export declare const billingOperations: {
|
|
6
6
|
"billing.stripe.read": import("./define.js").OperationEntry<BusinessRef, {
|
|
7
7
|
connected: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
reconnectRequired?: true;
|
|
9
|
+
source: "organization";
|
|
10
10
|
chargesEnabled: boolean;
|
|
11
11
|
cardPaymentsEnabled: boolean;
|
|
12
12
|
}, {
|
|
13
13
|
connected: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
reconnectRequired?: true;
|
|
15
|
+
source: "organization";
|
|
16
16
|
chargesEnabled: boolean;
|
|
17
17
|
cardPaymentsEnabled: boolean;
|
|
18
18
|
}, false>;
|
|
19
|
-
"billing.stripe.delete": import("./define.js").OperationEntry<BusinessRef & {
|
|
20
|
-
deleteAccount?: boolean;
|
|
21
|
-
}, {
|
|
22
|
-
disconnected: true;
|
|
23
|
-
}, {
|
|
24
|
-
disconnected: true;
|
|
25
|
-
}, false>;
|
|
26
19
|
"billing.taxSettings.read": import("./define.js").OperationEntry<BusinessRef, {
|
|
27
20
|
status: "active" | "pending";
|
|
28
21
|
defaults: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BrandAssetUploadResult, PublishBusinessBody } from "../types.js";
|
|
2
|
-
import { type ListQuery
|
|
1
|
+
import type { BrandAssetUploadResult, BusinessUpdateInput, PublishBusinessBody } from "../types.js";
|
|
2
|
+
import { type ListQuery } from "./define.js";
|
|
3
3
|
type BusinessRef = {
|
|
4
4
|
businessId: string;
|
|
5
5
|
};
|
|
@@ -108,6 +108,9 @@ export declare const businessOperations: {
|
|
|
108
108
|
previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
|
|
109
109
|
createdAt: string;
|
|
110
110
|
updatedAt: string;
|
|
111
|
+
usageUnitLabels?: {
|
|
112
|
+
[key: string]: string;
|
|
113
|
+
};
|
|
111
114
|
environments: import("../generated/schemas.js").components["schemas"]["BusinessEnvironment"][];
|
|
112
115
|
}, {
|
|
113
116
|
id: string;
|
|
@@ -139,6 +142,9 @@ export declare const businessOperations: {
|
|
|
139
142
|
previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
|
|
140
143
|
createdAt: string;
|
|
141
144
|
updatedAt: string;
|
|
145
|
+
usageUnitLabels?: {
|
|
146
|
+
[key: string]: string;
|
|
147
|
+
};
|
|
142
148
|
environments: import("../generated/schemas.js").components["schemas"]["BusinessEnvironment"][];
|
|
143
149
|
}, false>;
|
|
144
150
|
"businesses.create": import("./define.js").OperationEntry<{
|
|
@@ -169,7 +175,6 @@ export declare const businessOperations: {
|
|
|
169
175
|
agentsMdUrl: string;
|
|
170
176
|
};
|
|
171
177
|
}, false>;
|
|
172
|
-
"businesses.delete": import("./define.js").OperationEntry<BusinessRef, void, void, false>;
|
|
173
178
|
"businesses.routes.read": import("./define.js").OperationEntry<EnvScoped, {
|
|
174
179
|
routes: import("../generated/schemas.js").components["schemas"]["BusinessRoute"][];
|
|
175
180
|
}, {
|
|
@@ -343,18 +348,6 @@ export declare const businessOperations: {
|
|
|
343
348
|
updatedAt: string;
|
|
344
349
|
_release: import("../generated/schemas.js").components["schemas"]["PublishRelease"];
|
|
345
350
|
}, true>;
|
|
346
|
-
"businesses.rollback": import("./define.js").OperationEntry<BusinessRef & {
|
|
347
|
-
workflowExecutionId: string;
|
|
348
|
-
reason?: string;
|
|
349
|
-
}, {
|
|
350
|
-
businessId: string;
|
|
351
|
-
status: string;
|
|
352
|
-
rollbackWorkflowExecutionId: string;
|
|
353
|
-
}, {
|
|
354
|
-
businessId: string;
|
|
355
|
-
status: string;
|
|
356
|
-
rollbackWorkflowExecutionId: string;
|
|
357
|
-
}, false>;
|
|
358
351
|
"businesses.compile": import("./define.js").OperationEntry<BusinessRef & {
|
|
359
352
|
ir: unknown;
|
|
360
353
|
env?: string;
|
|
@@ -405,7 +398,7 @@ export declare const businessOperations: {
|
|
|
405
398
|
"businesses.brand.update": import("./define.js").OperationEntry<BusinessRef & {
|
|
406
399
|
env?: string;
|
|
407
400
|
} & {
|
|
408
|
-
body:
|
|
401
|
+
body: BusinessUpdateInput;
|
|
409
402
|
}, {
|
|
410
403
|
id: string;
|
|
411
404
|
organizationId: string | null;
|
|
@@ -478,7 +471,7 @@ export declare const businessOperations: {
|
|
|
478
471
|
"businesses.previewEnv.set": import("./define.js").OperationEntry<BusinessRef & {
|
|
479
472
|
env?: string;
|
|
480
473
|
} & {
|
|
481
|
-
body:
|
|
474
|
+
body: BusinessUpdateInput;
|
|
482
475
|
}, {
|
|
483
476
|
id: string;
|
|
484
477
|
organizationId: string | null;
|
|
@@ -665,7 +658,7 @@ export declare const businessOperations: {
|
|
|
665
658
|
"businesses.cors.update": import("./define.js").OperationEntry<BusinessRef & {
|
|
666
659
|
env?: string;
|
|
667
660
|
} & {
|
|
668
|
-
body:
|
|
661
|
+
body: BusinessUpdateInput;
|
|
669
662
|
}, {
|
|
670
663
|
id: string;
|
|
671
664
|
organizationId: string | null;
|
|
@@ -757,6 +750,9 @@ export declare const businessOperations: {
|
|
|
757
750
|
previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
|
|
758
751
|
createdAt: string;
|
|
759
752
|
updatedAt: string;
|
|
753
|
+
usageUnitLabels?: {
|
|
754
|
+
[key: string]: string;
|
|
755
|
+
};
|
|
760
756
|
environments: import("../generated/schemas.js").components["schemas"]["BusinessEnvironment"][];
|
|
761
757
|
}, {
|
|
762
758
|
id: string;
|
|
@@ -788,6 +784,9 @@ export declare const businessOperations: {
|
|
|
788
784
|
previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
|
|
789
785
|
createdAt: string;
|
|
790
786
|
updatedAt: string;
|
|
787
|
+
usageUnitLabels?: {
|
|
788
|
+
[key: string]: string;
|
|
789
|
+
};
|
|
791
790
|
environments: import("../generated/schemas.js").components["schemas"]["BusinessEnvironment"][];
|
|
792
791
|
}, false>;
|
|
793
792
|
"businesses.rbac.enable": import("./define.js").OperationEntry<BusinessRef, {
|
|
@@ -161,6 +161,43 @@ export declare const consumerOperations: {
|
|
|
161
161
|
}, {
|
|
162
162
|
apiKeys: import("../generated/schemas.js").components["schemas"]["ConsumerApiKey"][];
|
|
163
163
|
}, false>;
|
|
164
|
+
"consumers.balance.read": import("./define.js").OperationEntry<SubscriberRef, {
|
|
165
|
+
subscriberId: string;
|
|
166
|
+
balances: {
|
|
167
|
+
unit: {
|
|
168
|
+
key: string;
|
|
169
|
+
kind: "money" | "credits";
|
|
170
|
+
code: string;
|
|
171
|
+
displayName: string;
|
|
172
|
+
};
|
|
173
|
+
available: string;
|
|
174
|
+
granted: string;
|
|
175
|
+
revoked: string;
|
|
176
|
+
consumed: string;
|
|
177
|
+
exhausted: boolean;
|
|
178
|
+
source: "live" | "estimate";
|
|
179
|
+
asOf: string;
|
|
180
|
+
environment: string | null;
|
|
181
|
+
}[];
|
|
182
|
+
}, {
|
|
183
|
+
subscriberId: string;
|
|
184
|
+
balances: {
|
|
185
|
+
unit: {
|
|
186
|
+
key: string;
|
|
187
|
+
kind: "money" | "credits";
|
|
188
|
+
code: string;
|
|
189
|
+
displayName: string;
|
|
190
|
+
};
|
|
191
|
+
available: string;
|
|
192
|
+
granted: string;
|
|
193
|
+
revoked: string;
|
|
194
|
+
consumed: string;
|
|
195
|
+
exhausted: boolean;
|
|
196
|
+
source: "live" | "estimate";
|
|
197
|
+
asOf: string;
|
|
198
|
+
environment: string | null;
|
|
199
|
+
}[];
|
|
200
|
+
}, false>;
|
|
164
201
|
"consumers.apiKeys.revoke": import("./define.js").OperationEntry<SubscriberRef & {
|
|
165
202
|
keyId: string;
|
|
166
203
|
}, void, void, false>;
|
|
@@ -71,7 +71,13 @@ export declare function previewOperation<I, O, W = O>(entry: Omit<OperationEntry
|
|
|
71
71
|
export type InputOf<E> = E extends OperationEntry<infer I, unknown> ? I : never;
|
|
72
72
|
/** Output type of an entry. */
|
|
73
73
|
export type OutputOf<E> = E extends OperationEntry<never, infer O, any> ? O : never;
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Encode one caller-supplied value without letting it alter the path shape.
|
|
76
|
+
* `encodeURIComponent` leaves `.` and `..` intact, and URL normalization would
|
|
77
|
+
* resolve them against the route (`/businesses/b/runtime-tokens/..` is
|
|
78
|
+
* `/businesses/b/`), so those, empty values and non-strings are refused: the
|
|
79
|
+
* request a value builds must be the route the operation names.
|
|
80
|
+
*/
|
|
75
81
|
export declare function seg(value: string): string;
|
|
76
82
|
/**
|
|
77
83
|
* Append a query string. Empty strings and `undefined` are omitted; an array
|