@distilled.cloud/fly-io 1.0.0-rc.4 → 1.0.0-rc.6
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/lib/credentials.d.ts +17 -0
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +39 -7
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +32 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +33 -0
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +27 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +27 -2
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts +5 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +5 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -7
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +505 -28
- package/lib/protocol.js.map +1 -1
- package/lib/services/addons.d.ts +466 -0
- package/lib/services/addons.d.ts.map +1 -0
- package/lib/services/addons.js +613 -0
- package/lib/services/addons.js.map +1 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +3 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/machines.d.ts +1175 -1198
- package/lib/services/machines.d.ts.map +1 -1
- package/lib/services/machines.js +1297 -1310
- package/lib/services/machines.js.map +1 -1
- package/lib/services/mpg.d.ts +376 -0
- package/lib/services/mpg.d.ts.map +1 -0
- package/lib/services/mpg.js +570 -0
- package/lib/services/mpg.js.map +1 -0
- package/lib/services/sprites.d.ts +321 -0
- package/lib/services/sprites.d.ts.map +1 -0
- package/lib/services/sprites.js +407 -0
- package/lib/services/sprites.js.map +1 -0
- package/lib/traits.d.ts +18 -8
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js +13 -3
- package/lib/traits.js.map +1 -1
- package/package.json +37 -13
- package/src/credentials.ts +53 -7
- package/src/errors.ts +39 -0
- package/src/index.ts +31 -1
- package/src/pagination.ts +12 -0
- package/src/protocol.ts +715 -32
- package/src/services/addons.ts +1313 -0
- package/src/services/index.ts +3 -0
- package/src/services/machines.ts +2998 -3049
- package/src/services/mpg.ts +1188 -0
- package/src/services/sprites.ts +917 -0
- package/src/traits.ts +37 -3
package/src/traits.ts
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Fly.io SDK trait surface — hand-written.
|
|
3
3
|
*
|
|
4
4
|
* Re-exports the generic protocol traits from core so generated operations
|
|
5
|
-
* import everything from one place.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* import everything from one place. REST services use the bare-payload and
|
|
6
|
+
* sensitive-value traits; GraphQL add-ons add the operation/response-path
|
|
7
|
+
* envelope traits.
|
|
8
8
|
*/
|
|
9
|
+
import { makeAnnotation } from "@distilled.cloud/core/trait";
|
|
10
|
+
|
|
9
11
|
export {
|
|
10
12
|
Body,
|
|
11
13
|
Header,
|
|
@@ -42,3 +44,35 @@ export {
|
|
|
42
44
|
rawResponseRootSymbol,
|
|
43
45
|
sensitiveValueSymbol,
|
|
44
46
|
} from "@distilled.cloud/core/protocol-rest";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The baked GraphQL document for one add-on operation. The protocol wraps
|
|
50
|
+
* the operation's input as `{ query, operationName, variables }`.
|
|
51
|
+
*/
|
|
52
|
+
export interface GraphQLOpTrait {
|
|
53
|
+
readonly query: string;
|
|
54
|
+
readonly operationName: string;
|
|
55
|
+
readonly type: "query" | "mutation";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const graphqlOpSymbol = Symbol.for("@distilled.cloud/fly-io/graphql-op");
|
|
59
|
+
|
|
60
|
+
/** Marks an operation input with its GraphQL document (`com.flyio.graphql#operation`). */
|
|
61
|
+
export const GraphQLOp = (op: GraphQLOpTrait) =>
|
|
62
|
+
makeAnnotation(graphqlOpSymbol, op);
|
|
63
|
+
|
|
64
|
+
export const responsePathSymbol = Symbol.for(
|
|
65
|
+
"@distilled.cloud/fly-io/graphql-response-path",
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
/** Dotted path under GraphQL `data` (`com.flyio.graphql#responsePath`). */
|
|
69
|
+
export const ResponsePath = (path: string) =>
|
|
70
|
+
makeAnnotation(responsePathSymbol, path);
|
|
71
|
+
|
|
72
|
+
export const graphqlPayloadRootSymbol = Symbol.for(
|
|
73
|
+
"@distilled.cloud/fly-io/graphql-payload-root",
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
/** Marks a response whose entire value is `data.<responsePath>`. */
|
|
77
|
+
export const GraphQLPayloadRoot = () =>
|
|
78
|
+
makeAnnotation(graphqlPayloadRootSymbol, true);
|