@ingenx-io/valets-schema-mcp-server 0.2.5 → 0.2.6
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/data/docs/enums/app-status.md +1 -1
- package/data/docs/enums/attention-status.md +1 -1
- package/data/docs/enums/booking-status.md +1 -1
- package/data/docs/enums/contract-status.md +24 -0
- package/data/docs/enums/customer-payment-status.md +2 -2
- package/data/docs/enums/customer-payment-target-type.md +2 -2
- package/data/docs/enums/delivery-type.md +2 -2
- package/data/docs/enums/deployment-link-type.md +2 -2
- package/data/docs/enums/event-status.md +2 -2
- package/data/docs/enums/fulfillment-status.md +2 -2
- package/data/docs/enums/loyalty-transaction-type.md +2 -2
- package/data/docs/enums/milestone-status.md +23 -0
- package/data/docs/enums/notification-channel.md +2 -2
- package/data/docs/enums/notification-entity-type.md +2 -2
- package/data/docs/enums/notification-status.md +2 -2
- package/data/docs/enums/order-status.md +2 -2
- package/data/docs/enums/outbound-message-format.md +2 -2
- package/data/docs/enums/outbound-message-purpose.md +2 -2
- package/data/docs/enums/outbound-message-status.md +2 -2
- package/data/docs/enums/payment-method.md +2 -2
- package/data/docs/enums/payment-proof-status.md +2 -2
- package/data/docs/enums/payment-status.md +2 -2
- package/data/docs/enums/pending-issue.md +2 -2
- package/data/docs/enums/return-status.md +2 -2
- package/data/docs/enums/session-status.md +2 -2
- package/data/docs/enums/site-status.md +2 -2
- package/data/docs/enums/stocktake-frequency.md +2 -2
- package/data/docs/enums/stocktake-item-status.md +2 -2
- package/data/docs/enums/stocktake-status.md +2 -2
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/enums/waba-label.md +3 -3
- package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
- package/data/docs/enums/whatsapp-template-component.md +2 -2
- package/data/docs/enums/whatsapp-template-status.md +2 -2
- package/data/docs/index.md +11 -5
- package/data/docs/models/allowed-user.md +1 -1
- package/data/docs/models/analytics-backfill.md +1 -1
- package/data/docs/models/analytics-daily.md +1 -1
- package/data/docs/models/analytics-event.md +1 -1
- package/data/docs/models/analytics-hourly.md +1 -1
- package/data/docs/models/app-payment.md +1 -1
- package/data/docs/models/app.md +45 -21
- package/data/docs/models/booking-version.md +1 -1
- package/data/docs/models/booking.md +1 -1
- package/data/docs/models/contract.md +454 -0
- package/data/docs/models/customer-payment-allocation.md +2 -2
- package/data/docs/models/customer-payment.md +2 -2
- package/data/docs/models/customer.md +2 -2
- package/data/docs/models/event.md +2 -2
- package/data/docs/models/loyalty-config.md +2 -2
- package/data/docs/models/loyalty-reward.md +2 -2
- package/data/docs/models/loyalty-status.md +2 -2
- package/data/docs/models/loyalty-transaction.md +2 -2
- package/data/docs/models/magic-link-request.md +2 -2
- package/data/docs/models/metrics-current.md +2 -2
- package/data/docs/models/metrics-daily.md +2 -2
- package/data/docs/models/metrics-monthly.md +2 -2
- package/data/docs/models/notification-record.md +2 -2
- package/data/docs/models/order-item.md +2 -2
- package/data/docs/models/order.md +238 -218
- package/data/docs/models/outbound-payment-allocation.md +195 -0
- package/data/docs/models/outbound-payment.md +318 -0
- package/data/docs/models/payment-webhook-endpoint.md +191 -0
- package/data/docs/models/sale.md +2 -2
- package/data/docs/models/site-payment.md +2 -2
- package/data/docs/models/site.md +2 -2
- package/data/docs/models/stocktake-item.md +2 -2
- package/data/docs/models/stocktake.md +2 -2
- package/data/docs/models/ticket.md +2 -2
- package/data/docs/models/user.md +2 -2
- package/data/docs/models/whatsapp-inbound-message.md +6 -2
- package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
- package/data/docs/models/whatsapp-outbound-message.md +39 -23
- package/data/docs/models/whatsapp-template.md +6 -2
- package/data/static/llms.txt +145 -5
- package/data/static/openapi.yaml +456 -14
- package/data/static/schemas.json +477 -9
- package/package.json +1 -1
package/data/static/openapi.yaml
CHANGED
|
@@ -51,6 +51,16 @@ components:
|
|
|
51
51
|
- COMPLETED_MIXED
|
|
52
52
|
description: Booking lifecycle status. COMPLETED_MIXED = some sessions completed,
|
|
53
53
|
others cancelled/no-show.
|
|
54
|
+
ContractStatus:
|
|
55
|
+
type: string
|
|
56
|
+
enum:
|
|
57
|
+
- DRAFT
|
|
58
|
+
- ACTIVE
|
|
59
|
+
- COMPLETED
|
|
60
|
+
- TERMINATED
|
|
61
|
+
description: Lifecycle status of a Contract. DRAFT = not yet signed. ACTIVE
|
|
62
|
+
= in force. COMPLETED = all milestones paid and obligations met. TERMINATED
|
|
63
|
+
= ended early by either party.
|
|
54
64
|
CustomerPaymentStatus:
|
|
55
65
|
type: string
|
|
56
66
|
enum:
|
|
@@ -120,6 +130,14 @@ components:
|
|
|
120
130
|
- BONUS
|
|
121
131
|
- REFUND
|
|
122
132
|
description: Loyalty point transaction type (D07). SCREAMING_SNAKE past tense.
|
|
133
|
+
MilestoneStatus:
|
|
134
|
+
type: string
|
|
135
|
+
enum:
|
|
136
|
+
- PENDING
|
|
137
|
+
- INVOICED
|
|
138
|
+
- PAID
|
|
139
|
+
description: Status of a ContractMilestone (#17). PENDING = created, not yet
|
|
140
|
+
invoiced. INVOICED = invoice issued, awaiting payment. PAID = payment received.
|
|
123
141
|
NotificationChannel:
|
|
124
142
|
type: string
|
|
125
143
|
enum:
|
|
@@ -309,8 +327,9 @@ components:
|
|
|
309
327
|
enum:
|
|
310
328
|
- cmz
|
|
311
329
|
- val
|
|
312
|
-
description:
|
|
313
|
-
|
|
330
|
+
description: WABA label identifying which Meta Business Account sent/received
|
|
331
|
+
the message. cmz = Chez Miss Zahoui sender; val = Valets sender. See WhatsApp
|
|
332
|
+
platform constraints doc (#50).
|
|
314
333
|
WhatsappButtonSubType:
|
|
315
334
|
type: string
|
|
316
335
|
enum:
|
|
@@ -1022,18 +1041,22 @@ components:
|
|
|
1022
1041
|
- string
|
|
1023
1042
|
- 'null'
|
|
1024
1043
|
status:
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1044
|
+
anyOf:
|
|
1045
|
+
- $ref: '#/components/schemas/AppStatus'
|
|
1046
|
+
- type: 'null'
|
|
1047
|
+
x-note: Real Firestore documents may be missing this field on pre-backfill
|
|
1048
|
+
records (#26). Treat absent as ACTIVE. A backfill script will populate
|
|
1049
|
+
status=ACTIVE on all existing documents; once confirmed, this field will
|
|
1050
|
+
be promoted to required.
|
|
1051
|
+
x-when: Written by operators via dashboard or by server triggers (expiration).
|
|
1052
|
+
Clients must not use server-side `where(status == ACTIVE)` until backfill
|
|
1053
|
+
is complete — filter client-side instead, treating absent as ACTIVE.
|
|
1054
|
+
description: Lifecycle status (D41/D44). Optional pending backfill of pre-existing
|
|
1055
|
+
records (#26) — treat absent as ACTIVE. Clients filter by ACTIVE.
|
|
1031
1056
|
x-see:
|
|
1032
1057
|
decisions:
|
|
1033
1058
|
- D41
|
|
1034
1059
|
- D44
|
|
1035
|
-
x-when: Written by operators via dashboard or by server triggers (expiration).
|
|
1036
|
-
Clients filter by ACTIVE.
|
|
1037
1060
|
deploymentLinks:
|
|
1038
1061
|
type: array
|
|
1039
1062
|
items:
|
|
@@ -1154,7 +1177,6 @@ components:
|
|
|
1154
1177
|
required:
|
|
1155
1178
|
- companyId
|
|
1156
1179
|
- name
|
|
1157
|
-
- status
|
|
1158
1180
|
- deploymentLinks
|
|
1159
1181
|
- createdBy
|
|
1160
1182
|
- analyticsEnabled
|
|
@@ -1172,7 +1194,6 @@ components:
|
|
|
1172
1194
|
required:
|
|
1173
1195
|
- companyId
|
|
1174
1196
|
- name
|
|
1175
|
-
- status
|
|
1176
1197
|
- deploymentLinks
|
|
1177
1198
|
- createdBy
|
|
1178
1199
|
- analyticsEnabled
|
|
@@ -1882,6 +1903,156 @@ components:
|
|
|
1882
1903
|
description: 'BookingVersion model (D18). Collection: companies/{companyId}/bookings/{bookingId}/versions/{versionId}.
|
|
1883
1904
|
Server-owned audit trail written by Firebase trigger on every Booking mutation.
|
|
1884
1905
|
Captures writes from all clients.'
|
|
1906
|
+
Contract:
|
|
1907
|
+
type: object
|
|
1908
|
+
properties:
|
|
1909
|
+
id:
|
|
1910
|
+
readOnly: true
|
|
1911
|
+
description: (Read-only) Firestore document ID, auto-generated.
|
|
1912
|
+
type:
|
|
1913
|
+
- string
|
|
1914
|
+
- 'null'
|
|
1915
|
+
companyId:
|
|
1916
|
+
type: string
|
|
1917
|
+
x-immutable: true
|
|
1918
|
+
description: (Immutable) FK → Company document ID.
|
|
1919
|
+
payeeId:
|
|
1920
|
+
type: string
|
|
1921
|
+
x-immutable: true
|
|
1922
|
+
description: '(Immutable) FK → Payee document ID. Full Payee model tracked
|
|
1923
|
+
in #20.'
|
|
1924
|
+
title:
|
|
1925
|
+
type: string
|
|
1926
|
+
description: Contract title or reference name shown in dashboards.
|
|
1927
|
+
description:
|
|
1928
|
+
description: Optional freeform description of the contract scope.
|
|
1929
|
+
type:
|
|
1930
|
+
- string
|
|
1931
|
+
- 'null'
|
|
1932
|
+
status:
|
|
1933
|
+
$ref: '#/components/schemas/ContractStatus'
|
|
1934
|
+
description: Contract lifecycle status (#14). Query by ACTIVE — do not use
|
|
1935
|
+
an isActive boolean.
|
|
1936
|
+
currency:
|
|
1937
|
+
type: string
|
|
1938
|
+
const: XOF
|
|
1939
|
+
description: Currency code. Locked to XOF (#18). Multi-currency support
|
|
1940
|
+
requires a deliberate schema version bump.
|
|
1941
|
+
totalAmount:
|
|
1942
|
+
type: number
|
|
1943
|
+
description: Total contract value (XOF).
|
|
1944
|
+
startDate:
|
|
1945
|
+
type: string
|
|
1946
|
+
description: Contract start date (ISO 8601 YYYY-MM-DD).
|
|
1947
|
+
endDate:
|
|
1948
|
+
description: Contract end date (ISO 8601 YYYY-MM-DD). Absent for open-ended
|
|
1949
|
+
contracts.
|
|
1950
|
+
type:
|
|
1951
|
+
- string
|
|
1952
|
+
- 'null'
|
|
1953
|
+
milestones:
|
|
1954
|
+
description: Ordered list of payment milestones. Embedded in the contract
|
|
1955
|
+
document (#17).
|
|
1956
|
+
type:
|
|
1957
|
+
- array
|
|
1958
|
+
- 'null'
|
|
1959
|
+
items:
|
|
1960
|
+
type: object
|
|
1961
|
+
properties:
|
|
1962
|
+
id:
|
|
1963
|
+
type: string
|
|
1964
|
+
description: Client-generated milestone ID (UUID or slug). Unique
|
|
1965
|
+
within the contract.
|
|
1966
|
+
title:
|
|
1967
|
+
type: string
|
|
1968
|
+
description: Milestone description or deliverable name.
|
|
1969
|
+
amount:
|
|
1970
|
+
type: number
|
|
1971
|
+
description: Amount due at this milestone (XOF).
|
|
1972
|
+
dueDate:
|
|
1973
|
+
description: ISO 8601 date string (YYYY-MM-DD) when the milestone
|
|
1974
|
+
is due. OVERDUE is derived at read time from dueDate — not stored.
|
|
1975
|
+
type: string
|
|
1976
|
+
status:
|
|
1977
|
+
$ref: '#/components/schemas/MilestoneStatus'
|
|
1978
|
+
x-note: Existing Firestore documents may have lowercase values (pending,
|
|
1979
|
+
invoiced, paid) from before this enum was introduced (#17). Normalize
|
|
1980
|
+
on read or via migration script.
|
|
1981
|
+
description: Milestone payment status (#17). OVERDUE is derived at
|
|
1982
|
+
read time from dueDate, not stored.
|
|
1983
|
+
invoicedAt:
|
|
1984
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
1985
|
+
description: When the invoice was issued for this milestone.
|
|
1986
|
+
paidAt:
|
|
1987
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
1988
|
+
description: When payment was received for this milestone.
|
|
1989
|
+
notes:
|
|
1990
|
+
description: Optional notes for this milestone.
|
|
1991
|
+
type: string
|
|
1992
|
+
required:
|
|
1993
|
+
- id
|
|
1994
|
+
- title
|
|
1995
|
+
- amount
|
|
1996
|
+
- status
|
|
1997
|
+
additionalProperties: false
|
|
1998
|
+
description: ContractMilestone — embedded sub-object on Contract (#17).
|
|
1999
|
+
Not a separate collection.
|
|
2000
|
+
notes:
|
|
2001
|
+
description: Optional internal notes.
|
|
2002
|
+
type:
|
|
2003
|
+
- string
|
|
2004
|
+
- 'null'
|
|
2005
|
+
createdBy:
|
|
2006
|
+
type: string
|
|
2007
|
+
x-immutable: true
|
|
2008
|
+
description: (Immutable) FK → User/staff UID who created the contract.
|
|
2009
|
+
createdAt:
|
|
2010
|
+
anyOf:
|
|
2011
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
2012
|
+
- type: 'null'
|
|
2013
|
+
readOnly: true
|
|
2014
|
+
description: (Read-only) Server-generated creation timestamp.
|
|
2015
|
+
updatedAt:
|
|
2016
|
+
anyOf:
|
|
2017
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
2018
|
+
- type: 'null'
|
|
2019
|
+
readOnly: true
|
|
2020
|
+
description: (Read-only) Server-generated update timestamp.
|
|
2021
|
+
required:
|
|
2022
|
+
- companyId
|
|
2023
|
+
- payeeId
|
|
2024
|
+
- title
|
|
2025
|
+
- status
|
|
2026
|
+
- currency
|
|
2027
|
+
- totalAmount
|
|
2028
|
+
- startDate
|
|
2029
|
+
- createdBy
|
|
2030
|
+
additionalProperties: false
|
|
2031
|
+
description: 'Contract model (GH#14/#17/#18). Collection: companies/{companyId}/contracts/{contractId}.
|
|
2032
|
+
Service/supplier contract between a company and a Payee. No isActive field
|
|
2033
|
+
— query by status. Currency locked to XOF. Milestones use MilestoneStatus
|
|
2034
|
+
enum (no stored OVERDUE).'
|
|
2035
|
+
ContractCreate:
|
|
2036
|
+
allOf:
|
|
2037
|
+
- $ref: '#/components/schemas/Contract'
|
|
2038
|
+
description: Write payload for creating a new Contract document. Fields marked
|
|
2039
|
+
`readOnly` are server-set and must not be included. Fields marked `x-immutable`
|
|
2040
|
+
may be set once at creation.
|
|
2041
|
+
required:
|
|
2042
|
+
- companyId
|
|
2043
|
+
- payeeId
|
|
2044
|
+
- title
|
|
2045
|
+
- status
|
|
2046
|
+
- currency
|
|
2047
|
+
- totalAmount
|
|
2048
|
+
- startDate
|
|
2049
|
+
- createdBy
|
|
2050
|
+
ContractUpdate:
|
|
2051
|
+
allOf:
|
|
2052
|
+
- $ref: '#/components/schemas/Contract'
|
|
2053
|
+
description: Write payload for partial update (PATCH) of a Contract document.
|
|
2054
|
+
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
2055
|
+
sent.
|
|
1885
2056
|
Customer:
|
|
1886
2057
|
type: object
|
|
1887
2058
|
properties:
|
|
@@ -3781,6 +3952,17 @@ components:
|
|
|
3781
3952
|
type: string
|
|
3782
3953
|
readOnly: true
|
|
3783
3954
|
description: (Read-only) Server-generated order number.
|
|
3955
|
+
followUpUrl:
|
|
3956
|
+
x-note: Standardized casing is followUpUrl (not followUpURL). Mobile legacy
|
|
3957
|
+
code reads both casings for backward compat but writes followUpUrl going
|
|
3958
|
+
forward (#6).
|
|
3959
|
+
x-when: 'Used by mobile to generate QR codes on printed receipts. If absent,
|
|
3960
|
+
the mobile app derives a deterministic fallback: https://zahoui.web.app/reviews?orderNumber={orderNumber}.'
|
|
3961
|
+
description: 'Optional URL for receipt QR code / post-order follow-up. Canonical
|
|
3962
|
+
casing: followUpUrl (#6).'
|
|
3963
|
+
type:
|
|
3964
|
+
- string
|
|
3965
|
+
- 'null'
|
|
3784
3966
|
status:
|
|
3785
3967
|
$ref: '#/components/schemas/OrderStatus'
|
|
3786
3968
|
description: Core lifecycle status (D34, MIG-11). See OrderStatus enum for
|
|
@@ -4315,6 +4497,235 @@ components:
|
|
|
4315
4497
|
description: Write payload for partial update (PATCH) of a OrderItem document.
|
|
4316
4498
|
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
4317
4499
|
sent.
|
|
4500
|
+
OutboundPayment:
|
|
4501
|
+
type: object
|
|
4502
|
+
properties:
|
|
4503
|
+
id:
|
|
4504
|
+
readOnly: true
|
|
4505
|
+
description: (Read-only) Firestore document ID, auto-generated.
|
|
4506
|
+
type:
|
|
4507
|
+
- string
|
|
4508
|
+
- 'null'
|
|
4509
|
+
companyId:
|
|
4510
|
+
type: string
|
|
4511
|
+
x-immutable: true
|
|
4512
|
+
description: (Immutable) FK → Company document ID.
|
|
4513
|
+
payeeId:
|
|
4514
|
+
type: string
|
|
4515
|
+
x-immutable: true
|
|
4516
|
+
description: '(Immutable) FK → Payee document ID. Full Payee model tracked
|
|
4517
|
+
in #20.'
|
|
4518
|
+
contractId:
|
|
4519
|
+
x-immutable: true
|
|
4520
|
+
description: (Immutable, Optional) FK → Contract document ID. Absent for
|
|
4521
|
+
ad-hoc payments outside a formal contract.
|
|
4522
|
+
type:
|
|
4523
|
+
- string
|
|
4524
|
+
- 'null'
|
|
4525
|
+
amount:
|
|
4526
|
+
type: number
|
|
4527
|
+
description: Amount paid (XOF).
|
|
4528
|
+
currency:
|
|
4529
|
+
type: string
|
|
4530
|
+
const: XOF
|
|
4531
|
+
description: Currency code. Locked to XOF — consistent with Contract and
|
|
4532
|
+
CustomerPayment.
|
|
4533
|
+
method:
|
|
4534
|
+
$ref: '#/components/schemas/PaymentMethod'
|
|
4535
|
+
description: Payment method used (e.g. BANK_TRANSFER, MOBILE_MONEY, CHECK).
|
|
4536
|
+
reference:
|
|
4537
|
+
description: Optional payment reference — bank transaction number, check
|
|
4538
|
+
number, Wave ref, etc.
|
|
4539
|
+
type:
|
|
4540
|
+
- string
|
|
4541
|
+
- 'null'
|
|
4542
|
+
paidAt:
|
|
4543
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
4544
|
+
description: When the payment was made.
|
|
4545
|
+
notes:
|
|
4546
|
+
description: Optional internal notes.
|
|
4547
|
+
type:
|
|
4548
|
+
- string
|
|
4549
|
+
- 'null'
|
|
4550
|
+
createdBy:
|
|
4551
|
+
type: string
|
|
4552
|
+
x-immutable: true
|
|
4553
|
+
description: (Immutable) FK → User/staff UID who recorded the payment.
|
|
4554
|
+
createdAt:
|
|
4555
|
+
anyOf:
|
|
4556
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4557
|
+
- type: 'null'
|
|
4558
|
+
readOnly: true
|
|
4559
|
+
description: (Read-only) Server-generated creation timestamp.
|
|
4560
|
+
updatedAt:
|
|
4561
|
+
anyOf:
|
|
4562
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4563
|
+
- type: 'null'
|
|
4564
|
+
readOnly: true
|
|
4565
|
+
description: (Read-only) Server-generated update timestamp.
|
|
4566
|
+
required:
|
|
4567
|
+
- companyId
|
|
4568
|
+
- payeeId
|
|
4569
|
+
- amount
|
|
4570
|
+
- currency
|
|
4571
|
+
- method
|
|
4572
|
+
- paidAt
|
|
4573
|
+
- createdBy
|
|
4574
|
+
additionalProperties: false
|
|
4575
|
+
description: 'OutboundPayment (GH#15). Collection: companies/{companyId}/outboundPayments/{paymentId}.
|
|
4576
|
+
Single outbound transfer to a Payee. Canonical name chosen over SupplierPayment/VendorPayment
|
|
4577
|
+
— direction-based, agnostic of payee type. Currency locked to XOF.'
|
|
4578
|
+
OutboundPaymentCreate:
|
|
4579
|
+
allOf:
|
|
4580
|
+
- $ref: '#/components/schemas/OutboundPayment'
|
|
4581
|
+
description: Write payload for creating a new OutboundPayment document. Fields
|
|
4582
|
+
marked `readOnly` are server-set and must not be included. Fields marked `x-immutable`
|
|
4583
|
+
may be set once at creation.
|
|
4584
|
+
required:
|
|
4585
|
+
- companyId
|
|
4586
|
+
- payeeId
|
|
4587
|
+
- amount
|
|
4588
|
+
- currency
|
|
4589
|
+
- method
|
|
4590
|
+
- paidAt
|
|
4591
|
+
- createdBy
|
|
4592
|
+
OutboundPaymentUpdate:
|
|
4593
|
+
allOf:
|
|
4594
|
+
- $ref: '#/components/schemas/OutboundPayment'
|
|
4595
|
+
description: Write payload for partial update (PATCH) of a OutboundPayment document.
|
|
4596
|
+
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
4597
|
+
sent.
|
|
4598
|
+
OutboundPaymentAllocation:
|
|
4599
|
+
type: object
|
|
4600
|
+
properties:
|
|
4601
|
+
id:
|
|
4602
|
+
readOnly: true
|
|
4603
|
+
description: (Read-only) Firestore document ID, auto-generated.
|
|
4604
|
+
type:
|
|
4605
|
+
- string
|
|
4606
|
+
- 'null'
|
|
4607
|
+
outboundPaymentId:
|
|
4608
|
+
type: string
|
|
4609
|
+
x-immutable: true
|
|
4610
|
+
description: (Immutable) FK → OutboundPayment document ID (parent).
|
|
4611
|
+
expenseId:
|
|
4612
|
+
type: string
|
|
4613
|
+
x-immutable: true
|
|
4614
|
+
description: '(Immutable) FK → Expense document ID. Full Expense model tracked
|
|
4615
|
+
in #20.'
|
|
4616
|
+
companyId:
|
|
4617
|
+
type: string
|
|
4618
|
+
x-immutable: true
|
|
4619
|
+
description: (Immutable) FK → Company document ID. Denormalized for collection-group
|
|
4620
|
+
queries.
|
|
4621
|
+
amount:
|
|
4622
|
+
type: number
|
|
4623
|
+
description: Amount of this payment allocated to the referenced expense
|
|
4624
|
+
(XOF).
|
|
4625
|
+
notes:
|
|
4626
|
+
description: Optional notes about this allocation.
|
|
4627
|
+
type:
|
|
4628
|
+
- string
|
|
4629
|
+
- 'null'
|
|
4630
|
+
allocatedAt:
|
|
4631
|
+
anyOf:
|
|
4632
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4633
|
+
- type: 'null'
|
|
4634
|
+
readOnly: true
|
|
4635
|
+
description: (Read-only) When this allocation was recorded.
|
|
4636
|
+
required:
|
|
4637
|
+
- outboundPaymentId
|
|
4638
|
+
- expenseId
|
|
4639
|
+
- companyId
|
|
4640
|
+
- amount
|
|
4641
|
+
additionalProperties: false
|
|
4642
|
+
description: 'OutboundPaymentAllocation (GH#15). Subcollection: companies/{companyId}/outboundPayments/{paymentId}/allocations/{allocationId}.
|
|
4643
|
+
Links an OutboundPayment to an Expense. Supports partial and multi-expense
|
|
4644
|
+
allocations.'
|
|
4645
|
+
OutboundPaymentAllocationCreate:
|
|
4646
|
+
allOf:
|
|
4647
|
+
- $ref: '#/components/schemas/OutboundPaymentAllocation'
|
|
4648
|
+
description: Write payload for creating a new OutboundPaymentAllocation document.
|
|
4649
|
+
Fields marked `readOnly` are server-set and must not be included. Fields marked
|
|
4650
|
+
`x-immutable` may be set once at creation.
|
|
4651
|
+
required:
|
|
4652
|
+
- outboundPaymentId
|
|
4653
|
+
- expenseId
|
|
4654
|
+
- companyId
|
|
4655
|
+
- amount
|
|
4656
|
+
OutboundPaymentAllocationUpdate:
|
|
4657
|
+
allOf:
|
|
4658
|
+
- $ref: '#/components/schemas/OutboundPaymentAllocation'
|
|
4659
|
+
description: Write payload for partial update (PATCH) of a OutboundPaymentAllocation
|
|
4660
|
+
document. All fields optional. Fields marked `readOnly` or `x-immutable` must
|
|
4661
|
+
not be sent.
|
|
4662
|
+
PaymentWebhookEndpoint:
|
|
4663
|
+
type: object
|
|
4664
|
+
properties:
|
|
4665
|
+
token:
|
|
4666
|
+
type: string
|
|
4667
|
+
x-immutable: true
|
|
4668
|
+
description: (Immutable) base64url-encoded 24-byte random token. Also the
|
|
4669
|
+
Firestore document ID and the URL path segment.
|
|
4670
|
+
company:
|
|
4671
|
+
type: string
|
|
4672
|
+
x-immutable: true
|
|
4673
|
+
description: (Immutable) Company slug (e.g. gerko_studios). Identifies the
|
|
4674
|
+
tenant that owns this endpoint.
|
|
4675
|
+
provider:
|
|
4676
|
+
type: string
|
|
4677
|
+
enum:
|
|
4678
|
+
- wave
|
|
4679
|
+
- jeko
|
|
4680
|
+
x-immutable: true
|
|
4681
|
+
description: (Immutable) Payment provider whose webhooks this endpoint accepts.
|
|
4682
|
+
secret:
|
|
4683
|
+
type: string
|
|
4684
|
+
x-note: Provider-specific webhook signing secret. Used to verify HMAC-SHA256
|
|
4685
|
+
signatures on inbound payloads. Never expose to clients.
|
|
4686
|
+
readOnly: true
|
|
4687
|
+
description: Webhook signing secret for HMAC verification. Backend-only
|
|
4688
|
+
— never returned to dashboard or mobile clients.
|
|
4689
|
+
active:
|
|
4690
|
+
type: boolean
|
|
4691
|
+
description: Whether this endpoint is currently active. Inactive endpoints
|
|
4692
|
+
reject incoming webhooks.
|
|
4693
|
+
createdAt:
|
|
4694
|
+
anyOf:
|
|
4695
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4696
|
+
- type: 'null'
|
|
4697
|
+
readOnly: true
|
|
4698
|
+
description: (Read-only) When this endpoint was provisioned.
|
|
4699
|
+
required:
|
|
4700
|
+
- token
|
|
4701
|
+
- company
|
|
4702
|
+
- provider
|
|
4703
|
+
- secret
|
|
4704
|
+
- active
|
|
4705
|
+
additionalProperties: false
|
|
4706
|
+
x-internal: true
|
|
4707
|
+
description: 'PaymentWebhookEndpoint (GH#41). Collection: payment_webhook_endpoints/{token}.
|
|
4708
|
+
Top-level, not tenant-scoped. Provisioned by superadmin; used by the backend
|
|
4709
|
+
to verify inbound payment webhooks from Wave and Jeko. The delivery log collection
|
|
4710
|
+
(raw webhook payloads + verification outcomes) is tracked in GH#41 — shape
|
|
4711
|
+
TBD.'
|
|
4712
|
+
PaymentWebhookEndpointCreate:
|
|
4713
|
+
allOf:
|
|
4714
|
+
- $ref: '#/components/schemas/PaymentWebhookEndpoint'
|
|
4715
|
+
description: Write payload for creating a new PaymentWebhookEndpoint document.
|
|
4716
|
+
Fields marked `readOnly` are server-set and must not be included. Fields marked
|
|
4717
|
+
`x-immutable` may be set once at creation.
|
|
4718
|
+
required:
|
|
4719
|
+
- token
|
|
4720
|
+
- company
|
|
4721
|
+
- provider
|
|
4722
|
+
- active
|
|
4723
|
+
PaymentWebhookEndpointUpdate:
|
|
4724
|
+
allOf:
|
|
4725
|
+
- $ref: '#/components/schemas/PaymentWebhookEndpoint'
|
|
4726
|
+
description: Write payload for partial update (PATCH) of a PaymentWebhookEndpoint
|
|
4727
|
+
document. All fields optional. Fields marked `readOnly` or `x-immutable` must
|
|
4728
|
+
not be sent.
|
|
4318
4729
|
Sale:
|
|
4319
4730
|
type: object
|
|
4320
4731
|
properties:
|
|
@@ -5213,6 +5624,12 @@ components:
|
|
|
5213
5624
|
received the message.
|
|
5214
5625
|
waba:
|
|
5215
5626
|
$ref: '#/components/schemas/WabaLabel'
|
|
5627
|
+
x-note: 'cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188,
|
|
5628
|
+
used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone
|
|
5629
|
+
number ID 425582173979125, used for all other companies. Templates are
|
|
5630
|
+
approved at WABA level — if cmz and val share a WABA ID, all templates
|
|
5631
|
+
are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company.
|
|
5632
|
+
See messaging/whatsapp-platform-constraints (#50).'
|
|
5216
5633
|
description: (Immutable) Human-readable WABA label (cmz | val). See WabaLabel
|
|
5217
5634
|
enum.
|
|
5218
5635
|
x-immutable: true
|
|
@@ -5415,10 +5832,26 @@ components:
|
|
|
5415
5832
|
to:
|
|
5416
5833
|
type: string
|
|
5417
5834
|
x-immutable: true
|
|
5418
|
-
|
|
5419
|
-
|
|
5835
|
+
x-note: 'This is the Meta wa_id (digits only, no leading +), NOT a literal
|
|
5836
|
+
E.164 string. Meta normalizes phone numbers in non-obvious ways (e.g.
|
|
5837
|
+
+2250777471485 → wa_id 22577471485, dropping the trunk zero). The only
|
|
5838
|
+
reliable source is Meta''s contacts[].wa_id from the send response — do
|
|
5839
|
+
not derive from E.164 by stripping + alone. The dashboard conversational
|
|
5840
|
+
sends and the whatsapp-server OTP path both use the wa_id form. Confirmed
|
|
5841
|
+
in prod: ING-368.'
|
|
5842
|
+
x-when: Set at enqueue time to the recipient's Meta wa_id. Use inbound WhatsappInboundMessage.from
|
|
5843
|
+
(also wa_id) as the join key for the conversation thread.
|
|
5844
|
+
description: (Immutable) Recipient Meta wa_id — digits only, no leading
|
|
5845
|
+
+ (e.g. 22577471485). Equal to the inbound `from` for the same conversation.
|
|
5846
|
+
NOT literal E.164; see x-note (#54).
|
|
5420
5847
|
waba:
|
|
5421
5848
|
$ref: '#/components/schemas/WabaLabel'
|
|
5849
|
+
x-note: 'cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188,
|
|
5850
|
+
used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone
|
|
5851
|
+
number ID 425582173979125, used for all other companies. Templates are
|
|
5852
|
+
approved at WABA level — if cmz and val share a WABA ID, all templates
|
|
5853
|
+
are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company.
|
|
5854
|
+
See messaging/whatsapp-platform-constraints (#50).'
|
|
5422
5855
|
description: (Immutable) WABA that will send the message. Mirrors inbound
|
|
5423
5856
|
`waba`.
|
|
5424
5857
|
x-immutable: true
|
|
@@ -5504,6 +5937,9 @@ components:
|
|
|
5504
5937
|
after (sent → delivered → read, or failed).
|
|
5505
5938
|
wamid:
|
|
5506
5939
|
readOnly: true
|
|
5940
|
+
x-note: Useful for audit and dedup. Does NOT enable reply-threading for
|
|
5941
|
+
template messages — Meta silently ignores context.message_id on templates.
|
|
5942
|
+
Threading only works for kind=text within the 24-hour service window (#50).
|
|
5507
5943
|
description: (Read-only) WhatsApp message ID returned by Meta once the backend
|
|
5508
5944
|
sends. Absent while queued or on failure.
|
|
5509
5945
|
type:
|
|
@@ -5583,6 +6019,12 @@ components:
|
|
|
5583
6019
|
- 'null'
|
|
5584
6020
|
waba:
|
|
5585
6021
|
$ref: '#/components/schemas/WabaLabel'
|
|
6022
|
+
x-note: 'cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188,
|
|
6023
|
+
used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone
|
|
6024
|
+
number ID 425582173979125, used for all other companies. Templates are
|
|
6025
|
+
approved at WABA level — if cmz and val share a WABA ID, all templates
|
|
6026
|
+
are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company.
|
|
6027
|
+
See messaging/whatsapp-platform-constraints (#50).'
|
|
5586
6028
|
description: (Read-only) WABA label this template is approved on. Templates
|
|
5587
6029
|
are WABA-scoped. Mirrors WhatsappOutboundMessage.waba.
|
|
5588
6030
|
readOnly: true
|