carrick 0.3.135 → 0.3.137

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.
@@ -443,10 +443,37 @@ export interface VerifyClientSemanticsRequest extends BaseRequest {
443
443
  * Where one part of a library call sits: argument `arg` (0-based), or, with
444
444
  * `key`, the property `key` of the object passed there (carrick#1616).
445
445
  */
446
- export interface ClaimSlot {
446
+ export interface SlotPosition {
447
447
  arg: number;
448
448
  key?: string;
449
449
  }
450
+ /** A slot of a call (carrick#1616), with the reads amendment 7 adds. */
451
+ export interface ClaimSlot extends SlotPosition {
452
+ /** A member path walked from the value there; `[]` steps into an array element (amendment 7 of carrick#2434). */
453
+ at?: string[];
454
+ /** A rest slot: every element is read (amendment 7). */
455
+ each?: boolean;
456
+ }
457
+ /** A slot that holds a name: also read as a GraphQL document, or as the name of a function or class (amendment 7). */
458
+ export interface NameSlot extends ClaimSlot {
459
+ document?: 'graphql';
460
+ ref?: 'function' | 'class';
461
+ }
462
+ /** How a service writes an op (amendment 7); absent is `call`. */
463
+ export type ClaimForm = 'call' | 'new' | 'set' | 'override' | 'decorate';
464
+ /** The protocol an op speaks (amendment 7); absent is the role's own. */
465
+ export type ClaimProtocol = 'http' | 'graphql' | 'rpc' | 'socket' | 'message';
466
+ /** Two or three slots joined into one name (amendment 7). */
467
+ export interface NameParts {
468
+ parts: ClaimSlot[];
469
+ join?: string;
470
+ }
471
+ /** A name the library fixes (amendment 7). */
472
+ export interface NameLiteral {
473
+ literal: string;
474
+ }
475
+ /** Where an op's name comes from. */
476
+ export type OpNameSource = BoundName | NameParts | NameLiteral | NameSlot;
450
477
  /**
451
478
  * A name the call does not carry: the one the maker's `name` slot bound to
452
479
  * the instance (`maker`), the one the scope member bound (`scope`), or the
@@ -454,7 +481,13 @@ export interface ClaimSlot {
454
481
  * R6a).
455
482
  */
456
483
  export interface BoundName {
457
- bound: 'maker' | 'scope' | 'key';
484
+ bound: 'maker' | 'scope' | 'key' | 'path' | 'export' | 'subscribed';
485
+ /** `path`: the property names walked on the receiver are joined by this (amendment 7). */
486
+ join?: string;
487
+ /** `subscribed`: the handler parameter that is handed the name. */
488
+ param?: number;
489
+ /** `subscribed`: the member path to the name inside that parameter. */
490
+ at?: string[];
458
491
  }
459
492
  /**
460
493
  * Where a router member takes its procedures (#2474 R6a, contract amendment
@@ -462,7 +495,7 @@ export interface BoundName {
462
495
  * whose property values are procedures or nested collections, each named by
463
496
  * its key; nested keys join with `join`.
464
497
  */
465
- export interface Collects extends ClaimSlot {
498
+ export interface Collects extends SlotPosition {
466
499
  join: string;
467
500
  }
468
501
  /**
@@ -471,7 +504,7 @@ export interface Collects extends ClaimSlot {
471
504
  * made the receiver (a mutation object whose `mutate` runs the function its
472
505
  * maker was given).
473
506
  */
474
- export interface RunsSlot extends ClaimSlot {
507
+ export interface RunsSlot extends SlotPosition {
475
508
  bound?: 'maker';
476
509
  }
477
510
  /**
@@ -484,6 +517,8 @@ export interface Yields {
484
517
  param: number;
485
518
  export: string;
486
519
  side: string;
520
+ /** The package that declares `export`, when it is not the claim's own (amendment 7). */
521
+ package?: string;
487
522
  }
488
523
  /**
489
524
  * Where a route handler's request holds its path and method (#2474 R0): the
@@ -537,7 +572,7 @@ export type LibraryClaim = {
537
572
  /** A prefix every name the instance sends gets. */
538
573
  prefix?: ClaimSlot;
539
574
  /** A definition's id or a queue's name: bound to every op that names `{ bound: 'maker' }`. */
540
- name?: ClaimSlot;
575
+ name?: NameSlot;
541
576
  handler?: ClaimSlot;
542
577
  /** The function or client the maker runs (label v2). */
543
578
  runs?: ClaimSlot;
@@ -550,8 +585,10 @@ export type LibraryClaim = {
550
585
  /** A member that returns a receiver bound to a name (a channel, room or queue). */
551
586
  kind: 'scope';
552
587
  member: string;
588
+ /** Amendment 7: absent is `call`; `decorate` is a class decorator whose name prefixes its methods' ops. */
589
+ form?: 'call' | 'decorate';
553
590
  /** Exactly one of `name` and `collects` (#2474 R6a). */
554
- name?: ClaimSlot;
591
+ name?: NameSlot;
555
592
  path?: string[];
556
593
  on?: ClaimOn;
557
594
  of?: string;
@@ -579,7 +616,19 @@ export type LibraryClaim = {
579
616
  on?: ClaimOn;
580
617
  /** The one receiver the op acts on, by its receiver id. */
581
618
  of?: string;
582
- name?: ClaimSlot | BoundName;
619
+ name?: OpNameSource;
620
+ /** Amendment 7: how the service writes the op; absent is `call`. */
621
+ form?: ClaimForm;
622
+ /** Amendment 7: the protocol the op speaks; absent is the role's own. */
623
+ protocol?: ClaimProtocol;
624
+ /** Amendment 7: the op applies only where this slot holds this literal. */
625
+ when?: SlotPosition & {
626
+ literal: string;
627
+ };
628
+ /** Amendment 7: the response a route's receive op sends; `{}` is a response of no stated shape. */
629
+ returns?: {
630
+ result?: ResultShape;
631
+ };
583
632
  payload?: ClaimSlot;
584
633
  handler?: ClaimSlot;
585
634
  ack?: ClaimSlot;
@@ -681,6 +730,10 @@ export interface ListLibrarySurfaceRequest extends BaseRequest {
681
730
  exports?: Record<string, string[]>;
682
731
  /** List each member's handler-parameter members (`handlers`, carrick#2674 S3); default false (carrick#2966). */
683
732
  handlers?: boolean;
733
+ /** List `types[]` widened, with `settable` (carrick#3050); default false. */
734
+ types?: boolean;
735
+ /** The most handler-parameter members the whole listing lists; default 500000 (carrick#3016). */
736
+ max_handler_members?: number;
684
737
  /** List each signature's `result_candidates` (carrick#2817); default false (carrick#2966). */
685
738
  result_candidates?: boolean;
686
739
  }
@@ -1087,6 +1140,13 @@ export interface SurfaceMember {
1087
1140
  * of the hash.
1088
1141
  */
1089
1142
  scope_receiver?: SurfaceReceiver;
1143
+ /**
1144
+ * The event names Node's runtime gives every emitter (`error`,
1145
+ * `newListener`, `removeListener`) that no signature of this member spells,
1146
+ * on a member of the runtime's own `EventEmitter` that takes an event name
1147
+ * (carrick#3032). Runtime-module surfaces only, and left out of the hash.
1148
+ */
1149
+ runtime_events?: string[];
1090
1150
  signatures: SurfaceSignature[];
1091
1151
  }
1092
1152
  /**
@@ -1099,13 +1159,39 @@ export interface SurfaceHandler {
1099
1159
  key?: string;
1100
1160
  params: SurfaceHandlerParam[];
1101
1161
  }
1102
- /** One parameter of a handler, with the members its type declares (none: not listed). */
1162
+ /**
1163
+ * One parameter of a handler whose type declares members (none: not
1164
+ * listed), by the id of its entry in the surface's `handler_types`
1165
+ * (carrick#2977).
1166
+ */
1103
1167
  export interface SurfaceHandlerParam {
1104
1168
  param: number;
1105
1169
  name: string;
1170
+ type_id: number;
1171
+ }
1172
+ /**
1173
+ * One handler-parameter type of a surface (carrick#2977): every parameter
1174
+ * whose printed type, members and export name are equal refers to one entry.
1175
+ */
1176
+ export interface SurfaceHandlerType {
1177
+ /** From 1, in first-reference order within the surface. */
1178
+ id: number;
1106
1179
  /** The parameter's type as the declarations print it, truncated. */
1107
1180
  type: string;
1108
1181
  members: SurfaceHandlerMember[];
1182
+ /** Members the cap of 500 per type dropped (carrick#2966). */
1183
+ dropped: number;
1184
+ /**
1185
+ * The specifier's type-only export that is this type (the same symbol),
1186
+ * declared in the home of the receiver that hands it, every type
1187
+ * parameter defaulted: what a `yields` names, and what `types` lists.
1188
+ */
1189
+ export?: string;
1190
+ }
1191
+ /** A type export some `handler_types` entry names, listed as the one receiver `type` (carrick#2977). */
1192
+ export interface SurfaceTypeExport {
1193
+ export: string;
1194
+ receivers: SurfaceReceiver[];
1109
1195
  }
1110
1196
  /** A member of a handler's parameter, by path from the parameter, to two levels. */
1111
1197
  export interface SurfaceHandlerMember {
@@ -1121,6 +1207,19 @@ export interface SurfaceReceiver {
1121
1207
  call?: SurfaceSignature[];
1122
1208
  construct?: SurfaceSignature[];
1123
1209
  members: SurfaceMember[];
1210
+ /**
1211
+ * With `types: true`, on a `types[]` receiver only: the properties a
1212
+ * service may assign (not a method, not readonly, an open declared type),
1213
+ * depth 1, sorted by name (carrick#3050). Absent when none.
1214
+ */
1215
+ settable?: SurfaceSettable[];
1216
+ }
1217
+ /** A property of a type receiver that `settable` answers `ok` for. */
1218
+ export interface SurfaceSettable {
1219
+ name: string;
1220
+ type: string;
1221
+ /** As a member's `own`: the receiver's home declares it. */
1222
+ own: boolean;
1124
1223
  }
1125
1224
  export interface SurfaceExport {
1126
1225
  export: string;
@@ -1135,12 +1234,28 @@ export interface LibrarySurface {
1135
1234
  reason?: string;
1136
1235
  /** Entries dropped by `max_entries`. */
1137
1236
  truncated: number;
1237
+ exports: SurfaceExport[];
1238
+ /** With `handlers: true`: the handler-parameter types its handlers' parameters refer to (carrick#2977). */
1239
+ handler_types?: SurfaceHandlerType[];
1240
+ /** With `handlers: true`: each type export a `handler_types` entry names, as receiver `type` (carrick#2977). */
1241
+ types?: SurfaceTypeExport[];
1138
1242
  /**
1139
- * With `handlers: true`, the handler-parameter members dropped by the cap of
1140
- * 500 per parameter (carrick#2966), summed over every listed parameter.
1243
+ * With `handlers: true`: the handler parameters the listing's budget of
1244
+ * handler members (`max_handler_members`, carrick#3016) left out, because
1245
+ * their type's new entry would pass it.
1141
1246
  */
1142
- handlers_truncated?: number;
1143
- exports: SurfaceExport[];
1247
+ handler_params_left_out?: number;
1248
+ /**
1249
+ * With `types: true`: entries of `types` the listing's budget left out
1250
+ * (carrick#3050). `truncated` does not count them.
1251
+ */
1252
+ types_left_out?: number;
1253
+ /**
1254
+ * With `types: true`: per export, per receiver the surface lists, the
1255
+ * `types` receiver ids its built type and base types are declared by
1256
+ * (carrick#3051). Outside `surface_sha256`.
1257
+ */
1258
+ receiver_types?: Record<string, Record<string, string[]>>;
1144
1259
  }
1145
1260
  export interface ListLibrarySurfaceResponse extends BaseResponse {
1146
1261
  /** One per requested specifier, in request order. */