@autobusal/providers 1.41.0 → 1.41.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/types/settings.ts +37 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.41.0",
3
+ "version": "1.41.2",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
package/types/settings.ts CHANGED
@@ -216,20 +216,29 @@ export interface LabelSettings {
216
216
  name: string
217
217
  },
218
218
 
219
+ /**
220
+ * Claude - 2026-08-29 (Ferjolt: "remove the tab and proceed with the
221
+ * rename").
222
+ *
223
+ * ONE SETTING LEFT. The six multipliers that were here - label / general
224
+ * / visitor, each with an agent and an operator rate - adjusted
225
+ * commissions after a BKT sale, which was the card surcharge done the
226
+ * wrong way round: recovered quietly from the operator and the agent
227
+ * rather than asked of the person paying. Payments\Surcharge replaced
228
+ * them and their admin tab is gone.
229
+ *
230
+ * `direct_sale` (formerly `reservation`, which named nothing - every
231
+ * booking is a reservation) is the extra commission an OPERATOR pays us
232
+ * when a sale comes through the brand's own website rather than through
233
+ * an agent. A percentage now, not the raw multiplier it used to be: 5
234
+ * means 5%. See obtapi's Comissions\Calculate::obtComission, which is
235
+ * where it is explained in full, and where it is the only reader.
236
+ *
237
+ * Optional so an older obtapi, or a brand whose settings predate the
238
+ * rename, reads as "charges nothing extra" rather than as NaN.
239
+ */
219
240
  comissions: {
220
- label: {
221
- agent: number
222
- operator: number
223
- }
224
- general: {
225
- agent: number
226
- operator: number
227
- }
228
- visitor: {
229
- agent: number
230
- operator: number
231
- }
232
- reservation: number
241
+ direct_sale?: number
233
242
  }
234
243
 
235
244
  social: {
@@ -406,6 +415,21 @@ export interface GatewayCredentials<T> {
406
415
  mode: 'sandbox' | 'production'
407
416
  sandbox: T
408
417
  production: T
418
+
419
+ /**
420
+ * The CARD SURCHARGE this gateway carries on this brand, as a percentage
421
+ * (5 means 5%).
422
+ *
423
+ * Claude - 2026-08-29 (ruling by Ferjolt): what the payer is charged on
424
+ * top of what they owe, for settling online - see obtapi's
425
+ * App\Libraries\Payments\Surcharge.
426
+ *
427
+ * BESIDE the credentials rather than inside `sandbox`/`production`,
428
+ * deliberately: a commercial term is not a credential, and it must not
429
+ * change when a brand flips to production. Optional because no existing
430
+ * brand has one, which reads as no surcharge.
431
+ */
432
+ surcharge?: number
409
433
  }
410
434
 
411
435
  export interface LabelPayments {