@rivetkit/engine-api-full 25.5.3

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 (192) hide show
  1. package/dist/browser/cjs/core.js +2297 -0
  2. package/dist/browser/cjs/index.js +3752 -0
  3. package/dist/browser/cjs/serialization.js +1744 -0
  4. package/dist/browser/esm/core.js +2271 -0
  5. package/dist/browser/esm/index.js +3726 -0
  6. package/dist/browser/esm/serialization.js +1717 -0
  7. package/dist/node/core.js +2310 -0
  8. package/dist/node/index.js +3765 -0
  9. package/dist/node/serialization.js +1782 -0
  10. package/package.json +59 -0
  11. package/types/Client.d.ts +241 -0
  12. package/types/api/client/index.d.ts +1 -0
  13. package/types/api/client/requests/ActorsCreateRequest.d.ts +22 -0
  14. package/types/api/client/requests/ActorsDeleteRequest.d.ts +10 -0
  15. package/types/api/client/requests/ActorsGetByIdRequest.d.ts +16 -0
  16. package/types/api/client/requests/ActorsGetOrCreateByIdRequest.d.ts +23 -0
  17. package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +23 -0
  18. package/types/api/client/requests/ActorsGetRequest.d.ts +10 -0
  19. package/types/api/client/requests/ActorsListNamesRequest.d.ts +14 -0
  20. package/types/api/client/requests/ActorsListRequest.d.ts +18 -0
  21. package/types/api/client/requests/index.d.ts +8 -0
  22. package/types/api/index.d.ts +3 -0
  23. package/types/api/resources/datacenters/client/Client.d.ts +34 -0
  24. package/types/api/resources/datacenters/client/index.d.ts +1 -0
  25. package/types/api/resources/datacenters/index.d.ts +1 -0
  26. package/types/api/resources/index.d.ts +5 -0
  27. package/types/api/resources/namespaces/client/Client.d.ts +54 -0
  28. package/types/api/resources/namespaces/client/index.d.ts +1 -0
  29. package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +14 -0
  30. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +12 -0
  31. package/types/api/resources/namespaces/client/requests/index.d.ts +2 -0
  32. package/types/api/resources/namespaces/index.d.ts +1 -0
  33. package/types/api/resources/runners/client/Client.d.ts +61 -0
  34. package/types/api/resources/runners/client/index.d.ts +1 -0
  35. package/types/api/resources/runners/client/requests/RunnersGetRequest.d.ts +10 -0
  36. package/types/api/resources/runners/client/requests/RunnersListNamesRequest.d.ts +14 -0
  37. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +16 -0
  38. package/types/api/resources/runners/client/requests/index.d.ts +3 -0
  39. package/types/api/resources/runners/index.d.ts +1 -0
  40. package/types/api/types/Actor.d.ts +19 -0
  41. package/types/api/types/ActorName.d.ts +6 -0
  42. package/types/api/types/ActorsCreateResponse.d.ts +7 -0
  43. package/types/api/types/ActorsDeleteResponse.d.ts +4 -0
  44. package/types/api/types/ActorsGetByIdResponse.d.ts +7 -0
  45. package/types/api/types/ActorsGetOrCreateByIdResponse.d.ts +8 -0
  46. package/types/api/types/ActorsGetOrCreateResponse.d.ts +8 -0
  47. package/types/api/types/ActorsGetResponse.d.ts +7 -0
  48. package/types/api/types/ActorsListNamesResponse.d.ts +8 -0
  49. package/types/api/types/ActorsListResponse.d.ts +8 -0
  50. package/types/api/types/CrashPolicy.d.ts +9 -0
  51. package/types/api/types/Datacenter.d.ts +8 -0
  52. package/types/api/types/DatacentersListResponse.d.ts +8 -0
  53. package/types/api/types/Namespace.d.ts +10 -0
  54. package/types/api/types/NamespacesCreateResponse.d.ts +7 -0
  55. package/types/api/types/NamespacesGetResponse.d.ts +7 -0
  56. package/types/api/types/NamespacesListResponse.d.ts +8 -0
  57. package/types/api/types/Pagination.d.ts +6 -0
  58. package/types/api/types/RivetId.d.ts +4 -0
  59. package/types/api/types/Runner.d.ts +24 -0
  60. package/types/api/types/RunnersGetResponse.d.ts +7 -0
  61. package/types/api/types/RunnersListNamesResponse.d.ts +8 -0
  62. package/types/api/types/RunnersListResponse.d.ts +8 -0
  63. package/types/api/types/StringHttpAddressHashableMap.d.ts +5 -0
  64. package/types/api/types/StringHttpAddressHashableMapValue.d.ts +7 -0
  65. package/types/api/types/StringTcpAddressHashableMap.d.ts +5 -0
  66. package/types/api/types/StringTcpAddressHashableMapValue.d.ts +7 -0
  67. package/types/api/types/StringUdpAddressHashableMap.d.ts +5 -0
  68. package/types/api/types/StringUdpAddressHashableMapValue.d.ts +7 -0
  69. package/types/api/types/index.d.ts +29 -0
  70. package/types/core/fetcher/APIResponse.d.ts +10 -0
  71. package/types/core/fetcher/Fetcher.d.ts +39 -0
  72. package/types/core/fetcher/Supplier.d.ts +4 -0
  73. package/types/core/fetcher/createRequestUrl.d.ts +1 -0
  74. package/types/core/fetcher/getFetchFn.d.ts +4 -0
  75. package/types/core/fetcher/getHeader.d.ts +1 -0
  76. package/types/core/fetcher/getRequestBody.d.ts +7 -0
  77. package/types/core/fetcher/getResponseBody.d.ts +1 -0
  78. package/types/core/fetcher/index.d.ts +5 -0
  79. package/types/core/fetcher/makeRequest.d.ts +1 -0
  80. package/types/core/fetcher/requestWithRetries.d.ts +1 -0
  81. package/types/core/fetcher/signals.d.ts +11 -0
  82. package/types/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  83. package/types/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  84. package/types/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  85. package/types/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  86. package/types/core/index.d.ts +3 -0
  87. package/types/core/json.d.ts +15 -0
  88. package/types/core/runtime/index.d.ts +1 -0
  89. package/types/core/runtime/runtime.d.ts +9 -0
  90. package/types/core/schemas/Schema.d.ts +87 -0
  91. package/types/core/schemas/builders/bigint/bigint.d.ts +2 -0
  92. package/types/core/schemas/builders/bigint/index.d.ts +1 -0
  93. package/types/core/schemas/builders/date/date.d.ts +2 -0
  94. package/types/core/schemas/builders/date/index.d.ts +1 -0
  95. package/types/core/schemas/builders/enum/enum.d.ts +2 -0
  96. package/types/core/schemas/builders/enum/index.d.ts +1 -0
  97. package/types/core/schemas/builders/index.d.ts +14 -0
  98. package/types/core/schemas/builders/lazy/index.d.ts +3 -0
  99. package/types/core/schemas/builders/lazy/lazy.d.ts +5 -0
  100. package/types/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
  101. package/types/core/schemas/builders/list/index.d.ts +1 -0
  102. package/types/core/schemas/builders/list/list.d.ts +2 -0
  103. package/types/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  104. package/types/core/schemas/builders/literals/index.d.ts +2 -0
  105. package/types/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
  106. package/types/core/schemas/builders/object/index.d.ts +6 -0
  107. package/types/core/schemas/builders/object/object.d.ts +3 -0
  108. package/types/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  109. package/types/core/schemas/builders/object/property.d.ts +8 -0
  110. package/types/core/schemas/builders/object/types.d.ts +31 -0
  111. package/types/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
  112. package/types/core/schemas/builders/object-like/index.d.ts +2 -0
  113. package/types/core/schemas/builders/object-like/types.d.ts +7 -0
  114. package/types/core/schemas/builders/primitives/any.d.ts +1 -0
  115. package/types/core/schemas/builders/primitives/boolean.d.ts +1 -0
  116. package/types/core/schemas/builders/primitives/index.d.ts +5 -0
  117. package/types/core/schemas/builders/primitives/number.d.ts +1 -0
  118. package/types/core/schemas/builders/primitives/string.d.ts +1 -0
  119. package/types/core/schemas/builders/primitives/unknown.d.ts +1 -0
  120. package/types/core/schemas/builders/record/index.d.ts +2 -0
  121. package/types/core/schemas/builders/record/record.d.ts +3 -0
  122. package/types/core/schemas/builders/record/types.d.ts +4 -0
  123. package/types/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
  124. package/types/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
  125. package/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +21 -0
  126. package/types/core/schemas/builders/schema-utils/index.d.ts +4 -0
  127. package/types/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
  128. package/types/core/schemas/builders/set/index.d.ts +1 -0
  129. package/types/core/schemas/builders/set/set.d.ts +2 -0
  130. package/types/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  131. package/types/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  132. package/types/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  133. package/types/core/schemas/builders/union/discriminant.d.ts +5 -0
  134. package/types/core/schemas/builders/union/index.d.ts +4 -0
  135. package/types/core/schemas/builders/union/types.d.ts +13 -0
  136. package/types/core/schemas/builders/union/union.d.ts +4 -0
  137. package/types/core/schemas/index.d.ts +2 -0
  138. package/types/core/schemas/utils/MaybePromise.d.ts +1 -0
  139. package/types/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
  140. package/types/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
  141. package/types/core/schemas/utils/entries.d.ts +1 -0
  142. package/types/core/schemas/utils/filterObject.d.ts +1 -0
  143. package/types/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  144. package/types/core/schemas/utils/isPlainObject.d.ts +1 -0
  145. package/types/core/schemas/utils/keys.d.ts +1 -0
  146. package/types/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  147. package/types/core/schemas/utils/partition.d.ts +1 -0
  148. package/types/errors/RivetError.d.ts +12 -0
  149. package/types/errors/RivetTimeoutError.d.ts +6 -0
  150. package/types/errors/index.d.ts +2 -0
  151. package/types/index.d.ts +4 -0
  152. package/types/serialization/client/index.d.ts +1 -0
  153. package/types/serialization/client/requests/ActorsCreateRequest.d.ts +17 -0
  154. package/types/serialization/client/requests/ActorsGetOrCreateByIdRequest.d.ts +17 -0
  155. package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +17 -0
  156. package/types/serialization/client/requests/index.d.ts +3 -0
  157. package/types/serialization/index.d.ts +3 -0
  158. package/types/serialization/resources/index.d.ts +2 -0
  159. package/types/serialization/resources/namespaces/client/index.d.ts +1 -0
  160. package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +13 -0
  161. package/types/serialization/resources/namespaces/client/requests/index.d.ts +1 -0
  162. package/types/serialization/resources/namespaces/index.d.ts +1 -0
  163. package/types/serialization/types/Actor.d.ts +26 -0
  164. package/types/serialization/types/ActorName.d.ts +12 -0
  165. package/types/serialization/types/ActorsCreateResponse.d.ts +13 -0
  166. package/types/serialization/types/ActorsDeleteResponse.d.ts +10 -0
  167. package/types/serialization/types/ActorsGetByIdResponse.d.ts +13 -0
  168. package/types/serialization/types/ActorsGetOrCreateByIdResponse.d.ts +14 -0
  169. package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +14 -0
  170. package/types/serialization/types/ActorsGetResponse.d.ts +13 -0
  171. package/types/serialization/types/ActorsListNamesResponse.d.ts +15 -0
  172. package/types/serialization/types/ActorsListResponse.d.ts +15 -0
  173. package/types/serialization/types/CrashPolicy.d.ts +10 -0
  174. package/types/serialization/types/Datacenter.d.ts +14 -0
  175. package/types/serialization/types/DatacentersListResponse.d.ts +15 -0
  176. package/types/serialization/types/Namespace.d.ts +16 -0
  177. package/types/serialization/types/NamespacesCreateResponse.d.ts +13 -0
  178. package/types/serialization/types/NamespacesGetResponse.d.ts +13 -0
  179. package/types/serialization/types/NamespacesListResponse.d.ts +15 -0
  180. package/types/serialization/types/Pagination.d.ts +12 -0
  181. package/types/serialization/types/RivetId.d.ts +10 -0
  182. package/types/serialization/types/Runner.d.ts +33 -0
  183. package/types/serialization/types/RunnersGetResponse.d.ts +13 -0
  184. package/types/serialization/types/RunnersListNamesResponse.d.ts +14 -0
  185. package/types/serialization/types/RunnersListResponse.d.ts +15 -0
  186. package/types/serialization/types/StringHttpAddressHashableMap.d.ts +11 -0
  187. package/types/serialization/types/StringHttpAddressHashableMapValue.d.ts +13 -0
  188. package/types/serialization/types/StringTcpAddressHashableMap.d.ts +11 -0
  189. package/types/serialization/types/StringTcpAddressHashableMapValue.d.ts +13 -0
  190. package/types/serialization/types/StringUdpAddressHashableMap.d.ts +11 -0
  191. package/types/serialization/types/StringUdpAddressHashableMapValue.d.ts +13 -0
  192. package/types/serialization/types/index.d.ts +29 -0
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@rivetkit/engine-api-full",
3
+ "version": "25.5.3",
4
+ "repository": "https://github.com/rivet-gg/rivet/tree/main/sdks/typescript",
5
+ "files": [
6
+ "dist",
7
+ "types",
8
+ "core.d.ts",
9
+ "serialization.d.ts"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "node": "./dist/node/index.js",
14
+ "import": "./dist/browser/esm/index.js",
15
+ "require": "./dist/browser/cjs/index.js",
16
+ "default": "./dist/browser/cjs/index.js",
17
+ "types": "./types/index.d.ts"
18
+ },
19
+ "./core": {
20
+ "node": "./dist/node/core.js",
21
+ "import": "./dist/browser/esm/core.js",
22
+ "require": "./dist/browser/cjs/core.js",
23
+ "default": "./dist/browser/cjs/core.js",
24
+ "types": "./types/core/index.d.ts"
25
+ },
26
+ "./serialization": {
27
+ "node": "./dist/node/serialization.js",
28
+ "import": "./dist/browser/esm/serialization.js",
29
+ "require": "./dist/browser/cjs/serialization.js",
30
+ "default": "./dist/browser/cjs/serialization.js",
31
+ "types": "./types/serialization/index.d.ts"
32
+ }
33
+ },
34
+ "types": "./types/index.d.ts",
35
+ "scripts": {
36
+ "compile": "tsc",
37
+ "bundle": "node build.js",
38
+ "build": "pnpm compile && pnpm bundle",
39
+ "prepack": "pnpm run build"
40
+ },
41
+ "dependencies": {
42
+ "form-data": "^4.0.0",
43
+ "js-base64": "^3.7.5",
44
+ "node-fetch": "2",
45
+ "qs": "^6.11.2",
46
+ "readable-stream": "^4.5.2",
47
+ "url-join": "^5.0.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "17.0.33",
51
+ "@types/node-fetch": "2.6.11",
52
+ "@types/qs": "6.9.8",
53
+ "@types/readable-stream": "^4.0.18",
54
+ "@types/url-join": "4.0.1",
55
+ "esbuild": "^0.19.11",
56
+ "prettier": "2.7.1",
57
+ "typescript": "5.8.2"
58
+ }
59
+ }
@@ -0,0 +1,241 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "./core";
5
+ import * as Rivet from "./api/index";
6
+ import { Datacenters } from "./api/resources/datacenters/client/Client";
7
+ import { Namespaces } from "./api/resources/namespaces/client/Client";
8
+ import { Runners } from "./api/resources/runners/client/Client";
9
+ export declare namespace RivetClient {
10
+ interface Options {
11
+ environment: core.Supplier<string>;
12
+ /** Specify a custom URL to connect the client to. */
13
+ baseUrl?: core.Supplier<string>;
14
+ fetcher?: core.FetchFunction;
15
+ }
16
+ interface RequestOptions {
17
+ /** The maximum time to wait for a response in seconds. */
18
+ timeoutInSeconds?: number;
19
+ /** The number of times to retry the request. Defaults to 2. */
20
+ maxRetries?: number;
21
+ /** A hook to abort the request. */
22
+ abortSignal?: AbortSignal;
23
+ /** Additional headers to include in the request. */
24
+ headers?: Record<string, string>;
25
+ }
26
+ }
27
+ export declare class RivetClient {
28
+ protected readonly _options: RivetClient.Options;
29
+ protected _datacenters: Datacenters | undefined;
30
+ protected _namespaces: Namespaces | undefined;
31
+ protected _runners: Runners | undefined;
32
+ constructor(_options: RivetClient.Options);
33
+ get datacenters(): Datacenters;
34
+ get namespaces(): Namespaces;
35
+ get runners(): Runners;
36
+ /**
37
+ * **If key is some & `include_destroyed` is false**
38
+ *
39
+ * 2 round trips:
40
+ *
41
+ * - namespace::ops::resolve_for_name_global
42
+ * - GET /actors/{} (multiple DCs based on actor IDs)
43
+ *
44
+ * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
45
+ * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
46
+ * this means we don't need to fan out to all datacenters (like normal list does).
47
+ *
48
+ * The reason `include_destroyed` has to be false is Epoxy only stores currently active actors. If
49
+ * `include_destroyed` is true, we show all previous iterations of actors with the same key.
50
+ *
51
+ * **Otherwise**
52
+ *
53
+ * 2 round trips:
54
+ *
55
+ * - namespace::ops::resolve_for_name_global
56
+ * - GET /actors (fanout)
57
+ *
58
+ * ## Optimized Alternative Routes
59
+ *
60
+ * For minimal round trips to check if an actor exists for a key, use `GET /actors/by-id`. This
61
+ * does not require fetching the actor's state, so it returns immediately.
62
+ *
63
+ * @param {Rivet.ActorsListRequest} request
64
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @example
67
+ * await client.actorsList({
68
+ * namespace: "namespace"
69
+ * })
70
+ */
71
+ actorsList(request: Rivet.ActorsListRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsListResponse>;
72
+ /**
73
+ * **If actor is created in the current datacenter:**
74
+ *
75
+ * 2 round trips:
76
+ *
77
+ * - namespace::ops::resolve_for_name_global
78
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
79
+ *
80
+ * **If actor is created in a different datacenter:**
81
+ *
82
+ * 3 round trips:
83
+ *
84
+ * - namespace::ops::resolve_for_name_global
85
+ * - POST /actors to remote datacenter
86
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
87
+ *
88
+ * actor::get will always be in the same datacenter.
89
+ *
90
+ * @param {Rivet.ActorsCreateRequest} request
91
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @example
94
+ * await client.actorsCreate({
95
+ * namespace: "namespace",
96
+ * crashPolicy: "restart",
97
+ * name: "name",
98
+ * runnerNameSelector: "runner_name_selector"
99
+ * })
100
+ */
101
+ actorsCreate(request: Rivet.ActorsCreateRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsCreateResponse>;
102
+ /**
103
+ * **If actor exists**
104
+ *
105
+ * 2 round trips:
106
+ *
107
+ * - namespace::ops::resolve_for_name_global
108
+ * - GET /actors/{}
109
+ *
110
+ * **If actor does not exist and is created in the current datacenter:**
111
+ *
112
+ * 2 round trips:
113
+ *
114
+ * - namespace::ops::resolve_for_name_global
115
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
116
+ *
117
+ * **If actor does not exist and is created in a different datacenter:**
118
+ *
119
+ * 3 round trips:
120
+ *
121
+ * - namespace::ops::resolve_for_name_global
122
+ * - POST /actors to remote datacenter
123
+ * - [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)
124
+ *
125
+ * actor::get will always be in the same datacenter.
126
+ *
127
+ * ## Optimized Alternative Routes
128
+ *
129
+ * For minimal round trips to get or create an actor, use `PUT /actors/by-id`. This doesn't
130
+ * require fetching the actor's state from the other datacenter.
131
+ *
132
+ * @param {Rivet.ActorsGetOrCreateRequest} request
133
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @example
136
+ * await client.actorsGetOrCreate({
137
+ * namespace: "namespace",
138
+ * crashPolicy: "restart",
139
+ * key: "key",
140
+ * name: "name",
141
+ * runnerNameSelector: "runner_name_selector"
142
+ * })
143
+ */
144
+ actorsGetOrCreate(request: Rivet.ActorsGetOrCreateRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsGetOrCreateResponse>;
145
+ /**
146
+ * 1 round trip:
147
+ *
148
+ * - namespace::ops::resolve_for_name_global
149
+ *
150
+ * This does not require another round trip since we use stale consistency for the get_id_for_key.
151
+ *
152
+ * @param {Rivet.ActorsGetByIdRequest} request
153
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
154
+ *
155
+ * @example
156
+ * await client.actorsGetById({
157
+ * namespace: "namespace",
158
+ * name: "name",
159
+ * key: "key"
160
+ * })
161
+ */
162
+ actorsGetById(request: Rivet.ActorsGetByIdRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsGetByIdResponse>;
163
+ /**
164
+ * **If actor exists**
165
+ *
166
+ * 1 round trip:
167
+ *
168
+ * - namespace::ops::resolve_for_name_global
169
+ *
170
+ * **If actor does not exist and is created in the current datacenter:**
171
+ *
172
+ * 2 round trips:
173
+ *
174
+ * - namespace::ops::resolve_for_name_global
175
+ * - [pegboard::workflows::actors::keys::allocate_key] Reserve Epoxy key
176
+ *
177
+ * **If actor does not exist and is created in a different datacenter:**
178
+ *
179
+ * 3 round trips:
180
+ *
181
+ * - namespace::ops::resolve_for_name_global
182
+ * - namespace::ops::get (to get namespace name for remote call)
183
+ * - POST /actors to remote datacenter
184
+ *
185
+ * @param {Rivet.ActorsGetOrCreateByIdRequest} request
186
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
187
+ *
188
+ * @example
189
+ * await client.actorsGetOrCreateById({
190
+ * namespace: "namespace",
191
+ * crashPolicy: "restart",
192
+ * key: "key",
193
+ * name: "name",
194
+ * runnerNameSelector: "runner_name_selector"
195
+ * })
196
+ */
197
+ actorsGetOrCreateById(request: Rivet.ActorsGetOrCreateByIdRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsGetOrCreateByIdResponse>;
198
+ /**
199
+ * 2 round trips:
200
+ *
201
+ * - GET /actors/names (fanout)
202
+ * - [api-peer] namespace::ops::resolve_for_name_global
203
+ *
204
+ * @param {Rivet.ActorsListNamesRequest} request
205
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
206
+ *
207
+ * @example
208
+ * await client.actorsListNames({
209
+ * namespace: "namespace"
210
+ * })
211
+ */
212
+ actorsListNames(request: Rivet.ActorsListNamesRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsListNamesResponse>;
213
+ /**
214
+ * 2 round trip:
215
+ *
216
+ * - GET /actors/{}
217
+ * - [api-peer] namespace::ops::resolve_for_name_global
218
+ *
219
+ * @param {Rivet.RivetId} actorId
220
+ * @param {Rivet.ActorsGetRequest} request
221
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
222
+ *
223
+ * @example
224
+ * await client.actorsGet("actor_id")
225
+ */
226
+ actorsGet(actorId: Rivet.RivetId, request?: Rivet.ActorsGetRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsGetResponse>;
227
+ /**
228
+ * 2 round trip:
229
+ *
230
+ * - DELETE /actors/{}
231
+ * - [api-peer] namespace::ops::resolve_for_name_global
232
+ *
233
+ * @param {Rivet.RivetId} actorId
234
+ * @param {Rivet.ActorsDeleteRequest} request
235
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
236
+ *
237
+ * @example
238
+ * await client.actorsDelete("actor_id")
239
+ */
240
+ actorsDelete(actorId: Rivet.RivetId, request?: Rivet.ActorsDeleteRequest, requestOptions?: RivetClient.RequestOptions): Promise<Rivet.ActorsDeleteResponse>;
241
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * namespace: "namespace",
9
+ * crashPolicy: "restart",
10
+ * name: "name",
11
+ * runnerNameSelector: "runner_name_selector"
12
+ * }
13
+ */
14
+ export interface ActorsCreateRequest {
15
+ namespace: string;
16
+ datacenter?: string;
17
+ crashPolicy: Rivet.CrashPolicy;
18
+ input?: string;
19
+ key?: string;
20
+ name: string;
21
+ runnerNameSelector: string;
22
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ActorsDeleteRequest {
9
+ namespace?: string;
10
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * namespace: "namespace",
8
+ * name: "name",
9
+ * key: "key"
10
+ * }
11
+ */
12
+ export interface ActorsGetByIdRequest {
13
+ namespace: string;
14
+ name: string;
15
+ key: string;
16
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * namespace: "namespace",
9
+ * crashPolicy: "restart",
10
+ * key: "key",
11
+ * name: "name",
12
+ * runnerNameSelector: "runner_name_selector"
13
+ * }
14
+ */
15
+ export interface ActorsGetOrCreateByIdRequest {
16
+ namespace: string;
17
+ datacenter?: string;
18
+ crashPolicy: Rivet.CrashPolicy;
19
+ input?: string;
20
+ key: string;
21
+ name: string;
22
+ runnerNameSelector: string;
23
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Rivet from "../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * namespace: "namespace",
9
+ * crashPolicy: "restart",
10
+ * key: "key",
11
+ * name: "name",
12
+ * runnerNameSelector: "runner_name_selector"
13
+ * }
14
+ */
15
+ export interface ActorsGetOrCreateRequest {
16
+ namespace: string;
17
+ datacenter?: string;
18
+ crashPolicy: Rivet.CrashPolicy;
19
+ input?: string;
20
+ key: string;
21
+ name: string;
22
+ runnerNameSelector: string;
23
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ActorsGetRequest {
9
+ namespace?: string;
10
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * namespace: "namespace"
8
+ * }
9
+ */
10
+ export interface ActorsListNamesRequest {
11
+ namespace: string;
12
+ limit?: number;
13
+ cursor?: string;
14
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * namespace: "namespace"
8
+ * }
9
+ */
10
+ export interface ActorsListRequest {
11
+ namespace: string;
12
+ name?: string;
13
+ key?: string;
14
+ actorIds?: string;
15
+ includeDestroyed?: boolean;
16
+ limit?: number;
17
+ cursor?: string;
18
+ }
@@ -0,0 +1,8 @@
1
+ export { type ActorsListRequest } from "./ActorsListRequest";
2
+ export { type ActorsCreateRequest } from "./ActorsCreateRequest";
3
+ export { type ActorsGetOrCreateRequest } from "./ActorsGetOrCreateRequest";
4
+ export { type ActorsGetByIdRequest } from "./ActorsGetByIdRequest";
5
+ export { type ActorsGetOrCreateByIdRequest } from "./ActorsGetOrCreateByIdRequest";
6
+ export { type ActorsListNamesRequest } from "./ActorsListNamesRequest";
7
+ export { type ActorsGetRequest } from "./ActorsGetRequest";
8
+ export { type ActorsDeleteRequest } from "./ActorsDeleteRequest";
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./resources";
3
+ export * from "./client";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import * as Rivet from "../../../index";
6
+ export declare namespace Datacenters {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class Datacenters {
25
+ protected readonly _options: Datacenters.Options;
26
+ constructor(_options: Datacenters.Options);
27
+ /**
28
+ * @param {Datacenters.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @example
31
+ * await client.datacenters.list()
32
+ */
33
+ list(requestOptions?: Datacenters.RequestOptions): Promise<Rivet.DatacentersListResponse>;
34
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,5 @@
1
+ export * as datacenters from "./datacenters";
2
+ export * as namespaces from "./namespaces";
3
+ export * as runners from "./runners";
4
+ export * from "./namespaces/client/requests";
5
+ export * from "./runners/client/requests";
@@ -0,0 +1,54 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import * as Rivet from "../../../index";
6
+ export declare namespace Namespaces {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class Namespaces {
25
+ protected readonly _options: Namespaces.Options;
26
+ constructor(_options: Namespaces.Options);
27
+ /**
28
+ * @param {Rivet.NamespacesListRequest} request
29
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @example
32
+ * await client.namespaces.list()
33
+ */
34
+ list(request?: Rivet.NamespacesListRequest, requestOptions?: Namespaces.RequestOptions): Promise<Rivet.NamespacesListResponse>;
35
+ /**
36
+ * @param {Rivet.NamespacesCreateRequest} request
37
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @example
40
+ * await client.namespaces.create({
41
+ * displayName: "display_name",
42
+ * name: "name"
43
+ * })
44
+ */
45
+ create(request: Rivet.NamespacesCreateRequest, requestOptions?: Namespaces.RequestOptions): Promise<Rivet.NamespacesCreateResponse>;
46
+ /**
47
+ * @param {Rivet.RivetId} namespaceId
48
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @example
51
+ * await client.namespaces.get("namespace_id")
52
+ */
53
+ get(namespaceId: Rivet.RivetId, requestOptions?: Namespaces.RequestOptions): Promise<Rivet.NamespacesGetResponse>;
54
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * displayName: "display_name",
8
+ * name: "name"
9
+ * }
10
+ */
11
+ export interface NamespacesCreateRequest {
12
+ displayName: string;
13
+ name: string;
14
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface NamespacesListRequest {
9
+ limit?: number;
10
+ cursor?: string;
11
+ name?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { type NamespacesListRequest } from "./NamespacesListRequest";
2
+ export { type NamespacesCreateRequest } from "./NamespacesCreateRequest";
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,61 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import * as Rivet from "../../../index";
6
+ export declare namespace Runners {
7
+ interface Options {
8
+ environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class Runners {
25
+ protected readonly _options: Runners.Options;
26
+ constructor(_options: Runners.Options);
27
+ /**
28
+ * @param {Rivet.RunnersListRequest} request
29
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @example
32
+ * await client.runners.list({
33
+ * namespace: "namespace"
34
+ * })
35
+ */
36
+ list(request: Rivet.RunnersListRequest, requestOptions?: Runners.RequestOptions): Promise<Rivet.RunnersListResponse>;
37
+ /**
38
+ * 2 round trips:
39
+ *
40
+ * - GET /runners/names (fanout)
41
+ * - [api-peer] namespace::ops::resolve_for_name_global
42
+ *
43
+ * @param {Rivet.RunnersListNamesRequest} request
44
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @example
47
+ * await client.runners.listNames({
48
+ * namespace: "namespace"
49
+ * })
50
+ */
51
+ listNames(request: Rivet.RunnersListNamesRequest, requestOptions?: Runners.RequestOptions): Promise<Rivet.RunnersListNamesResponse>;
52
+ /**
53
+ * @param {Rivet.RivetId} runnerId
54
+ * @param {Rivet.RunnersGetRequest} request
55
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @example
58
+ * await client.runners.get("runner_id")
59
+ */
60
+ get(runnerId: Rivet.RivetId, request?: Rivet.RunnersGetRequest, requestOptions?: Runners.RequestOptions): Promise<Rivet.RunnersGetResponse>;
61
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests";