@suss/adapter-ruby 0.23.0 → 0.24.1

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/dist/index.d.cts CHANGED
@@ -240,9 +240,57 @@ interface RubyPack {
240
240
  /** Wire protocol for the produced boundary bindings, e.g. "http-graphql". */
241
241
  protocol: string;
242
242
  discovery: RubyDiscoveryPattern[];
243
+ /** The calls the library gives a project for making a request. */
244
+ clients?: RbClientCall[];
243
245
  /** What the library's own database calls look like. The README says how one is matched. */
244
246
  storage?: RbStoragePattern[];
245
247
  }
248
+ /**
249
+ * The calls a library gives a project for making a request. A method
250
+ * that makes one is a client of the boundary that call states, and gets
251
+ * a unit bound to its method and path.
252
+ */
253
+ interface RbClientCall {
254
+ /** The constant the calls hang on, as a project writes it: `Faraday`, `Net::HTTP`. */
255
+ constantName: string;
256
+ /** Method names that state the request method themselves: `get` means GET. */
257
+ verbMethodNames: Record<string, string>;
258
+ /** Where a call states the URL. */
259
+ url: {
260
+ position: number;
261
+ keyword?: string;
262
+ };
263
+ /** Methods on the constant that build a value taking the same calls, `new` for a Faraday connection. */
264
+ receiverBuilders?: string[];
265
+ /** The keyword such a builder takes the base URL under, which comes in front of the path of a call on it. */
266
+ builderUrlKeyword?: string;
267
+ /** What the response object gives a caller, so a test on it reads as a test on a status. */
268
+ response?: RbClientResponse;
269
+ /** A call that sends a request object built somewhere else, which is how Net::HTTP sends anything with a body. */
270
+ requestObject?: {
271
+ /** The method that takes the request object, `request`. */
272
+ attribute: string;
273
+ /** Each request class, as a project writes it, and the method it sends: `Net::HTTP::Get` sends GET. */
274
+ constructors: Record<string, string>;
275
+ /** Where the request class takes the URL. */
276
+ urlPosition: number;
277
+ };
278
+ }
279
+ /**
280
+ * The members a library's response object gives a caller. A caller that
281
+ * tests one of them is saying which statuses it handles, and the
282
+ * checker compares that against what the other side produces.
283
+ */
284
+ interface RbClientResponse {
285
+ /** Members whose value is the status: `status` for Faraday, `code` for Net::HTTP. */
286
+ statusCode?: string[];
287
+ /** Members that say the request succeeded, meaning a status in 200 to 299: `success?`. */
288
+ success?: string[];
289
+ /** Members that give the body: `body`. */
290
+ body?: string[];
291
+ /** Whether a refused request comes back as a response or raises where it was made. */
292
+ failureDelivery?: "response" | "exception";
293
+ }
246
294
  /**
247
295
  * Ruby writes no return type, so a call is matched by what its receiver
248
296
  * inherits from. A model is a class that reaches one of these base classes,
@@ -420,6 +468,8 @@ interface DiscoveryOptions extends BodyReadOptions {
420
468
  absoluteFile?: string;
421
469
  /** What a summary's `location.file` says for a file other than the one being read, which a controller's filters need when an ancestor defines them. */
422
470
  displayPathOf?: (absolute: string) => string;
471
+ /** The run's own facts, which the value evaluator reads a name through. Absent in a test that builds one file by hand. */
472
+ facts?: Database;
423
473
  cache: FileCache;
424
474
  /** Called once per discovered unit whose own body is a method this run can follow calls out of, so the reach walk has a place to start. */
425
475
  onReachSeed?: (raw: RawCodeStructure, seed: ReachSeed) => void;
package/dist/index.d.ts CHANGED
@@ -240,9 +240,57 @@ interface RubyPack {
240
240
  /** Wire protocol for the produced boundary bindings, e.g. "http-graphql". */
241
241
  protocol: string;
242
242
  discovery: RubyDiscoveryPattern[];
243
+ /** The calls the library gives a project for making a request. */
244
+ clients?: RbClientCall[];
243
245
  /** What the library's own database calls look like. The README says how one is matched. */
244
246
  storage?: RbStoragePattern[];
245
247
  }
248
+ /**
249
+ * The calls a library gives a project for making a request. A method
250
+ * that makes one is a client of the boundary that call states, and gets
251
+ * a unit bound to its method and path.
252
+ */
253
+ interface RbClientCall {
254
+ /** The constant the calls hang on, as a project writes it: `Faraday`, `Net::HTTP`. */
255
+ constantName: string;
256
+ /** Method names that state the request method themselves: `get` means GET. */
257
+ verbMethodNames: Record<string, string>;
258
+ /** Where a call states the URL. */
259
+ url: {
260
+ position: number;
261
+ keyword?: string;
262
+ };
263
+ /** Methods on the constant that build a value taking the same calls, `new` for a Faraday connection. */
264
+ receiverBuilders?: string[];
265
+ /** The keyword such a builder takes the base URL under, which comes in front of the path of a call on it. */
266
+ builderUrlKeyword?: string;
267
+ /** What the response object gives a caller, so a test on it reads as a test on a status. */
268
+ response?: RbClientResponse;
269
+ /** A call that sends a request object built somewhere else, which is how Net::HTTP sends anything with a body. */
270
+ requestObject?: {
271
+ /** The method that takes the request object, `request`. */
272
+ attribute: string;
273
+ /** Each request class, as a project writes it, and the method it sends: `Net::HTTP::Get` sends GET. */
274
+ constructors: Record<string, string>;
275
+ /** Where the request class takes the URL. */
276
+ urlPosition: number;
277
+ };
278
+ }
279
+ /**
280
+ * The members a library's response object gives a caller. A caller that
281
+ * tests one of them is saying which statuses it handles, and the
282
+ * checker compares that against what the other side produces.
283
+ */
284
+ interface RbClientResponse {
285
+ /** Members whose value is the status: `status` for Faraday, `code` for Net::HTTP. */
286
+ statusCode?: string[];
287
+ /** Members that say the request succeeded, meaning a status in 200 to 299: `success?`. */
288
+ success?: string[];
289
+ /** Members that give the body: `body`. */
290
+ body?: string[];
291
+ /** Whether a refused request comes back as a response or raises where it was made. */
292
+ failureDelivery?: "response" | "exception";
293
+ }
246
294
  /**
247
295
  * Ruby writes no return type, so a call is matched by what its receiver
248
296
  * inherits from. A model is a class that reaches one of these base classes,
@@ -420,6 +468,8 @@ interface DiscoveryOptions extends BodyReadOptions {
420
468
  absoluteFile?: string;
421
469
  /** What a summary's `location.file` says for a file other than the one being read, which a controller's filters need when an ancestor defines them. */
422
470
  displayPathOf?: (absolute: string) => string;
471
+ /** The run's own facts, which the value evaluator reads a name through. Absent in a test that builds one file by hand. */
472
+ facts?: Database;
423
473
  cache: FileCache;
424
474
  /** Called once per discovered unit whose own body is a method this run can follow calls out of, so the reach walk has a place to start. */
425
475
  onReachSeed?: (raw: RawCodeStructure, seed: ReachSeed) => void;