platform-types 1.10.736 → 1.10.738
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 +60 -7
- package/dist/order.d.ts +5 -1
- package/dist/store.d.ts +28 -0
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -64,9 +64,12 @@ declare global {
|
|
|
64
64
|
* optionality.
|
|
65
65
|
*
|
|
66
66
|
* ⚠️ NOT interchangeable with {@link CustomerRegisterInput}. The two
|
|
67
|
-
* registration endpoints differ in
|
|
68
|
-
*
|
|
69
|
-
*
|
|
67
|
+
* registration endpoints differ in key set AND in rules: `name`,
|
|
68
|
+
* `acknowledgedSharedCuit`, `acquisition`, `consentTimestamp`,
|
|
69
|
+
* `consentVersion` and `storeContact` exist only here, and the address block
|
|
70
|
+
* and `afip` only there; `fullName` is OPTIONAL here and REQUIRED there,
|
|
71
|
+
* `email` has an 8-character floor here and 5 there, and `cuit` is a bare
|
|
72
|
+
* length check here and a mod-11 check there.
|
|
70
73
|
*
|
|
71
74
|
* ⚠️ Bounds are stated per field below and are what the server ENFORCES;
|
|
72
75
|
* a violation is `400` and creates nothing at all, not a partial tenant.
|
|
@@ -75,13 +78,17 @@ declare global {
|
|
|
75
78
|
* keys and ignores them. This type deliberately does not declare an index
|
|
76
79
|
* signature: an unknown key buys a client nothing and losing the
|
|
77
80
|
* excess-property check is how a misspelled `fullname` ships silently. The
|
|
78
|
-
* nested `acquisition`
|
|
79
|
-
* inside
|
|
81
|
+
* nested `acquisition` and `storeContact` objects are the opposite —
|
|
82
|
+
* `.strict()`, so an unknown key inside either refuses the WHOLE
|
|
83
|
+
* registration.
|
|
80
84
|
*/
|
|
81
85
|
interface TenantRegisterInput {
|
|
82
86
|
/** Store name. Trimmed, then 4–40 characters. Required — tenants are never created nameless. */
|
|
83
87
|
name: string;
|
|
84
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Must parse as an email address, 8–254 characters. The local part must be
|
|
90
|
+
* ASCII (`z.email()`), so `dueño@…` is refused. Lower-cased server-side.
|
|
91
|
+
*/
|
|
85
92
|
email: string;
|
|
86
93
|
/** At least 8 characters — the one creation-time floor every password-accepting surface shares. */
|
|
87
94
|
password: string;
|
|
@@ -136,6 +143,52 @@ declare global {
|
|
|
136
143
|
* Its presence is what makes a consent record exist at all.
|
|
137
144
|
*/
|
|
138
145
|
consentVersion?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The STORE's own contact leaves, prefilled from the signup form.
|
|
148
|
+
*
|
|
149
|
+
* ⚠️ Send it ONLY after the merchant has confirmed that each value is a
|
|
150
|
+
* BUSINESS contact, never by copying the founder's own `phone`/`email`
|
|
151
|
+
* across silently: both land on the STORE row as `phone`/`email`, which
|
|
152
|
+
* are printed on every transactional mail to the store's customers
|
|
153
|
+
* (`storeContactFooter`), and `phone` also on the emisor block of every
|
|
154
|
+
* invoice PDF.
|
|
155
|
+
*
|
|
156
|
+
* ⚠️ A STORE `email` is also a live DESTINATION from the first day, so the
|
|
157
|
+
* client must confirm it is a MONITORED business address, not just a
|
|
158
|
+
* public one:
|
|
159
|
+
* - it is the `Reply-To` of every store-branded mail to the store's
|
|
160
|
+
* customers sent under the platform envelope, so a customer's answer goes
|
|
161
|
+
* there;
|
|
162
|
+
* - it receives the storefront's survey responses (suppressed for a demo
|
|
163
|
+
* store);
|
|
164
|
+
* - it is the one recipient of the scheduled sales digest, once the store
|
|
165
|
+
* opts in and is entitled to it;
|
|
166
|
+
* - it is the last-resort recipient of an integration re-authorisation mail,
|
|
167
|
+
* used when the request names no address and the founding admin has none.
|
|
168
|
+
*
|
|
169
|
+
* STRICT, like `acquisition`: an unknown key refuses the WHOLE
|
|
170
|
+
* registration, and so does an empty object — send at least one key or
|
|
171
|
+
* omit the object. `storeContact: null` is refused too: to send no
|
|
172
|
+
* contact, leave the key ABSENT. `phone` is EXACTLY 10 characters (the founder `phone`
|
|
173
|
+
* rule); `email` is the founder `email` rule — an email address, 8–254
|
|
174
|
+
* characters, ASCII local part — and is lower-cased server-side exactly as
|
|
175
|
+
* the founder `email` is. A violation is a `400` and creates no tenant.
|
|
176
|
+
*
|
|
177
|
+
* The api records which keys were sent as the server-owned
|
|
178
|
+
* {@link Store.registrationPrefill}; a client never sends that.
|
|
179
|
+
*/
|
|
180
|
+
storeContact?: TenantRegisterStoreContactInput;
|
|
181
|
+
}
|
|
182
|
+
/** {@link TenantRegisterInput.storeContact} — at least one key. */
|
|
183
|
+
interface TenantRegisterStoreContactInput {
|
|
184
|
+
/** EXACTLY 10 characters. */
|
|
185
|
+
phone?: string;
|
|
186
|
+
/**
|
|
187
|
+
* A valid email address, 8–254 characters — the founder `email` rule. The
|
|
188
|
+
* local part must be ASCII (the same `z.email()` rule), so `dueño@…` is
|
|
189
|
+
* refused. Lower-cased server-side.
|
|
190
|
+
*/
|
|
191
|
+
email?: string;
|
|
139
192
|
}
|
|
140
193
|
/**
|
|
141
194
|
* One `afip` entry as the CUSTOMER registration ACCEPTS it — {@link CustomerAfip}
|
|
@@ -159,7 +212,7 @@ declare global {
|
|
|
159
212
|
* that schema.
|
|
160
213
|
*
|
|
161
214
|
* ⚠️ NOT interchangeable with {@link TenantRegisterInput} — see that type for
|
|
162
|
-
* the
|
|
215
|
+
* the differences. In particular there is no `acquisition` here: campaign
|
|
163
216
|
* attribution is a TENANT property, and a value sent on this leg is dropped.
|
|
164
217
|
*
|
|
165
218
|
* ⚠️ Unlike the tenant schema this object is NOT `.loose()`, so an unknown
|
package/dist/order.d.ts
CHANGED
|
@@ -963,7 +963,11 @@ declare global {
|
|
|
963
963
|
* object through, and only the operator create requires `condFiscal`.
|
|
964
964
|
*
|
|
965
965
|
* - `razonSocial` is routinely absent: a Consumidor Final receptor has no
|
|
966
|
-
* legal name, and none may be invented for one.
|
|
966
|
+
* legal name, and none may be invented for one. A class A or M factura
|
|
967
|
+
* (an RI or Monotributo receptor) is never issued without one: issuance
|
|
968
|
+
* fills a blank name from the platform Padrón cache for the CUIT, and
|
|
969
|
+
* otherwise refuses `400 INVOICE_METHOD_RAZON_SOCIAL_MISSING` until the
|
|
970
|
+
* operator completes it.
|
|
967
971
|
* - `condFiscalName` is display-only and usually absent. Never read it for
|
|
968
972
|
* meaning: derive the name from `condFiscal` with the published
|
|
969
973
|
* `FISCAL_CONDITIONS` catalogue (its docblock gives the lookup, since
|
package/dist/store.d.ts
CHANGED
|
@@ -388,6 +388,27 @@ declare global {
|
|
|
388
388
|
*/
|
|
389
389
|
userId: string;
|
|
390
390
|
}
|
|
391
|
+
/** A STORE contact leaf that tenant self-registration may prefill. */
|
|
392
|
+
type StoreRegistrationPrefillField = 'phone' | 'email';
|
|
393
|
+
/**
|
|
394
|
+
* Which top-level contact leaves tenant self-registration wrote onto this
|
|
395
|
+
* STORE row, and when — the record that `phone` / `email` came from the
|
|
396
|
+
* signup form (`TenantRegisterInput.storeContact`) rather than from the
|
|
397
|
+
* store settings.
|
|
398
|
+
*
|
|
399
|
+
* ⚠️ Server-owned and forward-only, like {@link StoreAcquisition}: the api
|
|
400
|
+
* assembles it from the keys `storeContact` actually carried, and no body
|
|
401
|
+
* may set it — the register body ignores a top-level `registrationPrefill`,
|
|
402
|
+
* and `POST /store` / `POST /tenants` refuse it `FIELD_SERVER_OWNED`. No
|
|
403
|
+
* route rewrites or clears it, so it keeps describing the SIGNUP even after
|
|
404
|
+
* an operator edits the contact leaves it names.
|
|
405
|
+
*/
|
|
406
|
+
interface StoreRegistrationPrefill {
|
|
407
|
+
/** The leaves the registration wrote, in `['phone', 'email']` order; never empty. */
|
|
408
|
+
fields: StoreRegistrationPrefillField[];
|
|
409
|
+
/** Unix ms — the registration's own `createdAt`, the instant the STORE item is stamped with. */
|
|
410
|
+
capturedAt: number;
|
|
411
|
+
}
|
|
391
412
|
/**
|
|
392
413
|
* The shop's public address, as every link minter and every client reads it.
|
|
393
414
|
* Computed by the api from server-owned row fields that never reach a client
|
|
@@ -501,6 +522,13 @@ declare global {
|
|
|
501
522
|
* permanently absent by construction.
|
|
502
523
|
*/
|
|
503
524
|
termsConsent?: StoreTermsConsent;
|
|
525
|
+
/**
|
|
526
|
+
* Which contact leaves tenant self-registration prefilled, and when.
|
|
527
|
+
* Admin-only; absent on every row the signup did not prefill — including
|
|
528
|
+
* every row written before this shipped (forward-only, never backfilled)
|
|
529
|
+
* and every operator-created tenant.
|
|
530
|
+
*/
|
|
531
|
+
registrationPrefill?: StoreRegistrationPrefill;
|
|
504
532
|
/**
|
|
505
533
|
* Response-time join, not a persisted Store attribute — and TWO different
|
|
506
534
|
* shapes depending on the endpoint: `GET /tenants` (SUPERVISOR) attaches the
|