@kohost/api-client 7.14.1 → 7.16.0
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/.tsbuildinfo +1 -1
- package/dist/models/ticket.js +2 -0
- package/dist/models/ticket.js.map +1 -1
- package/dist/schemas/bill.d.ts +25 -0
- package/dist/schemas/bill.js +25 -0
- package/dist/schemas/bill.js.map +1 -1
- package/dist/schemas/costEntry.d.ts +27 -0
- package/dist/schemas/costEntry.js +36 -21
- package/dist/schemas/costEntry.js.map +1 -1
- package/dist/schemas/definitions.d.ts +1 -1
- package/dist/schemas/definitions.js +1 -0
- package/dist/schemas/definitions.js.map +1 -1
- package/dist/schemas/ticket.d.ts +200 -44
- package/dist/schemas/ticket.js +179 -3
- package/dist/schemas/ticket.js.map +1 -1
- package/dist/useCases/clearAwaitingResponse.d.ts +36 -0
- package/dist/useCases/clearAwaitingResponse.js +47 -0
- package/dist/useCases/clearAwaitingResponse.js.map +1 -0
- package/dist/useCases/clearWorkItemVerification.d.ts +39 -0
- package/dist/useCases/clearWorkItemVerification.js +47 -0
- package/dist/useCases/clearWorkItemVerification.js.map +1 -0
- package/dist/useCases/describeConciergeBillsSummary.d.ts +27 -0
- package/dist/useCases/describeConciergeBillsSummary.js +47 -0
- package/dist/useCases/describeConciergeBillsSummary.js.map +1 -0
- package/dist/useCases/describeConciergeStageCounts.d.ts +27 -0
- package/dist/useCases/describeConciergeStageCounts.js +47 -0
- package/dist/useCases/describeConciergeStageCounts.js.map +1 -0
- package/dist/useCases/index.d.ts +7 -0
- package/dist/useCases/index.js +15 -1
- package/dist/useCases/index.js.map +1 -1
- package/dist/useCases/listConciergeWorkspaceBillLines.d.ts +27 -0
- package/dist/useCases/listConciergeWorkspaceBillLines.js +47 -0
- package/dist/useCases/listConciergeWorkspaceBillLines.js.map +1 -0
- package/dist/useCases/setAwaitingResponse.d.ts +36 -0
- package/dist/useCases/setAwaitingResponse.js +47 -0
- package/dist/useCases/setAwaitingResponse.js.map +1 -0
- package/dist/useCases/verifyWorkItem.d.ts +39 -0
- package/dist/useCases/verifyWorkItem.js +47 -0
- package/dist/useCases/verifyWorkItem.js.map +1 -0
- package/package.json +1 -1
package/dist/schemas/ticket.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare const ticketSchema: {
|
|
|
49
49
|
};
|
|
50
50
|
readonly discriminator: {
|
|
51
51
|
readonly type: "string";
|
|
52
|
-
readonly enum: readonly ["message", "opened", "assigned", "rated", "scheduled", "collaboratorAdded", "collaboratorRemoved", "statusChanged", "priorityChanged", "scheduleDateChanged", "locationChanged", "issueChanged", "nudged", "approvalRequested", "approvalApproved", "approvalDenied", "workScheduled", "workRescheduled", "workCanceled", "costRecorded", "costPriceChanged", "costVoided"];
|
|
52
|
+
readonly enum: readonly ["message", "opened", "assigned", "rated", "scheduled", "collaboratorAdded", "collaboratorRemoved", "statusChanged", "priorityChanged", "scheduleDateChanged", "locationChanged", "issueChanged", "nudged", "approvalRequested", "approvalApproved", "approvalDenied", "workScheduled", "workRescheduled", "workCanceled", "workCompleted", "workNotCompleted", "workVerificationCleared", "costRecorded", "costPriceChanged", "costVoided", "awaitingResponse", "awaitingResponseCleared"];
|
|
53
53
|
readonly default: "message";
|
|
54
54
|
readonly description: "The discriminator of the message.";
|
|
55
55
|
};
|
|
@@ -392,6 +392,48 @@ export declare const ticketSchema: {
|
|
|
392
392
|
};
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
+
readonly awaitingResponse: {
|
|
396
|
+
readonly type: "object";
|
|
397
|
+
readonly additionalProperties: false;
|
|
398
|
+
readonly required: readonly ["awaiting"];
|
|
399
|
+
readonly description: "Legacy. Earlier releases announced the Awaiting response marker in the conversation; the marker now lives only in the ticket's `awaitingResponse` slot and no new entries of this kind are written.";
|
|
400
|
+
readonly properties: {
|
|
401
|
+
readonly awaiting: {
|
|
402
|
+
readonly type: "object";
|
|
403
|
+
readonly additionalProperties: false;
|
|
404
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
405
|
+
readonly properties: {
|
|
406
|
+
readonly id: {
|
|
407
|
+
readonly type: "string";
|
|
408
|
+
};
|
|
409
|
+
readonly discriminator: {
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly enum: readonly ["user"];
|
|
412
|
+
};
|
|
413
|
+
readonly name: {
|
|
414
|
+
readonly type: "string";
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
readonly messageId: {
|
|
419
|
+
readonly type: readonly ["string", "null"];
|
|
420
|
+
readonly default: null;
|
|
421
|
+
readonly description: "The conversation message this marker was sent with, when the composer set both in one write.";
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly awaitingResponseCleared: {
|
|
426
|
+
readonly type: "object";
|
|
427
|
+
readonly additionalProperties: false;
|
|
428
|
+
readonly required: readonly ["reason"];
|
|
429
|
+
readonly description: "Legacy. Earlier releases announced the end of a wait in the conversation; no new entries of this kind are written.";
|
|
430
|
+
readonly properties: {
|
|
431
|
+
readonly reason: {
|
|
432
|
+
readonly type: "string";
|
|
433
|
+
readonly enum: readonly ["explicit", "left"];
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
};
|
|
395
437
|
readonly readBy: {
|
|
396
438
|
readonly type: "array";
|
|
397
439
|
readonly default: readonly [];
|
|
@@ -584,7 +626,7 @@ export declare const ticketSchema: {
|
|
|
584
626
|
readonly work: {
|
|
585
627
|
readonly type: "array";
|
|
586
628
|
readonly default: readonly [];
|
|
587
|
-
readonly description: "Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history and a past-dated
|
|
629
|
+
readonly description: "Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history, and only a roster verification says whether a past-dated visit happened. Never redacted; vendor identity is already public in assignment.";
|
|
588
630
|
readonly items: {
|
|
589
631
|
readonly type: "object";
|
|
590
632
|
readonly additionalProperties: false;
|
|
@@ -658,6 +700,45 @@ export declare const ticketSchema: {
|
|
|
658
700
|
};
|
|
659
701
|
};
|
|
660
702
|
};
|
|
703
|
+
readonly verification: {
|
|
704
|
+
readonly type: readonly ["object", "null"];
|
|
705
|
+
readonly additionalProperties: false;
|
|
706
|
+
readonly required: readonly ["outcome", "verifiedBy", "verifiedAt"];
|
|
707
|
+
readonly default: null;
|
|
708
|
+
readonly description: string;
|
|
709
|
+
readonly properties: {
|
|
710
|
+
readonly outcome: {
|
|
711
|
+
readonly type: "string";
|
|
712
|
+
readonly enum: readonly ["completed", "notCompleted"];
|
|
713
|
+
readonly description: string;
|
|
714
|
+
};
|
|
715
|
+
readonly comment: {
|
|
716
|
+
readonly type: readonly ["string", "null"];
|
|
717
|
+
readonly default: null;
|
|
718
|
+
readonly description: string;
|
|
719
|
+
};
|
|
720
|
+
readonly verifiedBy: {
|
|
721
|
+
readonly type: "object";
|
|
722
|
+
readonly additionalProperties: false;
|
|
723
|
+
readonly required: readonly ["id", "name"];
|
|
724
|
+
readonly description: string;
|
|
725
|
+
readonly properties: {
|
|
726
|
+
readonly id: {
|
|
727
|
+
readonly type: "string";
|
|
728
|
+
readonly description: "The ID of the verifying user.";
|
|
729
|
+
};
|
|
730
|
+
readonly name: {
|
|
731
|
+
readonly type: "string";
|
|
732
|
+
readonly description: "The verifying user's name at the time of the write.";
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
};
|
|
736
|
+
readonly verifiedAt: {
|
|
737
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
738
|
+
readonly description: "When the outcome was recorded.";
|
|
739
|
+
};
|
|
740
|
+
};
|
|
741
|
+
};
|
|
661
742
|
};
|
|
662
743
|
};
|
|
663
744
|
};
|
|
@@ -684,48 +765,6 @@ export declare const ticketSchema: {
|
|
|
684
765
|
readonly default: "USD";
|
|
685
766
|
readonly description: "ISO 4217 currency code of the entry's amounts.";
|
|
686
767
|
};
|
|
687
|
-
readonly price: {
|
|
688
|
-
readonly type: "object";
|
|
689
|
-
readonly additionalProperties: false;
|
|
690
|
-
readonly required: readonly ["amount", "recordedBy", "recordedAt"];
|
|
691
|
-
readonly description: string;
|
|
692
|
-
readonly properties: {
|
|
693
|
-
readonly amount: {
|
|
694
|
-
readonly type: "integer";
|
|
695
|
-
readonly minimum: 0;
|
|
696
|
-
readonly description: "The amount in integer cents.";
|
|
697
|
-
};
|
|
698
|
-
readonly recordedBy: {
|
|
699
|
-
readonly type: "string";
|
|
700
|
-
readonly description: "The ID of the user who recorded the amount.";
|
|
701
|
-
};
|
|
702
|
-
readonly recordedAt: {
|
|
703
|
-
readonly $ref: "definitions.json#/definitions/date";
|
|
704
|
-
readonly description: "When the amount was recorded.";
|
|
705
|
-
};
|
|
706
|
-
};
|
|
707
|
-
};
|
|
708
|
-
readonly estimate: {
|
|
709
|
-
readonly type: "object";
|
|
710
|
-
readonly additionalProperties: false;
|
|
711
|
-
readonly required: readonly ["amount", "recordedBy", "recordedAt"];
|
|
712
|
-
readonly description: string;
|
|
713
|
-
readonly properties: {
|
|
714
|
-
readonly amount: {
|
|
715
|
-
readonly type: "integer";
|
|
716
|
-
readonly minimum: 0;
|
|
717
|
-
readonly description: "The amount in integer cents.";
|
|
718
|
-
};
|
|
719
|
-
readonly recordedBy: {
|
|
720
|
-
readonly type: "string";
|
|
721
|
-
readonly description: "The ID of the user who recorded the amount.";
|
|
722
|
-
};
|
|
723
|
-
readonly recordedAt: {
|
|
724
|
-
readonly $ref: "definitions.json#/definitions/date";
|
|
725
|
-
readonly description: "When the amount was recorded.";
|
|
726
|
-
};
|
|
727
|
-
};
|
|
728
|
-
};
|
|
729
768
|
readonly actual: {
|
|
730
769
|
readonly type: "object";
|
|
731
770
|
readonly additionalProperties: false;
|
|
@@ -796,6 +835,59 @@ export declare const ticketSchema: {
|
|
|
796
835
|
readonly default: false;
|
|
797
836
|
readonly description: string;
|
|
798
837
|
};
|
|
838
|
+
readonly price: {
|
|
839
|
+
readonly type: readonly ["object", "null"];
|
|
840
|
+
readonly additionalProperties: false;
|
|
841
|
+
readonly required: readonly ["amount", "recordedBy", "recordedAt"];
|
|
842
|
+
readonly default: null;
|
|
843
|
+
readonly description: string;
|
|
844
|
+
readonly properties: {
|
|
845
|
+
readonly amount: {
|
|
846
|
+
readonly type: "integer";
|
|
847
|
+
readonly minimum: 0;
|
|
848
|
+
readonly description: "The amount in integer cents.";
|
|
849
|
+
};
|
|
850
|
+
readonly recordedBy: {
|
|
851
|
+
readonly type: "string";
|
|
852
|
+
readonly description: "The ID of the user who recorded the amount.";
|
|
853
|
+
};
|
|
854
|
+
readonly recordedAt: {
|
|
855
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
856
|
+
readonly description: "When the amount was recorded.";
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly estimate: {
|
|
861
|
+
readonly type: readonly ["object", "null"];
|
|
862
|
+
readonly additionalProperties: false;
|
|
863
|
+
readonly required: readonly ["amount", "recordedBy", "recordedAt"];
|
|
864
|
+
readonly default: null;
|
|
865
|
+
readonly description: string;
|
|
866
|
+
readonly properties: {
|
|
867
|
+
readonly amount: {
|
|
868
|
+
readonly type: "integer";
|
|
869
|
+
readonly minimum: 0;
|
|
870
|
+
readonly description: "The amount in integer cents.";
|
|
871
|
+
};
|
|
872
|
+
readonly recordedBy: {
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
readonly description: "The ID of the user who recorded the amount.";
|
|
875
|
+
};
|
|
876
|
+
readonly recordedAt: {
|
|
877
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
878
|
+
readonly description: "When the amount was recorded.";
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
readonly createdAt: {
|
|
883
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
884
|
+
readonly description: string;
|
|
885
|
+
};
|
|
886
|
+
readonly createdBy: {
|
|
887
|
+
readonly type: readonly ["string", "null"];
|
|
888
|
+
readonly default: null;
|
|
889
|
+
readonly description: string;
|
|
890
|
+
};
|
|
799
891
|
readonly billingReview: {
|
|
800
892
|
readonly type: "array";
|
|
801
893
|
readonly default: readonly [];
|
|
@@ -955,12 +1047,74 @@ export declare const ticketSchema: {
|
|
|
955
1047
|
readonly minimum: 0;
|
|
956
1048
|
readonly description: "The effective do-not-exceed amount in integer cents the approval gate compares against, resolved per read from the organization and property Concierge settings. Never stored on the document and never set by clients; absent on payloads where it could not be resolved. Viewer-independent: the DNE is the customer's own contract term, so org-side viewers see it.";
|
|
957
1049
|
};
|
|
1050
|
+
readonly stages: {
|
|
1051
|
+
readonly type: "array";
|
|
1052
|
+
readonly description: "The Stages the ticket carries, in the fixed chip order. Derived at read time from the ticket's own facts, never stored and never set by clients, and absent for every viewer outside Kohost's facilities staff. A ticket may carry several at once; `closed` and `pending` tickets carry none.";
|
|
1053
|
+
readonly items: {
|
|
1054
|
+
readonly type: "string";
|
|
1055
|
+
readonly enum: readonly ["awaitingClientApproval", "awaitingClientResponse", "awaitingVendorQuote", "vendorScheduled", "confirmCosts", "resolveReady"];
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
958
1058
|
readonly approvalState: {
|
|
959
1059
|
readonly type: "string";
|
|
960
1060
|
readonly enum: readonly ["clear", "awaitingApproval", "denied"];
|
|
961
1061
|
readonly default: "clear";
|
|
962
1062
|
readonly description: "Server-maintained denormalization of the approval gate, updated on every cost or approval write (reopenCount pattern) so queue filters get O(1) access. Never set by clients.";
|
|
963
1063
|
};
|
|
1064
|
+
readonly awaitingResponse: {
|
|
1065
|
+
readonly type: readonly ["object", "null"];
|
|
1066
|
+
readonly default: null;
|
|
1067
|
+
readonly additionalProperties: false;
|
|
1068
|
+
readonly required: readonly ["author", "awaiting", "since"];
|
|
1069
|
+
readonly description: "A Kohost Facilities agent's private note that they are waiting on a reply, from one named participant outside Kohost's side or from anyone outside it. Served only to the Facilities roster; every other viewer receives null. A named wait ends when anyone other than its author posts a public message or when the awaited person leaves the ticket; an anyone wait ends when someone outside Kohost's side posts a public message. Either ends when the roster clears it. Written only through SetAwaitingResponse and ClearAwaitingResponse.";
|
|
1070
|
+
readonly properties: {
|
|
1071
|
+
readonly author: {
|
|
1072
|
+
readonly type: "object";
|
|
1073
|
+
readonly additionalProperties: false;
|
|
1074
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
1075
|
+
readonly description: "Who set the marker.";
|
|
1076
|
+
readonly properties: {
|
|
1077
|
+
readonly id: {
|
|
1078
|
+
readonly type: "string";
|
|
1079
|
+
};
|
|
1080
|
+
readonly discriminator: {
|
|
1081
|
+
readonly type: "string";
|
|
1082
|
+
readonly enum: readonly ["user", "vendor", "system"];
|
|
1083
|
+
};
|
|
1084
|
+
readonly name: {
|
|
1085
|
+
readonly type: "string";
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
readonly awaiting: {
|
|
1090
|
+
readonly type: readonly ["object", "null"];
|
|
1091
|
+
readonly additionalProperties: false;
|
|
1092
|
+
readonly required: readonly ["id", "discriminator", "name"];
|
|
1093
|
+
readonly description: "The person the ticket is waiting on. Null when the wait is on anyone outside Kohost's side rather than one named person.";
|
|
1094
|
+
readonly properties: {
|
|
1095
|
+
readonly id: {
|
|
1096
|
+
readonly type: "string";
|
|
1097
|
+
};
|
|
1098
|
+
readonly discriminator: {
|
|
1099
|
+
readonly type: "string";
|
|
1100
|
+
readonly enum: readonly ["user"];
|
|
1101
|
+
};
|
|
1102
|
+
readonly name: {
|
|
1103
|
+
readonly type: "string";
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
readonly since: {
|
|
1108
|
+
readonly $ref: "definitions.json#/definitions/date";
|
|
1109
|
+
readonly description: "When the marker was set.";
|
|
1110
|
+
};
|
|
1111
|
+
readonly messageId: {
|
|
1112
|
+
readonly type: readonly ["string", "null"];
|
|
1113
|
+
readonly default: null;
|
|
1114
|
+
readonly description: "Legacy. Earlier releases linked the marker to the message it was sent with; no longer written.";
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
964
1118
|
readonly tags: {
|
|
965
1119
|
readonly type: "array";
|
|
966
1120
|
readonly default: readonly [];
|
|
@@ -1017,6 +1171,8 @@ export type TicketCostEntry = Extract<NonNullable<TicketSchemaBase["costs"]>[num
|
|
|
1017
1171
|
}>;
|
|
1018
1172
|
/** One scheduled performance of work on a ticket. */
|
|
1019
1173
|
export type TicketWorkItem = NonNullable<TicketSchemaBase["work"]>[number];
|
|
1174
|
+
/** One derived Stage a ticket may carry. The API's `resolveStages` owns the rules. */
|
|
1175
|
+
export type TicketStage = NonNullable<TicketSchemaBase["stages"]>[number];
|
|
1020
1176
|
/** One append-only billing review entry on a stored cost entry. */
|
|
1021
1177
|
export type TicketCostBillingReviewEntry = NonNullable<TicketCostEntry["billingReview"]>[number];
|
|
1022
1178
|
export type TicketSchema = Omit<TicketSchemaBase, "costs"> & {
|
package/dist/schemas/ticket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { costBillingReview, costEntryProperties, costEntryRequired } from "./costEntry.js";
|
|
1
|
+
import { costBillingReview, costEntryProperties, costEntryRequired, nullableMoney } from "./costEntry.js";
|
|
2
2
|
//#region .generated/schemas/ticket.ts
|
|
3
3
|
const richTextInlineNodes = {
|
|
4
4
|
type: "array",
|
|
@@ -130,6 +130,17 @@ const fullCostEntrySchema = {
|
|
|
130
130
|
required: costEntryRequired,
|
|
131
131
|
properties: {
|
|
132
132
|
...costEntryProperties,
|
|
133
|
+
price: nullableMoney("The authoritative customer price, what the org is charged, what the approval gate totals, and what a bill line bills. Seeded at pricing from the estimate and the markup, and from then on independent of all three: editing `estimate`, `actual`, or `markup` never moves it. Only an explicit price write does. Null while the entry is a Pending cost, which prices nothing and never reaches an org-side viewer."),
|
|
134
|
+
estimate: nullableMoney("The vendor cost estimate phase of the entry. Null while the entry is a Pending cost: this field is what says an amount is known, so a null here is the whole definition of pending. Clearing a recorded amount back to null is refused; void the entry and record it again."),
|
|
135
|
+
createdAt: {
|
|
136
|
+
$ref: "definitions.json#/definitions/date",
|
|
137
|
+
description: "When the entry was recorded, whether or not it carried an amount. A Pending cost has no estimate to be dated by, so this is how long the roster has been waiting on the quote."
|
|
138
|
+
},
|
|
139
|
+
createdBy: {
|
|
140
|
+
type: ["string", "null"],
|
|
141
|
+
default: null,
|
|
142
|
+
description: "The ID of the user who recorded the entry. Null when the write was not user-attributable. Stands in for `price.recordedBy` as the entry's author while it is a Pending cost."
|
|
143
|
+
},
|
|
133
144
|
billingReview: costBillingReview([
|
|
134
145
|
"writtenOff",
|
|
135
146
|
"voided",
|
|
@@ -231,9 +242,14 @@ const ticketSchema = {
|
|
|
231
242
|
"workScheduled",
|
|
232
243
|
"workRescheduled",
|
|
233
244
|
"workCanceled",
|
|
245
|
+
"workCompleted",
|
|
246
|
+
"workNotCompleted",
|
|
247
|
+
"workVerificationCleared",
|
|
234
248
|
"costRecorded",
|
|
235
249
|
"costPriceChanged",
|
|
236
|
-
"costVoided"
|
|
250
|
+
"costVoided",
|
|
251
|
+
"awaitingResponse",
|
|
252
|
+
"awaitingResponseCleared"
|
|
237
253
|
],
|
|
238
254
|
default: "message",
|
|
239
255
|
description: "The discriminator of the message."
|
|
@@ -370,6 +386,46 @@ const ticketSchema = {
|
|
|
370
386
|
}
|
|
371
387
|
}
|
|
372
388
|
},
|
|
389
|
+
awaitingResponse: {
|
|
390
|
+
type: "object",
|
|
391
|
+
additionalProperties: false,
|
|
392
|
+
required: ["awaiting"],
|
|
393
|
+
description: "Legacy. Earlier releases announced the Awaiting response marker in the conversation; the marker now lives only in the ticket's `awaitingResponse` slot and no new entries of this kind are written.",
|
|
394
|
+
properties: {
|
|
395
|
+
awaiting: {
|
|
396
|
+
type: "object",
|
|
397
|
+
additionalProperties: false,
|
|
398
|
+
required: [
|
|
399
|
+
"id",
|
|
400
|
+
"discriminator",
|
|
401
|
+
"name"
|
|
402
|
+
],
|
|
403
|
+
properties: {
|
|
404
|
+
id: { type: "string" },
|
|
405
|
+
discriminator: {
|
|
406
|
+
type: "string",
|
|
407
|
+
enum: ["user"]
|
|
408
|
+
},
|
|
409
|
+
name: { type: "string" }
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
messageId: {
|
|
413
|
+
type: ["string", "null"],
|
|
414
|
+
default: null,
|
|
415
|
+
description: "The conversation message this marker was sent with, when the composer set both in one write."
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
awaitingResponseCleared: {
|
|
420
|
+
type: "object",
|
|
421
|
+
additionalProperties: false,
|
|
422
|
+
required: ["reason"],
|
|
423
|
+
description: "Legacy. Earlier releases announced the end of a wait in the conversation; no new entries of this kind are written.",
|
|
424
|
+
properties: { reason: {
|
|
425
|
+
type: "string",
|
|
426
|
+
enum: ["explicit", "left"]
|
|
427
|
+
} }
|
|
428
|
+
},
|
|
373
429
|
readBy: {
|
|
374
430
|
type: "array",
|
|
375
431
|
default: [],
|
|
@@ -573,7 +629,7 @@ const ticketSchema = {
|
|
|
573
629
|
work: {
|
|
574
630
|
type: "array",
|
|
575
631
|
default: [],
|
|
576
|
-
description: "Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history and a past-dated
|
|
632
|
+
description: "Work items scheduled on the ticket: who is coming, when, and what for. Many per ticket, including repeat visits by the same performer. Carries no lifecycle status — the conversation log is the history, and only a roster verification says whether a past-dated visit happened. Never redacted; vendor identity is already public in assignment.",
|
|
577
633
|
items: {
|
|
578
634
|
type: "object",
|
|
579
635
|
additionalProperties: false,
|
|
@@ -654,6 +710,49 @@ const ticketSchema = {
|
|
|
654
710
|
description: "When the disposition was set."
|
|
655
711
|
}
|
|
656
712
|
}
|
|
713
|
+
},
|
|
714
|
+
verification: {
|
|
715
|
+
type: ["object", "null"],
|
|
716
|
+
additionalProperties: false,
|
|
717
|
+
required: [
|
|
718
|
+
"outcome",
|
|
719
|
+
"verifiedBy",
|
|
720
|
+
"verifiedAt"
|
|
721
|
+
],
|
|
722
|
+
default: null,
|
|
723
|
+
description: "What a facilities roster member saw at this visit, or null while nobody has recorded it. The date passing is not an outcome: an unverified past-dated visit is unverified, and this slot is the only thing that says whether the visit happened. Reversible by the roster while the ticket is active; frozen once it closes.",
|
|
724
|
+
properties: {
|
|
725
|
+
outcome: {
|
|
726
|
+
type: "string",
|
|
727
|
+
enum: ["completed", "notCompleted"],
|
|
728
|
+
description: "Whether the work the visit was booked for got done. A not-completed visit is frozen: the return trip is a new work item, not a re-dated one."
|
|
729
|
+
},
|
|
730
|
+
comment: {
|
|
731
|
+
type: ["string", "null"],
|
|
732
|
+
default: null,
|
|
733
|
+
description: "What the verifier wants on the record, required when the visit was not completed and optional when it was."
|
|
734
|
+
},
|
|
735
|
+
verifiedBy: {
|
|
736
|
+
type: "object",
|
|
737
|
+
additionalProperties: false,
|
|
738
|
+
required: ["id", "name"],
|
|
739
|
+
description: "The roster member who recorded the outcome, named here so a later rename cannot rewrite what the thread already said.",
|
|
740
|
+
properties: {
|
|
741
|
+
id: {
|
|
742
|
+
type: "string",
|
|
743
|
+
description: "The ID of the verifying user."
|
|
744
|
+
},
|
|
745
|
+
name: {
|
|
746
|
+
type: "string",
|
|
747
|
+
description: "The verifying user's name at the time of the write."
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
verifiedAt: {
|
|
752
|
+
$ref: "definitions.json#/definitions/date",
|
|
753
|
+
description: "When the outcome was recorded."
|
|
754
|
+
}
|
|
755
|
+
}
|
|
657
756
|
}
|
|
658
757
|
}
|
|
659
758
|
}
|
|
@@ -774,6 +873,21 @@ const ticketSchema = {
|
|
|
774
873
|
minimum: 0,
|
|
775
874
|
description: "The effective do-not-exceed amount in integer cents the approval gate compares against, resolved per read from the organization and property Concierge settings. Never stored on the document and never set by clients; absent on payloads where it could not be resolved. Viewer-independent: the DNE is the customer's own contract term, so org-side viewers see it."
|
|
776
875
|
},
|
|
876
|
+
stages: {
|
|
877
|
+
type: "array",
|
|
878
|
+
description: "The Stages the ticket carries, in the fixed chip order. Derived at read time from the ticket's own facts, never stored and never set by clients, and absent for every viewer outside Kohost's facilities staff. A ticket may carry several at once; `closed` and `pending` tickets carry none.",
|
|
879
|
+
items: {
|
|
880
|
+
type: "string",
|
|
881
|
+
enum: [
|
|
882
|
+
"awaitingClientApproval",
|
|
883
|
+
"awaitingClientResponse",
|
|
884
|
+
"awaitingVendorQuote",
|
|
885
|
+
"vendorScheduled",
|
|
886
|
+
"confirmCosts",
|
|
887
|
+
"resolveReady"
|
|
888
|
+
]
|
|
889
|
+
}
|
|
890
|
+
},
|
|
777
891
|
approvalState: {
|
|
778
892
|
type: "string",
|
|
779
893
|
enum: [
|
|
@@ -784,6 +898,68 @@ const ticketSchema = {
|
|
|
784
898
|
default: "clear",
|
|
785
899
|
description: "Server-maintained denormalization of the approval gate, updated on every cost or approval write (reopenCount pattern) so queue filters get O(1) access. Never set by clients."
|
|
786
900
|
},
|
|
901
|
+
awaitingResponse: {
|
|
902
|
+
type: ["object", "null"],
|
|
903
|
+
default: null,
|
|
904
|
+
additionalProperties: false,
|
|
905
|
+
required: [
|
|
906
|
+
"author",
|
|
907
|
+
"awaiting",
|
|
908
|
+
"since"
|
|
909
|
+
],
|
|
910
|
+
description: "A Kohost Facilities agent's private note that they are waiting on a reply, from one named participant outside Kohost's side or from anyone outside it. Served only to the Facilities roster; every other viewer receives null. A named wait ends when anyone other than its author posts a public message or when the awaited person leaves the ticket; an anyone wait ends when someone outside Kohost's side posts a public message. Either ends when the roster clears it. Written only through SetAwaitingResponse and ClearAwaitingResponse.",
|
|
911
|
+
properties: {
|
|
912
|
+
author: {
|
|
913
|
+
type: "object",
|
|
914
|
+
additionalProperties: false,
|
|
915
|
+
required: [
|
|
916
|
+
"id",
|
|
917
|
+
"discriminator",
|
|
918
|
+
"name"
|
|
919
|
+
],
|
|
920
|
+
description: "Who set the marker.",
|
|
921
|
+
properties: {
|
|
922
|
+
id: { type: "string" },
|
|
923
|
+
discriminator: {
|
|
924
|
+
type: "string",
|
|
925
|
+
enum: [
|
|
926
|
+
"user",
|
|
927
|
+
"vendor",
|
|
928
|
+
"system"
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
name: { type: "string" }
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
awaiting: {
|
|
935
|
+
type: ["object", "null"],
|
|
936
|
+
additionalProperties: false,
|
|
937
|
+
required: [
|
|
938
|
+
"id",
|
|
939
|
+
"discriminator",
|
|
940
|
+
"name"
|
|
941
|
+
],
|
|
942
|
+
description: "The person the ticket is waiting on. Null when the wait is on anyone outside Kohost's side rather than one named person.",
|
|
943
|
+
properties: {
|
|
944
|
+
id: { type: "string" },
|
|
945
|
+
discriminator: {
|
|
946
|
+
type: "string",
|
|
947
|
+
enum: ["user"]
|
|
948
|
+
},
|
|
949
|
+
name: { type: "string" }
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
since: {
|
|
953
|
+
$ref: "definitions.json#/definitions/date",
|
|
954
|
+
description: "When the marker was set."
|
|
955
|
+
},
|
|
956
|
+
messageId: {
|
|
957
|
+
type: ["string", "null"],
|
|
958
|
+
default: null,
|
|
959
|
+
description: "Legacy. Earlier releases linked the marker to the message it was sent with; no longer written."
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
},
|
|
787
963
|
tags: {
|
|
788
964
|
type: "array",
|
|
789
965
|
default: [],
|