sinfactura-types 1.10.78 → 1.10.80
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/platform.d.ts +36 -0
- package/dist/userActivity.d.ts +31 -0
- package/package.json +47 -47
package/dist/platform.d.ts
CHANGED
|
@@ -265,3 +265,39 @@ export interface PlatformOverridesRosterResponse {
|
|
|
265
265
|
/** Unix ms. */
|
|
266
266
|
builtAt: number;
|
|
267
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Why a plan's marketing copy disagrees with the entitlements actually backing
|
|
270
|
+
* that tier. Advisory only — `PATCH /platform/billing/plans/{tier}` reports
|
|
271
|
+
* these and still applies the write. It never blocks: tiers are hand-tuned
|
|
272
|
+
* between pricing decisions, so a mismatch is routinely the intended
|
|
273
|
+
* intermediate state rather than an error.
|
|
274
|
+
*
|
|
275
|
+
* - `NUMERIC_MISMATCH` — a bullet advertises a number that differs from the
|
|
276
|
+
* numeric entitlement it maps to.
|
|
277
|
+
* - `UNLIMITED_ADVERTISED_AS_CAPPED` — the entitlement is `-1` (unlimited) but
|
|
278
|
+
* the copy advertises a finite cap. Reported separately because the equality
|
|
279
|
+
* compare would otherwise render it as a nonsense mismatch against `-1`.
|
|
280
|
+
* - `UNBACKED_CAPABILITY` — the copy names a capability the tier does not have
|
|
281
|
+
* `status: 'live'` and `enabled: true` for.
|
|
282
|
+
*/
|
|
283
|
+
export type CatalogWarningCode = 'NUMERIC_MISMATCH' | 'UNLIMITED_ADVERTISED_AS_CAPPED' | 'UNBACKED_CAPABILITY';
|
|
284
|
+
/**
|
|
285
|
+
* One disagreement between a plan's copy and its entitlements.
|
|
286
|
+
*
|
|
287
|
+
* ⚠️ Absence of a warning is NOT a claim that the copy is correct. The matcher
|
|
288
|
+
* pairs a bullet to a feature only on a single unambiguous keyword; a bullet
|
|
289
|
+
* matching two keywords or none is skipped rather than guessed, so it
|
|
290
|
+
* deliberately understates. Reading an empty array as "this tier's copy is
|
|
291
|
+
* verified" inverts that design.
|
|
292
|
+
*/
|
|
293
|
+
export interface CatalogWarning {
|
|
294
|
+
code: CatalogWarningCode;
|
|
295
|
+
/** Which piece of copy produced it — one of the `bullets`, or the `description`. */
|
|
296
|
+
source: 'bullets' | 'description';
|
|
297
|
+
/** The offending bullet, or the description, verbatim. */
|
|
298
|
+
text: string;
|
|
299
|
+
/** The entitlement the copy was checked against. */
|
|
300
|
+
featureKey: FeatureKey;
|
|
301
|
+
/** Human-readable, already safe to render as-is. */
|
|
302
|
+
message: string;
|
|
303
|
+
}
|
package/dist/userActivity.d.ts
CHANGED
|
@@ -124,10 +124,41 @@ declare global {
|
|
|
124
124
|
event: 'Customer Created';
|
|
125
125
|
customer_id: string;
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* One staff-side change to a single `Customer.marketing` channel.
|
|
129
|
+
*
|
|
130
|
+
* ⚠️ `to` is the literal `false`, not `boolean`, and that is load-bearing.
|
|
131
|
+
* Staff may CLEAR a consent flag and may never grant one — a customer's
|
|
132
|
+
* consent can only ever come from the customer. Typing the literal makes
|
|
133
|
+
* the compiler refuse an emission that records a grant, so the rule is
|
|
134
|
+
* enforced at every call site rather than restated in a comment. Widening
|
|
135
|
+
* this to `boolean` would be a deliberate change to that policy, which is
|
|
136
|
+
* exactly the kind of decision that should cost a types publish.
|
|
137
|
+
*
|
|
138
|
+
* `from` is `null` when the channel had never been set, which is a
|
|
139
|
+
* different fact from `false` (explicitly opted out before) and must stay
|
|
140
|
+
* distinguishable in an audit record.
|
|
141
|
+
*/
|
|
142
|
+
interface CustomerConsentChange {
|
|
143
|
+
channel: 'adds' | 'email' | 'phone' | 'sms' | 'whatsapp';
|
|
144
|
+
from: boolean | null;
|
|
145
|
+
to: false;
|
|
146
|
+
}
|
|
127
147
|
interface CustomerEditedEvent extends UserActivityEventBase {
|
|
128
148
|
event: 'Customer Edited';
|
|
129
149
|
customer_id: string;
|
|
130
150
|
fields_changed: string[];
|
|
151
|
+
/**
|
|
152
|
+
* Present only when a staff-side write touched `Customer.marketing`.
|
|
153
|
+
* Absent — not an empty array — when the edit left consent alone, so
|
|
154
|
+
* "no consent change" and "consent examined and unchanged" do not have
|
|
155
|
+
* to be told apart by a reader.
|
|
156
|
+
*
|
|
157
|
+
* `who` and `when` are already carried by `UserActivityEventBase`
|
|
158
|
+
* (`actor_full_name`, `actor_role`, `ts`); this adds only the per-
|
|
159
|
+
* channel before/after the base cannot express.
|
|
160
|
+
*/
|
|
161
|
+
consent_changes?: CustomerConsentChange[];
|
|
131
162
|
}
|
|
132
163
|
interface CashDrawerOpenedEvent extends UserActivityEventBase {
|
|
133
164
|
event: 'Cash Drawer Opened';
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
2
|
+
"name": "sinfactura-types",
|
|
3
|
+
"version": "1.10.80",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }) + '\\n')\"",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"login": "npm login",
|
|
18
|
+
"release": "npm version patch --no-git-tag-version",
|
|
19
|
+
"lint": "eslint ."
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public",
|
|
23
|
+
"registry": "https://registry.npmjs.org/"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/sinfactura/types"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": "Moises Samuel Maison Maison",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"homepage": "https://sinfactura.com",
|
|
33
|
+
"files": [
|
|
34
|
+
"./dist"
|
|
35
|
+
],
|
|
36
|
+
"release": {
|
|
37
|
+
"branches": [
|
|
38
|
+
"main"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@eslint/js": "^10.0.1",
|
|
43
|
+
"eslint": "^10.8.0",
|
|
44
|
+
"globals": "^17.9.0",
|
|
45
|
+
"typescript": "^6.0.3",
|
|
46
|
+
"typescript-eslint": "^8.66.0"
|
|
47
|
+
},
|
|
48
|
+
"packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728"
|
|
49
49
|
}
|