@iveri/contracts 0.31.0 → 0.33.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.
Files changed (25) hide show
  1. package/dist/cjs/api/conduit/connection-verification-verdict.enum.d.ts +74 -0
  2. package/dist/cjs/api/conduit/connection-verification-verdict.enum.d.ts.map +1 -0
  3. package/dist/cjs/api/conduit/connection-verification-verdict.enum.js +78 -0
  4. package/dist/cjs/api/conduit/connection-verification-verdict.enum.js.map +1 -0
  5. package/dist/cjs/api/conduit/connection.type.d.ts +32 -0
  6. package/dist/cjs/api/conduit/connection.type.d.ts.map +1 -1
  7. package/dist/cjs/api/conduit/index.d.ts +1 -0
  8. package/dist/cjs/api/conduit/index.d.ts.map +1 -1
  9. package/dist/cjs/api/conduit/index.js +1 -0
  10. package/dist/cjs/api/conduit/index.js.map +1 -1
  11. package/dist/cjs/api/mobility/mobility-dispatch.type.d.ts +25 -3
  12. package/dist/cjs/api/mobility/mobility-dispatch.type.d.ts.map +1 -1
  13. package/dist/esm/api/conduit/connection-verification-verdict.enum.d.ts +74 -0
  14. package/dist/esm/api/conduit/connection-verification-verdict.enum.d.ts.map +1 -0
  15. package/dist/esm/api/conduit/connection-verification-verdict.enum.js +75 -0
  16. package/dist/esm/api/conduit/connection-verification-verdict.enum.js.map +1 -0
  17. package/dist/esm/api/conduit/connection.type.d.ts +32 -0
  18. package/dist/esm/api/conduit/connection.type.d.ts.map +1 -1
  19. package/dist/esm/api/conduit/index.d.ts +1 -0
  20. package/dist/esm/api/conduit/index.d.ts.map +1 -1
  21. package/dist/esm/api/conduit/index.js +1 -0
  22. package/dist/esm/api/conduit/index.js.map +1 -1
  23. package/dist/esm/api/mobility/mobility-dispatch.type.d.ts +25 -3
  24. package/dist/esm/api/mobility/mobility-dispatch.type.d.ts.map +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The outcome of checking whether a connection's credentials still work.
3
+ *
4
+ * **Not a boolean, for the same reason {@link SignatureVerdict} is not.** The question an
5
+ * operator asks after replacing a client secret is "did that work", and for three of the five
6
+ * {@link ConnectorAuthType} members the honest answer is *we cannot tell from here* — each for a
7
+ * different and separately fixable reason. Collapsing those into `false` would report a correctly
8
+ * configured connection as broken; collapsing them into `true` would report an untested one as
9
+ * proven.
10
+ *
11
+ * A UI must not colour all of these red. Only {@link ConnectionVerificationVerdict.INVALID_CREDENTIALS}
12
+ * and {@link ConnectionVerificationVerdict.MISCONFIGURED} mean something is wrong;
13
+ * {@link ConnectionVerificationVerdict.PROVIDER_UNREACHABLE} is somebody else's outage, and the
14
+ * remaining three are "nothing to check" or "checked as far as this auth type allows".
15
+ */
16
+ export declare enum ConnectionVerificationVerdict {
17
+ /**
18
+ * A token was minted just now, so the credentials are good as of this moment.
19
+ *
20
+ * Only an OAuth grant can reach this: it is the one case where the provider itself tells us
21
+ * whether the secret is right, without us having to send a message somebody would receive.
22
+ */
23
+ VERIFIED = "verified",
24
+ /**
25
+ * A cached access token is still usable, so nothing was asked of the provider.
26
+ *
27
+ * This is a weaker statement than {@link VERIFIED} and deliberately distinguished from it: it
28
+ * says the credentials worked when the token was minted, not that they work now. A secret
29
+ * revoked at the provider five minutes ago still reports this until the token expires.
30
+ *
31
+ * It exists so that clicking verify repeatedly does not spend a refresh token each time —
32
+ * see the note on {@link ConnectorAuthType.OAUTH2_REFRESH_TOKEN} about rotation. Replacing a
33
+ * connection's credentials discards the cached token, so the first verify after a credential
34
+ * edit is never this.
35
+ */
36
+ VERIFIED_CACHED = "verified-cached",
37
+ /**
38
+ * The credential the manifest asks for is present, and its correctness is unknowable from
39
+ * here.
40
+ *
41
+ * A static secret is only ever checked by the provider when a real request carries it, so
42
+ * this is as far as verification can go for {@link ConnectorAuthType.API_KEY_HEADER} and
43
+ * {@link ConnectorAuthType.BEARER_STATIC}. That is not a cop-out: *presence* is exactly what
44
+ * breaks after a credential edit — a cleared map, or a key renamed to something the manifest
45
+ * does not ask for — and this catches it.
46
+ */
47
+ CREDENTIAL_PRESENT = "credential-present",
48
+ /** The connector adds no credential to a request, so there is nothing to check. */
49
+ NOTHING_TO_VERIFY = "nothing-to-verify",
50
+ /**
51
+ * The provider refused the credentials.
52
+ *
53
+ * The one verdict that means the secret itself is wrong. Everything needed was present and
54
+ * the token endpoint said no.
55
+ */
56
+ INVALID_CREDENTIALS = "invalid-credentials",
57
+ /**
58
+ * The credential, or the manifest field naming it, is missing.
59
+ *
60
+ * Distinct from {@link INVALID_CREDENTIALS} because the remedy is different and the provider
61
+ * was never contacted: a connection with no `clientSecret`, or a manifest with an
62
+ * `api-key-header` auth type and no `headerName`. The most common state immediately after a
63
+ * credential map is cleared.
64
+ */
65
+ MISCONFIGURED = "misconfigured",
66
+ /**
67
+ * The token endpoint could not be reached, or did not answer in time.
68
+ *
69
+ * Says nothing about the credentials. Worth its own verdict so an operator who has just
70
+ * replaced a secret is not told it is wrong when the provider is simply down.
71
+ */
72
+ PROVIDER_UNREACHABLE = "provider-unreachable"
73
+ }
74
+ //# sourceMappingURL=connection-verification-verdict.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-verification-verdict.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/connection-verification-verdict.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,oBAAY,6BAA6B;IACrC;;;;;OAKG;IACH,QAAQ,aAAa;IAErB;;;;;;;;;;;OAWG;IACH,eAAe,oBAAoB;IAEnC;;;;;;;;;OASG;IACH,kBAAkB,uBAAuB;IAEzC,mFAAmF;IACnF,iBAAiB,sBAAsB;IAEvC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAE3C;;;;;;;OAOG;IACH,aAAa,kBAAkB;IAE/B;;;;;OAKG;IACH,oBAAoB,yBAAyB;CAChD"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectionVerificationVerdict = void 0;
4
+ /**
5
+ * The outcome of checking whether a connection's credentials still work.
6
+ *
7
+ * **Not a boolean, for the same reason {@link SignatureVerdict} is not.** The question an
8
+ * operator asks after replacing a client secret is "did that work", and for three of the five
9
+ * {@link ConnectorAuthType} members the honest answer is *we cannot tell from here* — each for a
10
+ * different and separately fixable reason. Collapsing those into `false` would report a correctly
11
+ * configured connection as broken; collapsing them into `true` would report an untested one as
12
+ * proven.
13
+ *
14
+ * A UI must not colour all of these red. Only {@link ConnectionVerificationVerdict.INVALID_CREDENTIALS}
15
+ * and {@link ConnectionVerificationVerdict.MISCONFIGURED} mean something is wrong;
16
+ * {@link ConnectionVerificationVerdict.PROVIDER_UNREACHABLE} is somebody else's outage, and the
17
+ * remaining three are "nothing to check" or "checked as far as this auth type allows".
18
+ */
19
+ var ConnectionVerificationVerdict;
20
+ (function (ConnectionVerificationVerdict) {
21
+ /**
22
+ * A token was minted just now, so the credentials are good as of this moment.
23
+ *
24
+ * Only an OAuth grant can reach this: it is the one case where the provider itself tells us
25
+ * whether the secret is right, without us having to send a message somebody would receive.
26
+ */
27
+ ConnectionVerificationVerdict["VERIFIED"] = "verified";
28
+ /**
29
+ * A cached access token is still usable, so nothing was asked of the provider.
30
+ *
31
+ * This is a weaker statement than {@link VERIFIED} and deliberately distinguished from it: it
32
+ * says the credentials worked when the token was minted, not that they work now. A secret
33
+ * revoked at the provider five minutes ago still reports this until the token expires.
34
+ *
35
+ * It exists so that clicking verify repeatedly does not spend a refresh token each time —
36
+ * see the note on {@link ConnectorAuthType.OAUTH2_REFRESH_TOKEN} about rotation. Replacing a
37
+ * connection's credentials discards the cached token, so the first verify after a credential
38
+ * edit is never this.
39
+ */
40
+ ConnectionVerificationVerdict["VERIFIED_CACHED"] = "verified-cached";
41
+ /**
42
+ * The credential the manifest asks for is present, and its correctness is unknowable from
43
+ * here.
44
+ *
45
+ * A static secret is only ever checked by the provider when a real request carries it, so
46
+ * this is as far as verification can go for {@link ConnectorAuthType.API_KEY_HEADER} and
47
+ * {@link ConnectorAuthType.BEARER_STATIC}. That is not a cop-out: *presence* is exactly what
48
+ * breaks after a credential edit — a cleared map, or a key renamed to something the manifest
49
+ * does not ask for — and this catches it.
50
+ */
51
+ ConnectionVerificationVerdict["CREDENTIAL_PRESENT"] = "credential-present";
52
+ /** The connector adds no credential to a request, so there is nothing to check. */
53
+ ConnectionVerificationVerdict["NOTHING_TO_VERIFY"] = "nothing-to-verify";
54
+ /**
55
+ * The provider refused the credentials.
56
+ *
57
+ * The one verdict that means the secret itself is wrong. Everything needed was present and
58
+ * the token endpoint said no.
59
+ */
60
+ ConnectionVerificationVerdict["INVALID_CREDENTIALS"] = "invalid-credentials";
61
+ /**
62
+ * The credential, or the manifest field naming it, is missing.
63
+ *
64
+ * Distinct from {@link INVALID_CREDENTIALS} because the remedy is different and the provider
65
+ * was never contacted: a connection with no `clientSecret`, or a manifest with an
66
+ * `api-key-header` auth type and no `headerName`. The most common state immediately after a
67
+ * credential map is cleared.
68
+ */
69
+ ConnectionVerificationVerdict["MISCONFIGURED"] = "misconfigured";
70
+ /**
71
+ * The token endpoint could not be reached, or did not answer in time.
72
+ *
73
+ * Says nothing about the credentials. Worth its own verdict so an operator who has just
74
+ * replaced a secret is not told it is wrong when the provider is simply down.
75
+ */
76
+ ConnectionVerificationVerdict["PROVIDER_UNREACHABLE"] = "provider-unreachable";
77
+ })(ConnectionVerificationVerdict || (exports.ConnectionVerificationVerdict = ConnectionVerificationVerdict = {}));
78
+ //# sourceMappingURL=connection-verification-verdict.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-verification-verdict.enum.js","sourceRoot":"","sources":["../../../../src/api/conduit/connection-verification-verdict.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,6BA+DX;AA/DD,WAAY,6BAA6B;IACrC;;;;;OAKG;IACH,sDAAqB,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,oEAAmC,CAAA;IAEnC;;;;;;;;;OASG;IACH,0EAAyC,CAAA;IAEzC,mFAAmF;IACnF,wEAAuC,CAAA;IAEvC;;;;;OAKG;IACH,4EAA2C,CAAA;IAE3C;;;;;;;OAOG;IACH,gEAA+B,CAAA;IAE/B;;;;;OAKG;IACH,8EAA6C,CAAA;AACjD,CAAC,EA/DW,6BAA6B,6CAA7B,6BAA6B,QA+DxC"}
@@ -1,6 +1,8 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { Nullable } from '../../type/nil.type.js';
3
3
  import type { UUID } from '../../type/uuid.type.js';
4
+ import type { ConnectionVerificationVerdict } from './connection-verification-verdict.enum.js';
5
+ import type { ConnectorAuthType } from './connector-auth-type.enum.js';
4
6
  /**
5
7
  * One tenant's configured instance of a connector: the credentials and the account details that
6
8
  * turn a manifest into something that can actually send.
@@ -97,4 +99,34 @@ export interface UpdateConnectionBody {
97
99
  variables?: Nullable<Record<string, string>>;
98
100
  isActive?: boolean;
99
101
  }
102
+ /**
103
+ * `POST /api/v1/connections/:id/verify`.
104
+ *
105
+ * Takes no body. Everything the check needs is already on the connection and its connector's
106
+ * manifest, and a field a caller could send would be a field that changes what is verified —
107
+ * which is the opposite of the point.
108
+ */
109
+ export interface ConnectionVerification {
110
+ verdict: ConnectionVerificationVerdict;
111
+ /**
112
+ * The auth type the verdict was reached under, so a client can explain it without fetching
113
+ * the connector.
114
+ *
115
+ * A reader needs this to say *why* a verdict is as weak as it is — "nothing to check" and
116
+ * "cannot be checked without sending something real" are different sentences, and which one
117
+ * applies is a property of the connector rather than of the connection.
118
+ */
119
+ authType: ConnectorAuthType;
120
+ /**
121
+ * What the provider or the configuration said, when there is something to pass on.
122
+ *
123
+ * **Never a credential, in whole or in part.** It carries a token endpoint's error code, a
124
+ * missing credential's name, or a timeout — the same things `lastAuthError` holds, and the
125
+ * same rule applies: no endpoint returns a credential value in any form, not masked, not
126
+ * truncated, not a length.
127
+ */
128
+ detail: Nullable<string>;
129
+ /** When the check ran. A client showing a stale verdict should say how stale. */
130
+ checkedAt: IsoDateTime;
131
+ }
100
132
  //# sourceMappingURL=connection.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.type.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/connection.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,IAAI,CAAC;IAET,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE9B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IAErB,6EAA6E;IAC7E,eAAe,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElC;;;;;;;OAOG;IACH,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE5C;;;;;;OAMG;IACH,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEhC,kFAAkF;IAClF,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED,qFAAqF;AACrF,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,kCAAkC;AAClC,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC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AQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE,6BAA6B,CAAC;IAEvC;;;;;;;OAOG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAE5B;;;;;;;OAOG;IACH,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEzB,iFAAiF;IACjF,SAAS,EAAE,WAAW,CAAC;CAC1B"}
@@ -1,4 +1,5 @@
1
1
  export * from './capture.type.js';
2
+ export * from './connection-verification-verdict.enum.js';
2
3
  export * from './connection.type.js';
3
4
  export * from './connector-auth-type.enum.js';
4
5
  export * from './connector.type.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./capture.type.js"), exports);
18
+ __exportStar(require("./connection-verification-verdict.enum.js"), exports);
18
19
  __exportStar(require("./connection.type.js"), exports);
19
20
  __exportStar(require("./connector-auth-type.enum.js"), exports);
20
21
  __exportStar(require("./connector.type.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,gEAA8C;AAC9C,sDAAoC;AACpC,4DAA0C;AAC1C,qDAAmC;AACnC,wDAAsC;AACtC,4DAA0C;AAC1C,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,mDAAiC;AACjC,kDAAgC;AAChC,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,8DAA4C;AAC5C,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,4EAA0D;AAC1D,uDAAqC;AACrC,gEAA8C;AAC9C,sDAAoC;AACpC,4DAA0C;AAC1C,qDAAmC;AACnC,wDAAsC;AACtC,4DAA0C;AAC1C,qDAAmC;AACnC,qDAAmC;AACnC,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,mDAAiC;AACjC,kDAAgC;AAChC,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,8DAA4C;AAC5C,sDAAoC"}
@@ -1,4 +1,5 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
2
3
  import type { UUID } from '../../type/uuid.type.js';
3
4
  import type { MobilityDispatchStatus } from './mobility-dispatch-status.enum.js';
4
5
  import type { MobilityServiceType } from './mobility-service-type.enum.js';
@@ -13,15 +14,36 @@ export interface MobilityDispatch {
13
14
  serviceType: MobilityServiceType;
14
15
  subjectId: UUID;
15
16
  status: MobilityDispatchStatus;
16
- pickupLatitude: number;
17
- pickupLongitude: number;
17
+ /**
18
+ * `null` once the dispatch is past Mobility's location retention window.
19
+ *
20
+ * **Nullable because it is redacted, not because it is optional** —
21
+ * `CreateMobilityDispatchBody` below still requires both, and a dispatch cannot exist without
22
+ * them. Mobility strips them from a terminal dispatch and keeps the row, because the
23
+ * assignment hanging off it is a worker's evidence of a job they did.
24
+ *
25
+ * This is the half of the products' own retention promise that lives here: Taxi and Delivery
26
+ * expire a ride's and a job's coordinates, and **the pickup survived in this table keyed by
27
+ * the same `subjectId`** until this window existed. A reader that holds this value past a
28
+ * product's window is holding what that product has already deleted.
29
+ *
30
+ * Both move together, so a consumer that can render one can render both.
31
+ */
32
+ pickupLatitude: Nullable<number>;
33
+ pickupLongitude: Nullable<number>;
18
34
  expiresAt: IsoDateTime;
19
35
  /** Version of the dispatch state machine, not a worker or location version. */
20
36
  version: number;
21
37
  createdAt: IsoDateTime;
22
38
  updatedAt: IsoDateTime;
23
39
  }
24
- /** `POST /api/v1/dispatches`; retry safety is supplied by the `Idempotency-Key` header. */
40
+ /**
41
+ * `POST /api/v1/dispatches`; retry safety is supplied by the `Idempotency-Key` header.
42
+ *
43
+ * The two coordinates are **required here and nullable on `MobilityDispatch`**, deliberately: the
44
+ * request and the response are the same fields with opposite nullability, and widening this one so
45
+ * the two could share a type would let a caller submit a dispatch with nowhere to search from.
46
+ */
25
47
  export interface CreateMobilityDispatchBody {
26
48
  serviceType: MobilityServiceType;
27
49
  subjectId: UUID;
@@ -1 +1 @@
1
- {"version":3,"file":"mobility-dispatch.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-dispatch.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED,2FAA2F;AAC3F,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACxB"}
1
+ {"version":3,"file":"mobility-dispatch.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-dispatch.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,sBAAsB,CAAC;IAC/B;;;;;;;;;;;;;;OAcG;IACH,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,EAAE,WAAW,CAAC;IACvB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACxB"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The outcome of checking whether a connection's credentials still work.
3
+ *
4
+ * **Not a boolean, for the same reason {@link SignatureVerdict} is not.** The question an
5
+ * operator asks after replacing a client secret is "did that work", and for three of the five
6
+ * {@link ConnectorAuthType} members the honest answer is *we cannot tell from here* — each for a
7
+ * different and separately fixable reason. Collapsing those into `false` would report a correctly
8
+ * configured connection as broken; collapsing them into `true` would report an untested one as
9
+ * proven.
10
+ *
11
+ * A UI must not colour all of these red. Only {@link ConnectionVerificationVerdict.INVALID_CREDENTIALS}
12
+ * and {@link ConnectionVerificationVerdict.MISCONFIGURED} mean something is wrong;
13
+ * {@link ConnectionVerificationVerdict.PROVIDER_UNREACHABLE} is somebody else's outage, and the
14
+ * remaining three are "nothing to check" or "checked as far as this auth type allows".
15
+ */
16
+ export declare enum ConnectionVerificationVerdict {
17
+ /**
18
+ * A token was minted just now, so the credentials are good as of this moment.
19
+ *
20
+ * Only an OAuth grant can reach this: it is the one case where the provider itself tells us
21
+ * whether the secret is right, without us having to send a message somebody would receive.
22
+ */
23
+ VERIFIED = "verified",
24
+ /**
25
+ * A cached access token is still usable, so nothing was asked of the provider.
26
+ *
27
+ * This is a weaker statement than {@link VERIFIED} and deliberately distinguished from it: it
28
+ * says the credentials worked when the token was minted, not that they work now. A secret
29
+ * revoked at the provider five minutes ago still reports this until the token expires.
30
+ *
31
+ * It exists so that clicking verify repeatedly does not spend a refresh token each time —
32
+ * see the note on {@link ConnectorAuthType.OAUTH2_REFRESH_TOKEN} about rotation. Replacing a
33
+ * connection's credentials discards the cached token, so the first verify after a credential
34
+ * edit is never this.
35
+ */
36
+ VERIFIED_CACHED = "verified-cached",
37
+ /**
38
+ * The credential the manifest asks for is present, and its correctness is unknowable from
39
+ * here.
40
+ *
41
+ * A static secret is only ever checked by the provider when a real request carries it, so
42
+ * this is as far as verification can go for {@link ConnectorAuthType.API_KEY_HEADER} and
43
+ * {@link ConnectorAuthType.BEARER_STATIC}. That is not a cop-out: *presence* is exactly what
44
+ * breaks after a credential edit — a cleared map, or a key renamed to something the manifest
45
+ * does not ask for — and this catches it.
46
+ */
47
+ CREDENTIAL_PRESENT = "credential-present",
48
+ /** The connector adds no credential to a request, so there is nothing to check. */
49
+ NOTHING_TO_VERIFY = "nothing-to-verify",
50
+ /**
51
+ * The provider refused the credentials.
52
+ *
53
+ * The one verdict that means the secret itself is wrong. Everything needed was present and
54
+ * the token endpoint said no.
55
+ */
56
+ INVALID_CREDENTIALS = "invalid-credentials",
57
+ /**
58
+ * The credential, or the manifest field naming it, is missing.
59
+ *
60
+ * Distinct from {@link INVALID_CREDENTIALS} because the remedy is different and the provider
61
+ * was never contacted: a connection with no `clientSecret`, or a manifest with an
62
+ * `api-key-header` auth type and no `headerName`. The most common state immediately after a
63
+ * credential map is cleared.
64
+ */
65
+ MISCONFIGURED = "misconfigured",
66
+ /**
67
+ * The token endpoint could not be reached, or did not answer in time.
68
+ *
69
+ * Says nothing about the credentials. Worth its own verdict so an operator who has just
70
+ * replaced a secret is not told it is wrong when the provider is simply down.
71
+ */
72
+ PROVIDER_UNREACHABLE = "provider-unreachable"
73
+ }
74
+ //# sourceMappingURL=connection-verification-verdict.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-verification-verdict.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/connection-verification-verdict.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,oBAAY,6BAA6B;IACrC;;;;;OAKG;IACH,QAAQ,aAAa;IAErB;;;;;;;;;;;OAWG;IACH,eAAe,oBAAoB;IAEnC;;;;;;;;;OASG;IACH,kBAAkB,uBAAuB;IAEzC,mFAAmF;IACnF,iBAAiB,sBAAsB;IAEvC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAE3C;;;;;;;OAOG;IACH,aAAa,kBAAkB;IAE/B;;;;;OAKG;IACH,oBAAoB,yBAAyB;CAChD"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The outcome of checking whether a connection's credentials still work.
3
+ *
4
+ * **Not a boolean, for the same reason {@link SignatureVerdict} is not.** The question an
5
+ * operator asks after replacing a client secret is "did that work", and for three of the five
6
+ * {@link ConnectorAuthType} members the honest answer is *we cannot tell from here* — each for a
7
+ * different and separately fixable reason. Collapsing those into `false` would report a correctly
8
+ * configured connection as broken; collapsing them into `true` would report an untested one as
9
+ * proven.
10
+ *
11
+ * A UI must not colour all of these red. Only {@link ConnectionVerificationVerdict.INVALID_CREDENTIALS}
12
+ * and {@link ConnectionVerificationVerdict.MISCONFIGURED} mean something is wrong;
13
+ * {@link ConnectionVerificationVerdict.PROVIDER_UNREACHABLE} is somebody else's outage, and the
14
+ * remaining three are "nothing to check" or "checked as far as this auth type allows".
15
+ */
16
+ export var ConnectionVerificationVerdict;
17
+ (function (ConnectionVerificationVerdict) {
18
+ /**
19
+ * A token was minted just now, so the credentials are good as of this moment.
20
+ *
21
+ * Only an OAuth grant can reach this: it is the one case where the provider itself tells us
22
+ * whether the secret is right, without us having to send a message somebody would receive.
23
+ */
24
+ ConnectionVerificationVerdict["VERIFIED"] = "verified";
25
+ /**
26
+ * A cached access token is still usable, so nothing was asked of the provider.
27
+ *
28
+ * This is a weaker statement than {@link VERIFIED} and deliberately distinguished from it: it
29
+ * says the credentials worked when the token was minted, not that they work now. A secret
30
+ * revoked at the provider five minutes ago still reports this until the token expires.
31
+ *
32
+ * It exists so that clicking verify repeatedly does not spend a refresh token each time —
33
+ * see the note on {@link ConnectorAuthType.OAUTH2_REFRESH_TOKEN} about rotation. Replacing a
34
+ * connection's credentials discards the cached token, so the first verify after a credential
35
+ * edit is never this.
36
+ */
37
+ ConnectionVerificationVerdict["VERIFIED_CACHED"] = "verified-cached";
38
+ /**
39
+ * The credential the manifest asks for is present, and its correctness is unknowable from
40
+ * here.
41
+ *
42
+ * A static secret is only ever checked by the provider when a real request carries it, so
43
+ * this is as far as verification can go for {@link ConnectorAuthType.API_KEY_HEADER} and
44
+ * {@link ConnectorAuthType.BEARER_STATIC}. That is not a cop-out: *presence* is exactly what
45
+ * breaks after a credential edit — a cleared map, or a key renamed to something the manifest
46
+ * does not ask for — and this catches it.
47
+ */
48
+ ConnectionVerificationVerdict["CREDENTIAL_PRESENT"] = "credential-present";
49
+ /** The connector adds no credential to a request, so there is nothing to check. */
50
+ ConnectionVerificationVerdict["NOTHING_TO_VERIFY"] = "nothing-to-verify";
51
+ /**
52
+ * The provider refused the credentials.
53
+ *
54
+ * The one verdict that means the secret itself is wrong. Everything needed was present and
55
+ * the token endpoint said no.
56
+ */
57
+ ConnectionVerificationVerdict["INVALID_CREDENTIALS"] = "invalid-credentials";
58
+ /**
59
+ * The credential, or the manifest field naming it, is missing.
60
+ *
61
+ * Distinct from {@link INVALID_CREDENTIALS} because the remedy is different and the provider
62
+ * was never contacted: a connection with no `clientSecret`, or a manifest with an
63
+ * `api-key-header` auth type and no `headerName`. The most common state immediately after a
64
+ * credential map is cleared.
65
+ */
66
+ ConnectionVerificationVerdict["MISCONFIGURED"] = "misconfigured";
67
+ /**
68
+ * The token endpoint could not be reached, or did not answer in time.
69
+ *
70
+ * Says nothing about the credentials. Worth its own verdict so an operator who has just
71
+ * replaced a secret is not told it is wrong when the provider is simply down.
72
+ */
73
+ ConnectionVerificationVerdict["PROVIDER_UNREACHABLE"] = "provider-unreachable";
74
+ })(ConnectionVerificationVerdict || (ConnectionVerificationVerdict = {}));
75
+ //# sourceMappingURL=connection-verification-verdict.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-verification-verdict.enum.js","sourceRoot":"","sources":["../../../../src/api/conduit/connection-verification-verdict.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,6BA+DX;AA/DD,WAAY,6BAA6B;IACrC;;;;;OAKG;IACH,sDAAqB,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,oEAAmC,CAAA;IAEnC;;;;;;;;;OASG;IACH,0EAAyC,CAAA;IAEzC,mFAAmF;IACnF,wEAAuC,CAAA;IAEvC;;;;;OAKG;IACH,4EAA2C,CAAA;IAE3C;;;;;;;OAOG;IACH,gEAA+B,CAAA;IAE/B;;;;;OAKG;IACH,8EAA6C,CAAA;AACjD,CAAC,EA/DW,6BAA6B,KAA7B,6BAA6B,QA+DxC"}
@@ -1,6 +1,8 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { Nullable } from '../../type/nil.type.js';
3
3
  import type { UUID } from '../../type/uuid.type.js';
4
+ import type { ConnectionVerificationVerdict } from './connection-verification-verdict.enum.js';
5
+ import type { ConnectorAuthType } from './connector-auth-type.enum.js';
4
6
  /**
5
7
  * One tenant's configured instance of a connector: the credentials and the account details that
6
8
  * turn a manifest into something that can actually send.
@@ -97,4 +99,34 @@ export interface UpdateConnectionBody {
97
99
  variables?: Nullable<Record<string, string>>;
98
100
  isActive?: boolean;
99
101
  }
102
+ /**
103
+ * `POST /api/v1/connections/:id/verify`.
104
+ *
105
+ * Takes no body. Everything the check needs is already on the connection and its connector's
106
+ * manifest, and a field a caller could send would be a field that changes what is verified —
107
+ * which is the opposite of the point.
108
+ */
109
+ export interface ConnectionVerification {
110
+ verdict: ConnectionVerificationVerdict;
111
+ /**
112
+ * The auth type the verdict was reached under, so a client can explain it without fetching
113
+ * the connector.
114
+ *
115
+ * A reader needs this to say *why* a verdict is as weak as it is — "nothing to check" and
116
+ * "cannot be checked without sending something real" are different sentences, and which one
117
+ * applies is a property of the connector rather than of the connection.
118
+ */
119
+ authType: ConnectorAuthType;
120
+ /**
121
+ * What the provider or the configuration said, when there is something to pass on.
122
+ *
123
+ * **Never a credential, in whole or in part.** It carries a token endpoint's error code, a
124
+ * missing credential's name, or a timeout — the same things `lastAuthError` holds, and the
125
+ * same rule applies: no endpoint returns a credential value in any form, not masked, not
126
+ * truncated, not a length.
127
+ */
128
+ detail: Nullable<string>;
129
+ /** When the check ran. A client showing a stale verdict should say how stale. */
130
+ checkedAt: IsoDateTime;
131
+ }
100
132
  //# sourceMappingURL=connection.type.d.ts.map
@@ -1 +1 @@
1
-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OAAO,EAAE,6BAA6B,CAAC;IAEvC;;;;;;;OAOG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAE5B;;;;;;;OAOG;IACH,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEzB,iFAAiF;IACjF,SAAS,EAAE,WAAW,CAAC;CAC1B"}
@@ -1,4 +1,5 @@
1
1
  export * from './capture.type.js';
2
+ export * from './connection-verification-verdict.enum.js';
2
3
  export * from './connection.type.js';
3
4
  export * from './connector-auth-type.enum.js';
4
5
  export * from './connector.type.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './capture.type.js';
2
+ export * from './connection-verification-verdict.enum.js';
2
3
  export * from './connection.type.js';
3
4
  export * from './connector-auth-type.enum.js';
4
5
  export * from './connector.type.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
2
3
  import type { UUID } from '../../type/uuid.type.js';
3
4
  import type { MobilityDispatchStatus } from './mobility-dispatch-status.enum.js';
4
5
  import type { MobilityServiceType } from './mobility-service-type.enum.js';
@@ -13,15 +14,36 @@ export interface MobilityDispatch {
13
14
  serviceType: MobilityServiceType;
14
15
  subjectId: UUID;
15
16
  status: MobilityDispatchStatus;
16
- pickupLatitude: number;
17
- pickupLongitude: number;
17
+ /**
18
+ * `null` once the dispatch is past Mobility's location retention window.
19
+ *
20
+ * **Nullable because it is redacted, not because it is optional** —
21
+ * `CreateMobilityDispatchBody` below still requires both, and a dispatch cannot exist without
22
+ * them. Mobility strips them from a terminal dispatch and keeps the row, because the
23
+ * assignment hanging off it is a worker's evidence of a job they did.
24
+ *
25
+ * This is the half of the products' own retention promise that lives here: Taxi and Delivery
26
+ * expire a ride's and a job's coordinates, and **the pickup survived in this table keyed by
27
+ * the same `subjectId`** until this window existed. A reader that holds this value past a
28
+ * product's window is holding what that product has already deleted.
29
+ *
30
+ * Both move together, so a consumer that can render one can render both.
31
+ */
32
+ pickupLatitude: Nullable<number>;
33
+ pickupLongitude: Nullable<number>;
18
34
  expiresAt: IsoDateTime;
19
35
  /** Version of the dispatch state machine, not a worker or location version. */
20
36
  version: number;
21
37
  createdAt: IsoDateTime;
22
38
  updatedAt: IsoDateTime;
23
39
  }
24
- /** `POST /api/v1/dispatches`; retry safety is supplied by the `Idempotency-Key` header. */
40
+ /**
41
+ * `POST /api/v1/dispatches`; retry safety is supplied by the `Idempotency-Key` header.
42
+ *
43
+ * The two coordinates are **required here and nullable on `MobilityDispatch`**, deliberately: the
44
+ * request and the response are the same fields with opposite nullability, and widening this one so
45
+ * the two could share a type would let a caller submit a dispatch with nowhere to search from.
46
+ */
25
47
  export interface CreateMobilityDispatchBody {
26
48
  serviceType: MobilityServiceType;
27
49
  subjectId: UUID;
@@ -1 +1 @@
1
- {"version":3,"file":"mobility-dispatch.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-dispatch.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;I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AAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {