sinfactura-types 1.10.322 → 1.10.323
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/auth.d.ts +13 -0
- package/dist/store.d.ts +17 -0
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -33,6 +33,17 @@ declare global {
|
|
|
33
33
|
/** Remember this device — same semantics as `Login.trustDevice`. */
|
|
34
34
|
trustDevice?: boolean;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Registration request body.
|
|
38
|
+
*
|
|
39
|
+
* ⚠️ ONE type serves TWO endpoints whose schemas differ: tenant self-registration
|
|
40
|
+
* (`POST /auth`, mode `register`) and the storefront CUSTOMER registration. It
|
|
41
|
+
* mirrors neither exactly — the tenant schema also takes `name` and `waitlist` and
|
|
42
|
+
* makes `fullName` optional and `phone` required; the customer schema has no
|
|
43
|
+
* `name`, requires `fullName` and takes an address. Both front ends reach it
|
|
44
|
+
* through a cast, so tightening it towards either schema breaks the other's
|
|
45
|
+
* compile. `acquisition` is tenant-only; the customer registration ignores it.
|
|
46
|
+
*/
|
|
36
47
|
interface Register {
|
|
37
48
|
email: string;
|
|
38
49
|
password: string;
|
|
@@ -40,6 +51,8 @@ declare global {
|
|
|
40
51
|
fullName: string;
|
|
41
52
|
phone?: string;
|
|
42
53
|
acknowledgedSharedCuit?: boolean;
|
|
54
|
+
/** First-touch acquisition captured by the registration client; the api server-stamps `capturedAt`. */
|
|
55
|
+
acquisition?: StoreAcquisitionInput;
|
|
43
56
|
}
|
|
44
57
|
interface Recover {
|
|
45
58
|
email: string;
|
package/dist/store.d.ts
CHANGED
|
@@ -234,6 +234,21 @@ declare global {
|
|
|
234
234
|
*/
|
|
235
235
|
tolerancePercent?: number;
|
|
236
236
|
}
|
|
237
|
+
/** First-touch acquisition metadata captured when this tenant self-registers. */
|
|
238
|
+
interface StoreAcquisition {
|
|
239
|
+
source: string;
|
|
240
|
+
medium: string;
|
|
241
|
+
campaign: string;
|
|
242
|
+
content?: string;
|
|
243
|
+
/** Unix ms, stamped by the api from the registration timestamp. */
|
|
244
|
+
capturedAt: number;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* The REQUEST leaf: everything a registration client may send, i.e.
|
|
248
|
+
* `StoreAcquisition` minus the server-owned stamp. The api refuses a body
|
|
249
|
+
* carrying `capturedAt`, and refuses any key this type does not name.
|
|
250
|
+
*/
|
|
251
|
+
type StoreAcquisitionInput = Omit<StoreAcquisition, 'capturedAt'>;
|
|
237
252
|
interface Store {
|
|
238
253
|
/**
|
|
239
254
|
* Cmd-K palette overrides. Absent means "all built-in verbs, default order".
|
|
@@ -305,6 +320,8 @@ declare global {
|
|
|
305
320
|
/** Payment CBU contact leaf (22 digits), shown to customers. */
|
|
306
321
|
cbu?: string;
|
|
307
322
|
acknowledgedSharedCuit?: boolean;
|
|
323
|
+
/** First-touch acquisition; absent for non-campaign/legacy registrations and never client-updated after creation. */
|
|
324
|
+
acquisition?: StoreAcquisition;
|
|
308
325
|
/**
|
|
309
326
|
* Response-time join, not a persisted Store attribute — and TWO different
|
|
310
327
|
* shapes depending on the endpoint: `GET /tenants` (SUPERVISOR) attaches the
|