@ingenx-io/valets-schema-mcp-server 0.1.5 → 0.1.7
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/attention-status.md +1 -1
- package/data/docs/enums/booking-status.md +1 -1
- package/data/docs/enums/customer-payment-status.md +1 -1
- package/data/docs/enums/customer-payment-target-type.md +1 -1
- package/data/docs/enums/delivery-type.md +1 -1
- package/data/docs/enums/deployment-link-type.md +1 -1
- package/data/docs/enums/event-status.md +1 -1
- package/data/docs/enums/fulfillment-status.md +1 -1
- package/data/docs/enums/loyalty-transaction-type.md +1 -1
- package/data/docs/enums/order-status.md +1 -1
- package/data/docs/enums/payment-method.md +1 -1
- package/data/docs/enums/payment-proof-status.md +1 -1
- package/data/docs/enums/payment-status.md +1 -1
- package/data/docs/enums/pending-issue.md +1 -1
- package/data/docs/enums/return-status.md +1 -1
- package/data/docs/enums/session-status.md +1 -1
- package/data/docs/enums/site-status.md +1 -1
- package/data/docs/enums/stocktake-frequency.md +24 -0
- package/data/docs/enums/stocktake-item-status.md +24 -0
- package/data/docs/enums/stocktake-status.md +24 -0
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/enums/waba-label.md +22 -0
- package/data/docs/index.md +9 -2
- 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/booking-version.md +1 -1
- package/data/docs/models/booking.md +1 -1
- package/data/docs/models/customer-payment-allocation.md +1 -1
- package/data/docs/models/customer-payment.md +1 -1
- package/data/docs/models/customer.md +1 -1
- package/data/docs/models/event.md +1 -1
- package/data/docs/models/loyalty-config.md +1 -1
- package/data/docs/models/loyalty-reward.md +1 -1
- package/data/docs/models/loyalty-status.md +1 -1
- package/data/docs/models/loyalty-transaction.md +1 -1
- package/data/docs/models/magic-link-request.md +1 -1
- package/data/docs/models/metrics-current.md +1 -1
- package/data/docs/models/metrics-daily.md +1 -1
- package/data/docs/models/metrics-monthly.md +1 -1
- package/data/docs/models/order-item.md +1 -1
- package/data/docs/models/order.md +1 -1
- package/data/docs/models/sale.md +1 -1
- package/data/docs/models/site-payment.md +1 -1
- package/data/docs/models/site.md +1 -1
- package/data/docs/models/stocktake-item.md +500 -0
- package/data/docs/models/stocktake.md +649 -0
- package/data/docs/models/ticket.md +2 -2
- package/data/docs/models/whatsapp-inbound-message.md +369 -0
- package/data/static/llms.txt +153 -1
- package/data/static/openapi.yaml +489 -0
- package/data/static/schemas.json +611 -1
- package/package.json +1 -1
package/data/static/openapi.yaml
CHANGED
|
@@ -204,6 +204,30 @@ components:
|
|
|
204
204
|
- ARCHIVED
|
|
205
205
|
description: Lifecycle status for a Site (D41). Drives whether the site is reachable
|
|
206
206
|
and whether analytics/payments flow.
|
|
207
|
+
StocktakeFrequency:
|
|
208
|
+
type: string
|
|
209
|
+
enum:
|
|
210
|
+
- DAILY
|
|
211
|
+
- WEEKLY
|
|
212
|
+
- MONTHLY
|
|
213
|
+
- AD_HOC
|
|
214
|
+
description: Recurrence cadence of a Stocktake session (GH#29 §4).
|
|
215
|
+
StocktakeItemStatus:
|
|
216
|
+
type: string
|
|
217
|
+
enum:
|
|
218
|
+
- PENDING
|
|
219
|
+
- COUNTED
|
|
220
|
+
- VERIFIED
|
|
221
|
+
- ADJUSTED
|
|
222
|
+
description: Per-line workflow status inside a Stocktake (GH#29 §4, audit Q21).
|
|
223
|
+
StocktakeStatus:
|
|
224
|
+
type: string
|
|
225
|
+
enum:
|
|
226
|
+
- PENDING
|
|
227
|
+
- IN_PROGRESS
|
|
228
|
+
- COMPLETED
|
|
229
|
+
- CANCELLED
|
|
230
|
+
description: Lifecycle status of a Stocktake session (GH#29 §3, §4).
|
|
207
231
|
TicketStatus:
|
|
208
232
|
type: string
|
|
209
233
|
enum:
|
|
@@ -211,6 +235,13 @@ components:
|
|
|
211
235
|
- USED
|
|
212
236
|
- CANCELLED
|
|
213
237
|
description: Event ticket status (D32). VALID = active and unused.
|
|
238
|
+
WabaLabel:
|
|
239
|
+
type: string
|
|
240
|
+
enum:
|
|
241
|
+
- cmz
|
|
242
|
+
- val
|
|
243
|
+
description: Human-readable WABA label identifying which Meta business number
|
|
244
|
+
received the message (GH#36).
|
|
214
245
|
FirestoreTimestamp:
|
|
215
246
|
type: object
|
|
216
247
|
properties:
|
|
@@ -3895,6 +3926,337 @@ components:
|
|
|
3895
3926
|
description: Write payload for partial update (PATCH) of a SitePayment document.
|
|
3896
3927
|
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
3897
3928
|
sent.
|
|
3929
|
+
Stocktake:
|
|
3930
|
+
type: object
|
|
3931
|
+
properties:
|
|
3932
|
+
id:
|
|
3933
|
+
readOnly: true
|
|
3934
|
+
description: (Read-only) Firestore document ID, auto-generated.
|
|
3935
|
+
type:
|
|
3936
|
+
- string
|
|
3937
|
+
- 'null'
|
|
3938
|
+
companyId:
|
|
3939
|
+
type: string
|
|
3940
|
+
x-immutable: true
|
|
3941
|
+
description: (Immutable) FK → Company document ID. Tenant scope.
|
|
3942
|
+
stocktakeNumber:
|
|
3943
|
+
type: string
|
|
3944
|
+
description: Human-readable session number, e.g. "STK-2026-001". Embedded
|
|
3945
|
+
as `referenceNumber` on the StockMovement rows the session emits, so the
|
|
3946
|
+
ledger remains traceable to the originating stocktake.
|
|
3947
|
+
stocktakeDate:
|
|
3948
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
3949
|
+
description: Effective date of the count. Distinct from createdAt; can be
|
|
3950
|
+
backdated.
|
|
3951
|
+
x-note: The date the count is FOR. Can be backdated (stocktakeDate < createdAt)
|
|
3952
|
+
— analytics buckets by stocktakeDate for "what period was counted" and
|
|
3953
|
+
by completedAt for "when adjustments hit the ledger" (GH#29 Q24).
|
|
3954
|
+
warehouseId:
|
|
3955
|
+
description: FK → Warehouse document ID. Null = whole-company stocktake
|
|
3956
|
+
(no warehouse partition).
|
|
3957
|
+
anyOf:
|
|
3958
|
+
- type: string
|
|
3959
|
+
- type: 'null'
|
|
3960
|
+
frequency:
|
|
3961
|
+
anyOf:
|
|
3962
|
+
- $ref: '#/components/schemas/StocktakeFrequency'
|
|
3963
|
+
- type: 'null'
|
|
3964
|
+
description: Recurrence cadence. Optional — leave unset for ad-hoc sessions,
|
|
3965
|
+
or set to indicate this stocktake is part of a recurring schedule.
|
|
3966
|
+
x-note: Optional today (dashboard does not currently track recurrence).
|
|
3967
|
+
Frequency is a property of the record, not a separate type — a daily stocktake
|
|
3968
|
+
is a Stocktake with frequency=DAILY, not a distinct DailyStocktake model.
|
|
3969
|
+
If the session was emitted from a recurring schedule, set Stocktake.scheduledStocktakeId;
|
|
3970
|
+
ad-hoc sessions leave it null.
|
|
3971
|
+
x-see:
|
|
3972
|
+
issues:
|
|
3973
|
+
- gh#29
|
|
3974
|
+
scheduledStocktakeId:
|
|
3975
|
+
description: FK to a recurring stocktake schedule, if this session was emitted
|
|
3976
|
+
from one. Null for ad-hoc sessions.
|
|
3977
|
+
anyOf:
|
|
3978
|
+
- type: string
|
|
3979
|
+
- type: 'null'
|
|
3980
|
+
status:
|
|
3981
|
+
$ref: '#/components/schemas/StocktakeStatus'
|
|
3982
|
+
description: Lifecycle status. Transitions PENDING → IN_PROGRESS → COMPLETED
|
|
3983
|
+
are server-owned (GH#29 §3 / Q25).
|
|
3984
|
+
x-note: PENDING = session created, no items counted yet. IN_PROGRESS = at
|
|
3985
|
+
least one item has been counted. COMPLETED = all items counted and the
|
|
3986
|
+
session was closed; on this transition the server emits one StockMovement(type=INVENTORY)
|
|
3987
|
+
per non-zero delta. CANCELLED = session abandoned without applying adjustments.
|
|
3988
|
+
Status transitions PENDING → IN_PROGRESS → COMPLETED are server-owned
|
|
3989
|
+
(Q25) — clients PATCH item status; the server transitions session status
|
|
3990
|
+
to avoid the concurrent-edit race documented in stockService.ts:1671.
|
|
3991
|
+
x-see:
|
|
3992
|
+
issues:
|
|
3993
|
+
- gh#29
|
|
3994
|
+
x-when: Server-managed. Clients write item updates; the trigger transitions
|
|
3995
|
+
session status.
|
|
3996
|
+
adjustmentsApplied:
|
|
3997
|
+
type: boolean
|
|
3998
|
+
x-note: Records whether the COMPLETED transition actually mutated stock
|
|
3999
|
+
or was record-only. The dashboard's completeInventory(applyAdjustments)
|
|
4000
|
+
flag was not persisted; this field closes that gap (GH#29 audit Q22).
|
|
4001
|
+
description: True if completing the session actually emitted StockMovement
|
|
4002
|
+
adjustments. False for record-only counts.
|
|
4003
|
+
notes:
|
|
4004
|
+
description: Free-text session-level notes.
|
|
4005
|
+
anyOf:
|
|
4006
|
+
- type: string
|
|
4007
|
+
- type: 'null'
|
|
4008
|
+
totalItemsCount:
|
|
4009
|
+
type: integer
|
|
4010
|
+
minimum: -9007199254740991
|
|
4011
|
+
maximum: 9007199254740991
|
|
4012
|
+
readOnly: true
|
|
4013
|
+
x-note: Server-derived. Recomputed by trigger on each StocktakeItem write;
|
|
4014
|
+
not safe to write client-side under concurrent edits (GH#29 audit Q23).
|
|
4015
|
+
description: (Read-only) Total number of StocktakeItem rows under this session.
|
|
4016
|
+
totalDiscrepancies:
|
|
4017
|
+
type: integer
|
|
4018
|
+
minimum: -9007199254740991
|
|
4019
|
+
maximum: 9007199254740991
|
|
4020
|
+
readOnly: true
|
|
4021
|
+
x-note: Server-derived = sum of |item.delta| across COUNTED items. Updated
|
|
4022
|
+
by trigger.
|
|
4023
|
+
description: (Read-only) Sum of absolute deltas across counted items.
|
|
4024
|
+
totalDeltaValue:
|
|
4025
|
+
type: number
|
|
4026
|
+
readOnly: true
|
|
4027
|
+
x-note: Server-derived = sum of (item.delta × item.costPerUnit) across COUNTED
|
|
4028
|
+
items, in XOF integer minor units (D18). Updated by trigger.
|
|
4029
|
+
description: (Read-only) Net valuation impact of the count, in XOF integer
|
|
4030
|
+
minor units.
|
|
4031
|
+
startedAt:
|
|
4032
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
4033
|
+
description: When the counting session physically opened. Typically equal
|
|
4034
|
+
to createdAt for ad-hoc sessions.
|
|
4035
|
+
completedAt:
|
|
4036
|
+
anyOf:
|
|
4037
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4038
|
+
- type: 'null'
|
|
4039
|
+
readOnly: true
|
|
4040
|
+
x-note: Server-set on transition to COMPLETED. Distinct from stocktakeDate
|
|
4041
|
+
(the period counted) — analytics buckets by completedAt to answer "when
|
|
4042
|
+
did the ledger hit?".
|
|
4043
|
+
description: (Read-only) When the session transitioned to COMPLETED.
|
|
4044
|
+
createdAt:
|
|
4045
|
+
anyOf:
|
|
4046
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4047
|
+
- type: 'null'
|
|
4048
|
+
readOnly: true
|
|
4049
|
+
description: (Read-only) Server-generated creation timestamp.
|
|
4050
|
+
createdBy:
|
|
4051
|
+
type: string
|
|
4052
|
+
x-immutable: true
|
|
4053
|
+
description: (Immutable) FK → User UID who created the session.
|
|
4054
|
+
createdByName:
|
|
4055
|
+
type: string
|
|
4056
|
+
denormalized: true
|
|
4057
|
+
x-note: Read-time hint snapshot of the creator's display name (GH#29 §3
|
|
4058
|
+
/ Q10).
|
|
4059
|
+
description: (Denormalized) Snapshot of the creator's display name at session
|
|
4060
|
+
creation.
|
|
4061
|
+
completedBy:
|
|
4062
|
+
readOnly: true
|
|
4063
|
+
description: (Read-only) FK → User UID who completed the session, set by
|
|
4064
|
+
server on COMPLETED.
|
|
4065
|
+
anyOf:
|
|
4066
|
+
- type: string
|
|
4067
|
+
- type: 'null'
|
|
4068
|
+
completedByName:
|
|
4069
|
+
denormalized: true
|
|
4070
|
+
x-note: Read-time hint snapshot of the completer's display name (GH#29 §3
|
|
4071
|
+
/ Q10).
|
|
4072
|
+
description: (Denormalized) Snapshot of the completer's display name.
|
|
4073
|
+
anyOf:
|
|
4074
|
+
- type: string
|
|
4075
|
+
- type: 'null'
|
|
4076
|
+
updatedAt:
|
|
4077
|
+
anyOf:
|
|
4078
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4079
|
+
- type: 'null'
|
|
4080
|
+
readOnly: true
|
|
4081
|
+
description: (Read-only) Server-generated update timestamp.
|
|
4082
|
+
required:
|
|
4083
|
+
- companyId
|
|
4084
|
+
- stocktakeNumber
|
|
4085
|
+
- stocktakeDate
|
|
4086
|
+
- status
|
|
4087
|
+
- adjustmentsApplied
|
|
4088
|
+
- totalItemsCount
|
|
4089
|
+
- totalDiscrepancies
|
|
4090
|
+
- totalDeltaValue
|
|
4091
|
+
- startedAt
|
|
4092
|
+
- createdBy
|
|
4093
|
+
- createdByName
|
|
4094
|
+
additionalProperties: false
|
|
4095
|
+
description: 'Stocktake (GH#29 §4). Collection: companies/{companyId}/stocktakes/{stocktakeId}.
|
|
4096
|
+
A recorded session of physically counting all SKUs at a point in time. Replaces
|
|
4097
|
+
the dashboard''s Inventory model; items live in a sub-collection (replaces
|
|
4098
|
+
InventoryItem[] embedded array); InventoryEvolution is dropped — derivable
|
|
4099
|
+
from the sub-collection. Status transitions and aggregate fields (totalItemsCount/Discrepancies/totalDeltaValue)
|
|
4100
|
+
are server-owned per GH#29 §3.'
|
|
4101
|
+
StocktakeCreate:
|
|
4102
|
+
allOf:
|
|
4103
|
+
- $ref: '#/components/schemas/Stocktake'
|
|
4104
|
+
description: Write payload for creating a new Stocktake document. Fields marked
|
|
4105
|
+
`readOnly` are server-set and must not be included. Fields marked `x-immutable`
|
|
4106
|
+
may be set once at creation.
|
|
4107
|
+
required:
|
|
4108
|
+
- companyId
|
|
4109
|
+
- stocktakeNumber
|
|
4110
|
+
- stocktakeDate
|
|
4111
|
+
- status
|
|
4112
|
+
- adjustmentsApplied
|
|
4113
|
+
- startedAt
|
|
4114
|
+
- createdBy
|
|
4115
|
+
- createdByName
|
|
4116
|
+
StocktakeUpdate:
|
|
4117
|
+
allOf:
|
|
4118
|
+
- $ref: '#/components/schemas/Stocktake'
|
|
4119
|
+
description: Write payload for partial update (PATCH) of a Stocktake document.
|
|
4120
|
+
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
4121
|
+
sent.
|
|
4122
|
+
StocktakeItem:
|
|
4123
|
+
type: object
|
|
4124
|
+
properties:
|
|
4125
|
+
stockItemId:
|
|
4126
|
+
type: string
|
|
4127
|
+
description: FK → StockItem document ID. Doubles as the item document ID.
|
|
4128
|
+
stockItemName:
|
|
4129
|
+
type: string
|
|
4130
|
+
denormalized: true
|
|
4131
|
+
x-note: Read-time hint snapshot of StockItem.name. Authoritative value lives
|
|
4132
|
+
at the StockItem record; do not refresh on rename — the historical name
|
|
4133
|
+
at session time is what the auditor wrote (GH#29 §3 / Q10).
|
|
4134
|
+
description: (Denormalized) Snapshot of StockItem.name at session time.
|
|
4135
|
+
theoreticalQuantity:
|
|
4136
|
+
type: number
|
|
4137
|
+
x-immutable: true
|
|
4138
|
+
description: (Immutable) System belief at session start, snapshotted when
|
|
4139
|
+
this item row was created.
|
|
4140
|
+
actualQuantity:
|
|
4141
|
+
description: Physical count entered by the counter. Null until counted;
|
|
4142
|
+
set when the line moves to status COUNTED.
|
|
4143
|
+
anyOf:
|
|
4144
|
+
- type: number
|
|
4145
|
+
- type: 'null'
|
|
4146
|
+
delta:
|
|
4147
|
+
type: number
|
|
4148
|
+
readOnly: true
|
|
4149
|
+
x-note: Server-derived = actualQuantity − theoreticalQuantity. Recomputed
|
|
4150
|
+
on every actualQuantity write; null/zero before counting.
|
|
4151
|
+
description: (Read-only) Signed difference between actual and theoretical.
|
|
4152
|
+
Drives the StockMovement(type=INVENTORY) emitted on session COMPLETED.
|
|
4153
|
+
unit:
|
|
4154
|
+
type: string
|
|
4155
|
+
x-immutable: true
|
|
4156
|
+
description: (Immutable) Snapshot of StockItem.unit at session start. Locks
|
|
4157
|
+
the unit against later catalog changes.
|
|
4158
|
+
costPerUnit:
|
|
4159
|
+
type: number
|
|
4160
|
+
x-immutable: true
|
|
4161
|
+
x-note: Snapshot at session time — locks valuation against future cost changes.
|
|
4162
|
+
Lock to XOF integer minor units per D18 (GH#29 Q16).
|
|
4163
|
+
description: (Immutable) Snapshot of StockItem.costPerUnit at session start,
|
|
4164
|
+
in XOF integer minor units.
|
|
4165
|
+
totalValue:
|
|
4166
|
+
type: number
|
|
4167
|
+
readOnly: true
|
|
4168
|
+
x-note: Server-derived = actualQuantity × costPerUnit. Recomputed when actualQuantity
|
|
4169
|
+
is written.
|
|
4170
|
+
description: (Read-only) Per-line valuation in XOF integer minor units.
|
|
4171
|
+
status:
|
|
4172
|
+
$ref: '#/components/schemas/StocktakeItemStatus'
|
|
4173
|
+
description: Per-line workflow status. Server transitions ADJUSTED on parent
|
|
4174
|
+
COMPLETED.
|
|
4175
|
+
x-note: PENDING = line not yet counted. COUNTED = a counter recorded actualQuantity.
|
|
4176
|
+
VERIFIED = a second pair of eyes signed off (verifiedBy fields populated;
|
|
4177
|
+
Q21 — kept nullable until tenants opt into stricter QA via policy). ADJUSTED
|
|
4178
|
+
= the resulting StockMovement was emitted (server-set on Stocktake.status
|
|
4179
|
+
→ COMPLETED).
|
|
4180
|
+
x-see:
|
|
4181
|
+
issues:
|
|
4182
|
+
- gh#29
|
|
4183
|
+
notes:
|
|
4184
|
+
description: Optional per-line note from the counter (e.g. "damaged carton,
|
|
4185
|
+
3 unsellable").
|
|
4186
|
+
anyOf:
|
|
4187
|
+
- type: string
|
|
4188
|
+
- type: 'null'
|
|
4189
|
+
countedBy:
|
|
4190
|
+
description: UID of the staff member who entered actualQuantity.
|
|
4191
|
+
anyOf:
|
|
4192
|
+
- type: string
|
|
4193
|
+
- type: 'null'
|
|
4194
|
+
countedByName:
|
|
4195
|
+
denormalized: true
|
|
4196
|
+
x-note: Read-time hint snapshot of the counter's display name (GH#29 §3
|
|
4197
|
+
/ Q10).
|
|
4198
|
+
description: (Denormalized) Snapshot of the counter's display name at count
|
|
4199
|
+
time.
|
|
4200
|
+
anyOf:
|
|
4201
|
+
- type: string
|
|
4202
|
+
- type: 'null'
|
|
4203
|
+
countedAt:
|
|
4204
|
+
anyOf:
|
|
4205
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4206
|
+
- type: 'null'
|
|
4207
|
+
description: When the line was counted.
|
|
4208
|
+
verifiedBy:
|
|
4209
|
+
description: UID of a second staff member who verified the count. Nullable
|
|
4210
|
+
per GH#29 Q21.
|
|
4211
|
+
anyOf:
|
|
4212
|
+
- type: string
|
|
4213
|
+
- type: 'null'
|
|
4214
|
+
verifiedByName:
|
|
4215
|
+
denormalized: true
|
|
4216
|
+
x-note: Read-time hint snapshot of the verifier's display name (GH#29 §3
|
|
4217
|
+
/ Q10).
|
|
4218
|
+
description: (Denormalized) Snapshot of the verifier's display name.
|
|
4219
|
+
anyOf:
|
|
4220
|
+
- type: string
|
|
4221
|
+
- type: 'null'
|
|
4222
|
+
verifiedAt:
|
|
4223
|
+
anyOf:
|
|
4224
|
+
- $ref: '#/components/schemas/FirestoreTimestamp'
|
|
4225
|
+
- type: 'null'
|
|
4226
|
+
description: When the line was verified, if a second-eye flow was used.
|
|
4227
|
+
required:
|
|
4228
|
+
- stockItemId
|
|
4229
|
+
- stockItemName
|
|
4230
|
+
- theoreticalQuantity
|
|
4231
|
+
- delta
|
|
4232
|
+
- unit
|
|
4233
|
+
- costPerUnit
|
|
4234
|
+
- totalValue
|
|
4235
|
+
- status
|
|
4236
|
+
additionalProperties: false
|
|
4237
|
+
description: 'StocktakeItem (GH#29 §4). Sub-collection path: companies/{companyId}/stocktakes/{stocktakeId}/items/{stockItemId}.
|
|
4238
|
+
Replaces the embedded `InventoryItem[]` array on the dashboard model. Server
|
|
4239
|
+
emits one StockMovement(type=INVENTORY) per non-zero delta when the parent
|
|
4240
|
+
Stocktake transitions to COMPLETED.'
|
|
4241
|
+
StocktakeItemCreate:
|
|
4242
|
+
allOf:
|
|
4243
|
+
- $ref: '#/components/schemas/StocktakeItem'
|
|
4244
|
+
description: Write payload for creating a new StocktakeItem document. Fields
|
|
4245
|
+
marked `readOnly` are server-set and must not be included. Fields marked `x-immutable`
|
|
4246
|
+
may be set once at creation.
|
|
4247
|
+
required:
|
|
4248
|
+
- stockItemId
|
|
4249
|
+
- stockItemName
|
|
4250
|
+
- theoreticalQuantity
|
|
4251
|
+
- unit
|
|
4252
|
+
- costPerUnit
|
|
4253
|
+
- status
|
|
4254
|
+
StocktakeItemUpdate:
|
|
4255
|
+
allOf:
|
|
4256
|
+
- $ref: '#/components/schemas/StocktakeItem'
|
|
4257
|
+
description: Write payload for partial update (PATCH) of a StocktakeItem document.
|
|
4258
|
+
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
4259
|
+
sent.
|
|
3898
4260
|
Ticket:
|
|
3899
4261
|
type: object
|
|
3900
4262
|
properties:
|
|
@@ -4016,6 +4378,133 @@ components:
|
|
|
4016
4378
|
description: Write payload for partial update (PATCH) of a Ticket document.
|
|
4017
4379
|
All fields optional. Fields marked `readOnly` or `x-immutable` must not be
|
|
4018
4380
|
sent.
|
|
4381
|
+
WhatsappInboundMessage:
|
|
4382
|
+
type: object
|
|
4383
|
+
properties:
|
|
4384
|
+
id:
|
|
4385
|
+
readOnly: true
|
|
4386
|
+
description: (Read-only) Firestore document ID — wamid from Meta Cloud API.
|
|
4387
|
+
type:
|
|
4388
|
+
- string
|
|
4389
|
+
- 'null'
|
|
4390
|
+
wabaId:
|
|
4391
|
+
type: string
|
|
4392
|
+
x-immutable: true
|
|
4393
|
+
description: (Immutable) Meta WABA ID identifying which business number
|
|
4394
|
+
received the message.
|
|
4395
|
+
waba:
|
|
4396
|
+
$ref: '#/components/schemas/WabaLabel'
|
|
4397
|
+
description: (Immutable) Human-readable WABA label (cmz | val). See WabaLabel
|
|
4398
|
+
enum.
|
|
4399
|
+
x-immutable: true
|
|
4400
|
+
messageId:
|
|
4401
|
+
type: string
|
|
4402
|
+
x-immutable: true
|
|
4403
|
+
description: (Immutable) WhatsApp message ID (wamid) returned by Meta —
|
|
4404
|
+
mirrors the document ID.
|
|
4405
|
+
from:
|
|
4406
|
+
type: string
|
|
4407
|
+
x-immutable: true
|
|
4408
|
+
description: (Immutable) Sender phone number in E.164 format.
|
|
4409
|
+
type:
|
|
4410
|
+
anyOf:
|
|
4411
|
+
- type: string
|
|
4412
|
+
enum:
|
|
4413
|
+
- text
|
|
4414
|
+
- image
|
|
4415
|
+
- audio
|
|
4416
|
+
- video
|
|
4417
|
+
- document
|
|
4418
|
+
- sticker
|
|
4419
|
+
- reaction
|
|
4420
|
+
- location
|
|
4421
|
+
- contacts
|
|
4422
|
+
- interactive
|
|
4423
|
+
- button
|
|
4424
|
+
- order
|
|
4425
|
+
- system
|
|
4426
|
+
- unsupported
|
|
4427
|
+
- type: string
|
|
4428
|
+
description: (Immutable) Meta message type.
|
|
4429
|
+
x-immutable: true
|
|
4430
|
+
timestamp:
|
|
4431
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
4432
|
+
description: (Immutable) Message timestamp as reported by Meta.
|
|
4433
|
+
x-immutable: true
|
|
4434
|
+
receivedAt:
|
|
4435
|
+
$ref: '#/components/schemas/FirestoreTimestamp'
|
|
4436
|
+
description: (Read-only) Server-side ingestion time set by the Cloud Function.
|
|
4437
|
+
readOnly: true
|
|
4438
|
+
text:
|
|
4439
|
+
description: Message body text. Present on type=text messages only.
|
|
4440
|
+
type:
|
|
4441
|
+
- string
|
|
4442
|
+
- 'null'
|
|
4443
|
+
mediaId:
|
|
4444
|
+
description: Meta media ID. Present on image, audio, video, document, sticker
|
|
4445
|
+
messages.
|
|
4446
|
+
type:
|
|
4447
|
+
- string
|
|
4448
|
+
- 'null'
|
|
4449
|
+
caption:
|
|
4450
|
+
description: Media caption text. Present when the sender included a caption.
|
|
4451
|
+
type:
|
|
4452
|
+
- string
|
|
4453
|
+
- 'null'
|
|
4454
|
+
storageUrl:
|
|
4455
|
+
description: Durable Cloud Storage URL for the downloaded media binary.
|
|
4456
|
+
Present after the CF downloads and stores the media.
|
|
4457
|
+
type:
|
|
4458
|
+
- string
|
|
4459
|
+
- 'null'
|
|
4460
|
+
context:
|
|
4461
|
+
description: Reply/forward context. Present on replies and forwarded messages.
|
|
4462
|
+
type:
|
|
4463
|
+
- object
|
|
4464
|
+
- 'null'
|
|
4465
|
+
properties:
|
|
4466
|
+
id:
|
|
4467
|
+
description: wamid of the quoted/replied-to message.
|
|
4468
|
+
type: string
|
|
4469
|
+
from:
|
|
4470
|
+
description: Sender phone number of the quoted message.
|
|
4471
|
+
type: string
|
|
4472
|
+
forwarded:
|
|
4473
|
+
description: Present (true) when Meta marks the message as forwarded.
|
|
4474
|
+
type: boolean
|
|
4475
|
+
const: true
|
|
4476
|
+
additionalProperties: false
|
|
4477
|
+
required:
|
|
4478
|
+
- wabaId
|
|
4479
|
+
- waba
|
|
4480
|
+
- messageId
|
|
4481
|
+
- from
|
|
4482
|
+
- type
|
|
4483
|
+
- timestamp
|
|
4484
|
+
- receivedAt
|
|
4485
|
+
additionalProperties: false
|
|
4486
|
+
description: 'WhatsappInboundMessage — inbound WhatsApp message persisted from
|
|
4487
|
+
Meta Cloud API webhook (GH#36). Collection: whatsapp_inbound_messages/{docId}
|
|
4488
|
+
in ratenplate project. Top-level scope: company resolution happens post-ingestion.'
|
|
4489
|
+
WhatsappInboundMessageCreate:
|
|
4490
|
+
allOf:
|
|
4491
|
+
- $ref: '#/components/schemas/WhatsappInboundMessage'
|
|
4492
|
+
description: Write payload for creating a new WhatsappInboundMessage document.
|
|
4493
|
+
Fields marked `readOnly` are server-set and must not be included. Fields marked
|
|
4494
|
+
`x-immutable` may be set once at creation.
|
|
4495
|
+
required:
|
|
4496
|
+
- wabaId
|
|
4497
|
+
- waba
|
|
4498
|
+
- messageId
|
|
4499
|
+
- from
|
|
4500
|
+
- type
|
|
4501
|
+
- timestamp
|
|
4502
|
+
WhatsappInboundMessageUpdate:
|
|
4503
|
+
allOf:
|
|
4504
|
+
- $ref: '#/components/schemas/WhatsappInboundMessage'
|
|
4505
|
+
description: Write payload for partial update (PATCH) of a WhatsappInboundMessage
|
|
4506
|
+
document. All fields optional. Fields marked `readOnly` or `x-immutable` must
|
|
4507
|
+
not be sent.
|
|
4019
4508
|
PaymentSummary:
|
|
4020
4509
|
type: object
|
|
4021
4510
|
properties:
|