@farthershore/client 0.3.0 → 0.5.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 +16 -0
- package/README.md +10 -2
- package/dist/index.js +221 -111
- package/dist/types/api.generated.d.ts +18 -38
- package/dist/types/credentials.d.ts +6 -2
- package/dist/types/envelope.d.ts +2 -0
- package/dist/types/errors.d.ts +13 -0
- package/dist/types/generated/schemas.d.ts +71 -28
- package/dist/types/helpers/refs.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/operations/agents.d.ts +9 -9
- package/dist/types/operations/agreements.d.ts +7 -7
- package/dist/types/operations/analytics.d.ts +5 -5
- package/dist/types/operations/audit-notifications.d.ts +6 -6
- package/dist/types/operations/auth.d.ts +4 -4
- package/dist/types/operations/backends.d.ts +8 -11
- package/dist/types/operations/billing.d.ts +3 -10
- package/dist/types/operations/businesses.d.ts +29 -30
- package/dist/types/operations/change-sets.d.ts +6 -6
- package/dist/types/operations/consumers.d.ts +13 -13
- package/dist/types/operations/define.d.ts +13 -3
- package/dist/types/operations/environments.d.ts +5 -4
- package/dist/types/operations/frontend.d.ts +2 -2
- package/dist/types/operations/index.d.ts +307 -220
- package/dist/types/operations/maker-tokens.d.ts +9 -9
- package/dist/types/operations/organizations.d.ts +19 -31
- package/dist/types/operations/personas.d.ts +8 -8
- package/dist/types/operations/plans-usage.d.ts +3 -3
- package/dist/types/operations/platform.d.ts +18 -18
- package/dist/types/operations/portal.d.ts +11 -11
- package/dist/types/operations/promo-codes.d.ts +15 -5
- package/dist/types/operations/variables.d.ts +22 -8
- package/dist/types/operations/webhooks.d.ts +107 -14
- package/dist/types/surface-types.d.ts +16 -10
- package/dist/types/types.d.ts +4 -1
- package/dist/types/version.d.ts +2 -2
- package/package.json +1 -1
|
@@ -24,12 +24,14 @@ export type OperationContext = {
|
|
|
24
24
|
* `{ dryRun, wouldHave }` envelope; it is the output itself unless the
|
|
25
25
|
* operation previews a different shape.
|
|
26
26
|
*/
|
|
27
|
-
export type OperationEntry<I, O, W = O> = {
|
|
27
|
+
export type OperationEntry<I, O, W = O, P extends boolean = boolean> = {
|
|
28
28
|
/**
|
|
29
29
|
* The opKey this method serves, or `null` for the few calls that have none
|
|
30
30
|
* (credential introspection, the portal plane).
|
|
31
31
|
*/
|
|
32
32
|
readonly op: string | null;
|
|
33
|
+
/** Literal capability carried into the public method overloads. */
|
|
34
|
+
readonly preview: P;
|
|
33
35
|
/**
|
|
34
36
|
* One line, for a method that is not the opKey's primary method (it shares
|
|
35
37
|
* the opKey with it) or that has no opKey. Primary methods take their
|
|
@@ -62,12 +64,20 @@ export type OperationEntry<I, O, W = O> = {
|
|
|
62
64
|
* (when a preview returns a different shape than the write) the preview's
|
|
63
65
|
* `wouldHave`.
|
|
64
66
|
*/
|
|
65
|
-
export declare function operation<I, O, W = O>(entry: OperationEntry<I, O, W>): OperationEntry<I, O, W>;
|
|
67
|
+
export declare function operation<I, O, W = O>(entry: Omit<OperationEntry<I, O, W, false>, "preview">): OperationEntry<I, O, W, false>;
|
|
68
|
+
/** Declare a primary method whose operation spec supports dry-run previews. */
|
|
69
|
+
export declare function previewOperation<I, O, W = O>(entry: Omit<OperationEntry<I, O, W, true>, "preview">): OperationEntry<I, O, W, true>;
|
|
66
70
|
/** Input type of an entry. */
|
|
67
71
|
export type InputOf<E> = E extends OperationEntry<infer I, unknown> ? I : never;
|
|
68
72
|
/** Output type of an entry. */
|
|
69
73
|
export type OutputOf<E> = E extends OperationEntry<never, infer O, any> ? O : never;
|
|
70
|
-
/**
|
|
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
|
+
*/
|
|
71
81
|
export declare function seg(value: string): string;
|
|
72
82
|
/**
|
|
73
83
|
* Append a query string. Empty strings and `undefined` are omitted; an array
|
|
@@ -21,10 +21,9 @@ export declare const environmentOperations: {
|
|
|
21
21
|
offset: number;
|
|
22
22
|
hasMore: boolean;
|
|
23
23
|
};
|
|
24
|
-
}>;
|
|
24
|
+
}, false>;
|
|
25
25
|
"environments.create": import("./define.js").OperationEntry<{
|
|
26
26
|
businessId: string;
|
|
27
|
-
name: string;
|
|
28
27
|
branch: string;
|
|
29
28
|
}, {
|
|
30
29
|
id: string;
|
|
@@ -34,6 +33,7 @@ export declare const environmentOperations: {
|
|
|
34
33
|
runtimeHostname: string;
|
|
35
34
|
portalHostname: string | null;
|
|
36
35
|
status: string;
|
|
36
|
+
secretInheritanceUnavailableReason?: string | null;
|
|
37
37
|
created: boolean;
|
|
38
38
|
branchCreated: boolean;
|
|
39
39
|
}, {
|
|
@@ -44,12 +44,13 @@ export declare const environmentOperations: {
|
|
|
44
44
|
runtimeHostname: string;
|
|
45
45
|
portalHostname: string | null;
|
|
46
46
|
status: string;
|
|
47
|
+
secretInheritanceUnavailableReason?: string | null;
|
|
47
48
|
created: boolean;
|
|
48
49
|
branchCreated: boolean;
|
|
49
|
-
}>;
|
|
50
|
+
}, false>;
|
|
50
51
|
/** Resolves with no body; an environment already gone also resolves. */
|
|
51
52
|
"environments.delete": import("./define.js").OperationEntry<{
|
|
52
53
|
businessId: string;
|
|
53
54
|
environment: string;
|
|
54
|
-
}, void, void>;
|
|
55
|
+
}, void, void, false>;
|
|
55
56
|
};
|
|
@@ -12,7 +12,7 @@ export declare const frontendOperations: {
|
|
|
12
12
|
status: import("../generated/schemas.js").components["schemas"]["FrontendServeState"];
|
|
13
13
|
releases: import("../generated/schemas.js").components["schemas"]["FrontendRelease"][];
|
|
14
14
|
builds: import("../generated/schemas.js").components["schemas"]["FrontendBuild"][];
|
|
15
|
-
}>;
|
|
15
|
+
}, false>;
|
|
16
16
|
"frontend.rollback": import("./define.js").OperationEntry<{
|
|
17
17
|
businessId: string;
|
|
18
18
|
releaseId: string;
|
|
@@ -27,5 +27,5 @@ export declare const frontendOperations: {
|
|
|
27
27
|
releaseId: string;
|
|
28
28
|
buildId: string;
|
|
29
29
|
environmentId: string | null;
|
|
30
|
-
}>;
|
|
30
|
+
}, true>;
|
|
31
31
|
};
|