@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,47 @@
1
+ type QueryInput = {
2
+ businessId: string;
3
+ /** The verb's query in the analytics DSL (domain, range, filters, …). */
4
+ query: unknown;
5
+ };
6
+ export declare const analyticsOperations: {
7
+ "analytics.timeseries": import("./define.js").OperationEntry<QueryInput, {
8
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTimeseriesBucket"][];
9
+ }, {
10
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTimeseriesBucket"][];
11
+ }>;
12
+ "analytics.latency": import("./define.js").OperationEntry<QueryInput, {
13
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsPercentileRow"][];
14
+ }, {
15
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsPercentileRow"][];
16
+ }>;
17
+ "analytics.top": import("./define.js").OperationEntry<QueryInput, {
18
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTopKRow"][];
19
+ }, {
20
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTopKRow"][];
21
+ }>;
22
+ "analytics.log": import("./define.js").OperationEntry<QueryInput, {
23
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsEventFeedRow"][];
24
+ }, {
25
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsEventFeedRow"][];
26
+ }>;
27
+ "analytics.query": import("./define.js").OperationEntry<QueryInput & {
28
+ verb: string;
29
+ }, {
30
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsEventFeedRow"][];
31
+ } | {
32
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsPercentileRow"][];
33
+ } | {
34
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTimeseriesBucket"][];
35
+ } | {
36
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTopKRow"][];
37
+ }, {
38
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsEventFeedRow"][];
39
+ } | {
40
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsPercentileRow"][];
41
+ } | {
42
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTimeseriesBucket"][];
43
+ } | {
44
+ result: import("../generated/schemas.js").components["schemas"]["AnalyticsTopKRow"][];
45
+ }>;
46
+ };
47
+ export {};
@@ -0,0 +1,90 @@
1
+ import type { NotificationPreferences } from "../types.js";
2
+ type AuditFilter = {
3
+ organizationId: string;
4
+ action?: string;
5
+ actorUserId?: string;
6
+ decision?: string;
7
+ from?: string;
8
+ to?: string;
9
+ limit?: number;
10
+ };
11
+ type BusinessAuditFilter = AuditFilter & {
12
+ businessId: string;
13
+ };
14
+ export declare const auditNotificationOperations: {
15
+ "auditLogs.read": import("./define.js").OperationEntry<AuditFilter & {
16
+ cursor?: string;
17
+ }, {
18
+ items: import("../generated/schemas.js").components["schemas"]["AuditLogEntry"][];
19
+ nextCursor: string | null;
20
+ }, {
21
+ items: import("../generated/schemas.js").components["schemas"]["AuditLogEntry"][];
22
+ nextCursor: string | null;
23
+ }>;
24
+ "auditLogs.business.read": import("./define.js").OperationEntry<AuditFilter & {
25
+ businessId: string;
26
+ } & {
27
+ cursor?: string;
28
+ }, {
29
+ items: import("../generated/schemas.js").components["schemas"]["AuditLogEntry"][];
30
+ nextCursor: string | null;
31
+ }, {
32
+ items: import("../generated/schemas.js").components["schemas"]["AuditLogEntry"][];
33
+ nextCursor: string | null;
34
+ }>;
35
+ "auditLogs.export": import("./define.js").OperationEntry<AuditFilter, string, string>;
36
+ "auditLogs.business.export": import("./define.js").OperationEntry<BusinessAuditFilter, string, string>;
37
+ "notifications.preferences.read": import("./define.js").OperationEntry<{
38
+ businessId: string;
39
+ }, {
40
+ master: boolean;
41
+ categories: {
42
+ billing?: boolean;
43
+ usage?: boolean;
44
+ access?: boolean;
45
+ product?: boolean;
46
+ deployments?: boolean;
47
+ team?: boolean;
48
+ security?: boolean;
49
+ };
50
+ }, {
51
+ master: boolean;
52
+ categories: {
53
+ billing?: boolean;
54
+ usage?: boolean;
55
+ access?: boolean;
56
+ product?: boolean;
57
+ deployments?: boolean;
58
+ team?: boolean;
59
+ security?: boolean;
60
+ };
61
+ }>;
62
+ "notifications.preferences.update": import("./define.js").OperationEntry<{
63
+ businessId: string;
64
+ master?: boolean;
65
+ categories?: NotificationPreferences["categories"];
66
+ }, {
67
+ master: boolean;
68
+ categories: {
69
+ billing?: boolean;
70
+ usage?: boolean;
71
+ access?: boolean;
72
+ product?: boolean;
73
+ deployments?: boolean;
74
+ team?: boolean;
75
+ security?: boolean;
76
+ };
77
+ }, {
78
+ master: boolean;
79
+ categories: {
80
+ billing?: boolean;
81
+ usage?: boolean;
82
+ access?: boolean;
83
+ product?: boolean;
84
+ deployments?: boolean;
85
+ team?: boolean;
86
+ security?: boolean;
87
+ };
88
+ }>;
89
+ };
90
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { CallerContext } from "../types.js";
2
+ export declare const authOperations: {
3
+ "auth.context.read": import("./define.js").OperationEntry<void, CallerContext, CallerContext>;
4
+ "auth.context.issue": import("./define.js").OperationEntry<{
5
+ businessId: string;
6
+ externalOrgId: string;
7
+ actorId: string;
8
+ ttlSeconds?: number;
9
+ }, {
10
+ token: string;
11
+ expiresAt: string;
12
+ }, {
13
+ token: string;
14
+ expiresAt: string;
15
+ }>;
16
+ "auth.listOrganizations": import("./define.js").OperationEntry<void, {
17
+ userId: string;
18
+ organizations: import("../generated/schemas.js").components["schemas"]["CliOrganizationSummary"][];
19
+ }, {
20
+ userId: string;
21
+ organizations: import("../generated/schemas.js").components["schemas"]["CliOrganizationSummary"][];
22
+ }>;
23
+ "auth.selectedOrganization": import("./define.js").OperationEntry<void, string | undefined, string | undefined>;
24
+ };
@@ -0,0 +1,255 @@
1
+ type BusinessRef = {
2
+ businessId: string;
3
+ };
4
+ /**
5
+ * Backends and runtime tokens are per-(business, environment) rows.
6
+ * `environmentId` filters a listing: an environment id, `"production"` for the
7
+ * production rows, or omitted for every scope.
8
+ */
9
+ type ScopeFilter = BusinessRef & {
10
+ environmentId?: string;
11
+ limit?: number;
12
+ offset?: number;
13
+ };
14
+ export declare const backendOperations: {
15
+ "backends.read": import("./define.js").OperationEntry<ScopeFilter, {
16
+ data: import("../generated/schemas.js").components["schemas"]["Backend"][];
17
+ pagination: {
18
+ total: number;
19
+ limit: number;
20
+ offset: number;
21
+ hasMore: boolean;
22
+ };
23
+ scope: "all" | "production" | "environment";
24
+ environmentId: string | null;
25
+ }, {
26
+ data: import("../generated/schemas.js").components["schemas"]["Backend"][];
27
+ pagination: {
28
+ total: number;
29
+ limit: number;
30
+ offset: number;
31
+ hasMore: boolean;
32
+ };
33
+ scope: "all" | "production" | "environment";
34
+ environmentId: string | null;
35
+ }>;
36
+ "backends.create": import("./define.js").OperationEntry<BusinessRef & {
37
+ name: string;
38
+ slug?: string;
39
+ /** `null` (or omitted) is the production scope. */
40
+ environmentId?: string | null;
41
+ transportMode?: "direct" | "tunnel";
42
+ runner?: "embedded" | "sidecar" | null;
43
+ runtime?: string | null;
44
+ originUrl?: string | null;
45
+ isDefault?: boolean;
46
+ }, {
47
+ id: string;
48
+ businessId: string;
49
+ environmentId: string | null;
50
+ name: string;
51
+ slug: string;
52
+ transportMode: "direct" | "tunnel";
53
+ runner: ("embedded" | "sidecar") | null;
54
+ runtime: string | null;
55
+ verificationRequired: boolean;
56
+ originUrl: string | null;
57
+ isDefault: boolean;
58
+ status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
59
+ lastSeenAt: string | null;
60
+ createdAt: string;
61
+ updated?: true;
62
+ }, {
63
+ action: "create" | "update";
64
+ backend: {
65
+ businessId: string;
66
+ environmentId: string | null;
67
+ name: string;
68
+ slug: string;
69
+ transportMode: "direct" | "tunnel";
70
+ runner: ("embedded" | "sidecar") | null;
71
+ runtime: string | null;
72
+ originUrl: string | null;
73
+ isDefault: boolean;
74
+ };
75
+ }>;
76
+ "backends.bind": import("./define.js").OperationEntry<BusinessRef & {
77
+ /** The logical backend slug or id. */
78
+ backend: string;
79
+ environmentId?: string | null;
80
+ originUrl: string;
81
+ }, {
82
+ id: string;
83
+ businessId: string;
84
+ environmentId: string | null;
85
+ name: string;
86
+ slug: string;
87
+ transportMode: "direct" | "tunnel";
88
+ runner: ("embedded" | "sidecar") | null;
89
+ runtime: string | null;
90
+ verificationRequired: boolean;
91
+ originUrl: string | null;
92
+ isDefault: boolean;
93
+ status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
94
+ lastSeenAt: string | null;
95
+ createdAt: string;
96
+ }, {
97
+ id: string;
98
+ businessId: string;
99
+ environmentId: string | null;
100
+ name: string;
101
+ slug: string;
102
+ transportMode: "direct" | "tunnel";
103
+ runner: ("embedded" | "sidecar") | null;
104
+ runtime: string | null;
105
+ verificationRequired: boolean;
106
+ originUrl: string | null;
107
+ isDefault: boolean;
108
+ status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
109
+ lastSeenAt: string | null;
110
+ createdAt: string;
111
+ }>;
112
+ "backends.delete": import("./define.js").OperationEntry<BusinessRef & {
113
+ backendId: string;
114
+ }, {
115
+ id: string;
116
+ deleted: true;
117
+ }, {
118
+ id: string;
119
+ deleted: true;
120
+ }>;
121
+ "runtimeTokens.read": import("./define.js").OperationEntry<ScopeFilter, {
122
+ data: import("../generated/schemas.js").components["schemas"]["RuntimeToken"][];
123
+ pagination: {
124
+ total: number;
125
+ limit: number;
126
+ offset: number;
127
+ hasMore: boolean;
128
+ };
129
+ scope: "all" | "production" | "environment";
130
+ environmentId: string | null;
131
+ }, {
132
+ data: import("../generated/schemas.js").components["schemas"]["RuntimeToken"][];
133
+ pagination: {
134
+ total: number;
135
+ limit: number;
136
+ offset: number;
137
+ hasMore: boolean;
138
+ };
139
+ scope: "all" | "production" | "environment";
140
+ environmentId: string | null;
141
+ }>;
142
+ "runtimeTokens.mint": import("./define.js").OperationEntry<BusinessRef & {
143
+ environmentId?: string | null;
144
+ backendId?: string | null;
145
+ kind?: "live" | "test";
146
+ operations?: string[];
147
+ allowedMeters?: string[];
148
+ allowedRoutes?: string[];
149
+ }, {
150
+ id: string;
151
+ businessId: string;
152
+ environmentId: string | null;
153
+ backendId: string | null;
154
+ kind: "live" | "test";
155
+ lastFour: string;
156
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
157
+ allowedMeters: string[];
158
+ allowedRoutes: string[];
159
+ status: "active" | "revoked";
160
+ rotatedFromId: string | null;
161
+ createdAt: string;
162
+ revokedAt: string | null;
163
+ lastUsedAt: string | null;
164
+ envVar: "FS_RUNTIME_TOKEN";
165
+ token: string;
166
+ }, {
167
+ id: string;
168
+ businessId: string;
169
+ environmentId: string | null;
170
+ backendId: string | null;
171
+ kind: "live" | "test";
172
+ lastFour: string;
173
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
174
+ allowedMeters: string[];
175
+ allowedRoutes: string[];
176
+ status: "active" | "revoked";
177
+ rotatedFromId: string | null;
178
+ createdAt: string;
179
+ revokedAt: string | null;
180
+ lastUsedAt: string | null;
181
+ envVar: "FS_RUNTIME_TOKEN";
182
+ token: string;
183
+ }>;
184
+ "runtimeTokens.rotate": import("./define.js").OperationEntry<BusinessRef & {
185
+ tokenId: string;
186
+ }, {
187
+ id: string;
188
+ businessId: string;
189
+ environmentId: string | null;
190
+ backendId: string | null;
191
+ kind: "live" | "test";
192
+ lastFour: string;
193
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
194
+ allowedMeters: string[];
195
+ allowedRoutes: string[];
196
+ status: "active" | "revoked";
197
+ rotatedFromId: string | null;
198
+ createdAt: string;
199
+ revokedAt: string | null;
200
+ lastUsedAt: string | null;
201
+ envVar: "FS_RUNTIME_TOKEN";
202
+ token: string;
203
+ }, {
204
+ id: string;
205
+ businessId: string;
206
+ environmentId: string | null;
207
+ backendId: string | null;
208
+ kind: "live" | "test";
209
+ lastFour: string;
210
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
211
+ allowedMeters: string[];
212
+ allowedRoutes: string[];
213
+ status: "active" | "revoked";
214
+ rotatedFromId: string | null;
215
+ createdAt: string;
216
+ revokedAt: string | null;
217
+ lastUsedAt: string | null;
218
+ envVar: "FS_RUNTIME_TOKEN";
219
+ token: string;
220
+ }>;
221
+ "runtimeTokens.revoke": import("./define.js").OperationEntry<BusinessRef & {
222
+ tokenId: string;
223
+ }, {
224
+ id: string;
225
+ businessId: string;
226
+ environmentId: string | null;
227
+ backendId: string | null;
228
+ kind: "live" | "test";
229
+ lastFour: string;
230
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
231
+ allowedMeters: string[];
232
+ allowedRoutes: string[];
233
+ status: "active" | "revoked";
234
+ rotatedFromId: string | null;
235
+ createdAt: string;
236
+ revokedAt: string | null;
237
+ lastUsedAt: string | null;
238
+ }, {
239
+ id: string;
240
+ businessId: string;
241
+ environmentId: string | null;
242
+ backendId: string | null;
243
+ kind: "live" | "test";
244
+ lastFour: string;
245
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
246
+ allowedMeters: string[];
247
+ allowedRoutes: string[];
248
+ status: "active" | "revoked";
249
+ rotatedFromId: string | null;
250
+ createdAt: string;
251
+ revokedAt: string | null;
252
+ lastUsedAt: string | null;
253
+ }>;
254
+ };
255
+ export {};
@@ -0,0 +1,71 @@
1
+ import { type RequestBody } from "./define.js";
2
+ type BusinessRef = {
3
+ businessId: string;
4
+ };
5
+ export declare const billingOperations: {
6
+ "billing.stripe.read": import("./define.js").OperationEntry<BusinessRef, {
7
+ connected: boolean;
8
+ source: "business" | "organization";
9
+ isOverride: boolean;
10
+ chargesEnabled: boolean;
11
+ cardPaymentsEnabled: boolean;
12
+ }, {
13
+ connected: boolean;
14
+ source: "business" | "organization";
15
+ isOverride: boolean;
16
+ chargesEnabled: boolean;
17
+ cardPaymentsEnabled: boolean;
18
+ }>;
19
+ "billing.stripe.delete": import("./define.js").OperationEntry<BusinessRef & {
20
+ deleteAccount?: boolean;
21
+ }, {
22
+ disconnected: true;
23
+ }, {
24
+ disconnected: true;
25
+ }>;
26
+ "billing.taxSettings.read": import("./define.js").OperationEntry<BusinessRef, {
27
+ status: "active" | "pending";
28
+ defaults: {
29
+ taxBehavior: ("exclusive" | "inclusive" | "inferred_by_currency") | null;
30
+ taxCode: string | null;
31
+ };
32
+ headOffice: {
33
+ address: import("../generated/schemas.js").components["schemas"]["TaxAddress"];
34
+ } | null;
35
+ missingFields: string[];
36
+ }, {
37
+ status: "active" | "pending";
38
+ defaults: {
39
+ taxBehavior: ("exclusive" | "inclusive" | "inferred_by_currency") | null;
40
+ taxCode: string | null;
41
+ };
42
+ headOffice: {
43
+ address: import("../generated/schemas.js").components["schemas"]["TaxAddress"];
44
+ } | null;
45
+ missingFields: string[];
46
+ }>;
47
+ "billing.taxSettings.update": import("./define.js").OperationEntry<BusinessRef & {
48
+ body: RequestBody;
49
+ }, {
50
+ status: "active" | "pending";
51
+ defaults: {
52
+ taxBehavior: ("exclusive" | "inclusive" | "inferred_by_currency") | null;
53
+ taxCode: string | null;
54
+ };
55
+ headOffice: {
56
+ address: import("../generated/schemas.js").components["schemas"]["TaxAddress"];
57
+ } | null;
58
+ missingFields: string[];
59
+ }, {
60
+ status: "active" | "pending";
61
+ defaults: {
62
+ taxBehavior: ("exclusive" | "inclusive" | "inferred_by_currency") | null;
63
+ taxCode: string | null;
64
+ };
65
+ headOffice: {
66
+ address: import("../generated/schemas.js").components["schemas"]["TaxAddress"];
67
+ } | null;
68
+ missingFields: string[];
69
+ }>;
70
+ };
71
+ export {};