@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport {\n costBillingReview,\n costEntryProperties,\n costEntryRequired,\n} from \"./costEntry\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\n// Rich-text node vocabulary for parsedBody.content (ADR 0012). Deliberately\n// fixed-depth rather than recursive: json-schema-to-ts cannot derive types\n// from self-referencing schemas, so nested lists are excluded. These consts\n// must not be exported — the model generator treats the first export ending\n// in \"Schema\" as the entity schema.\nconst richTextTextNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"text\"],\n properties: {\n type: { type: \"string\", enum: [\"text\"] },\n text: { type: \"string\" },\n marks: {\n type: \"array\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"bold\", \"italic\", \"underline\"] },\n },\n },\n} as const;\n\nconst richTextMentionNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"id\", \"discriminator\", \"label\"],\n properties: {\n type: { type: \"string\", enum: [\"mention\"] },\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\", \"vendor\", \"system\"] },\n label: {\n type: \"string\",\n description:\n \"Display name of the mentioned entity, without the leading @.\",\n },\n },\n} as const;\n\nconst richTextHardBreakNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: { type: \"string\", enum: [\"hardBreak\"] },\n },\n} as const;\n\nconst richTextInlineNodes = {\n type: \"array\",\n minItems: 1,\n items: {\n anyOf: [richTextTextNode, richTextMentionNode, richTextHardBreakNode],\n },\n} as const;\n\nconst richTextParagraphNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"paragraph\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextListItemNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"listItem\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextBulletListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"bulletList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nconst richTextOrderedListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"orderedList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\n// A cost entry reaches a client in one of two shapes, and both are valid wire\n// payloads a `Ticket` model must accept. A roster viewer or superadmin receives\n// the stored entry (`fullCostEntry`): the customer `price`, the vendor\n// `estimate`, `markup`, and an optional `actual`. Every other viewer receives\n// the redacted projection (`redactedCostEntry`) the API builds field-by-field —\n// the stored price as a bare amount, never the vendor cost or markup behind it\n// (see `redactCostEntry`/`applyTicketVisibility` in the API). The two are\n// disjoint (each forbids the other's discriminating fields via\n// `additionalProperties`, and `price` is an object on one and an integer on the\n// other), so `costs.items` is their `oneOf`.\nconst fullCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: costEntryRequired,\n properties: {\n ...costEntryProperties,\n // A ticket cost can also be voided, which the standalone kind has no\n // ticket to be withdrawn from.\n billingReview: costBillingReview([\n \"writtenOff\",\n \"voided\",\n \"reinstated\",\n \"divergenceAcknowledged\",\n ]),\n workItemId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The Work item on this ticket that produced the cost. Many entries \" +\n \"may name one visit, so a single trip's labor and materials can be \" +\n \"itemized. Cleared when the Work item is removed — the money record \" +\n \"outlives the scheduling record. Internal, redacted org-side.\",\n },\n voided: {\n type: \"boolean\",\n default: false,\n description:\n \"Server-maintained denormalization of billingReview (writtenOff \" +\n \"pattern): true after a voided entry until a reinstated entry \" +\n \"follows. A voided cost is withdrawn: it counts toward \" +\n \"neither the approval gate nor financial completion and leaves the \" +\n \"uninvoiced pool, but stays on the ticket so every viewer sees it \" +\n \"was voided. Never set by clients.\",\n },\n },\n} as const;\n\nconst redactedCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"description\", \"currency\", \"price\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the cost entry.\",\n },\n description: {\n type: \"string\",\n description: \"What the cost covers.\",\n },\n currency: {\n type: \"string\",\n default: \"USD\",\n description: \"ISO 4217 currency code of the entry's amounts.\",\n },\n price: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The entry's stored customer price in integer cents — the whole of \" +\n \"what an org-side viewer receives, flattened out of the stored \" +\n \"price phase so none of its recording metadata comes with it.\",\n },\n voided: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether the entry was voided (withdrawn). Carried through \" +\n \"redaction so an org-side viewer sees the cost no longer counts.\",\n },\n settled: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether a bill has claimed the entry or it was written off, so it \" +\n \"can no longer be voided. Carried through redaction as a bare flag: \" +\n \"neither the bill nor the write-off itself is exposed org-side.\",\n },\n },\n} as const;\n\n// A Work item is a scheduled performance of work on the ticket — who is coming,\n// when, and what for. Timing is wall-clock at the property, not an instant: vendors\n// commit to \"Thursday\" as often as to \"Thursday at 10\", and an instant would\n// force a fake time on the day-only case and drift a day across the property's\n// timezone on every render. `date` and `time` therefore mean exactly what the\n// building reads off them, and the conversation event can be minted without\n// resolving a timezone at all.\nconst workItemSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"performer\", \"date\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the work item.\",\n },\n performer: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description:\n \"Who is performing the work — a Vendor, or a staff User the work is \" +\n \"scheduled to. A discriminated reference in the same shape as \" +\n \"`assignedTo`, but orthogonal to it: `assignedTo` is who owns the \" +\n \"ticket, this is who shows up for one visit.\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the performer.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"vendor\", \"user\"],\n description: \"The discriminator of the performer.\",\n },\n name: {\n type: \"string\",\n description:\n \"The performer's name, denormalized at schedule time for rendering.\",\n },\n },\n },\n date: {\n type: \"string\",\n pattern: \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\",\n description:\n \"The calendar date of the visit as YYYY-MM-DD, read in the property's timezone.\",\n },\n time: {\n type: [\"string\", \"null\"],\n pattern: \"^([01]\\\\d|2[0-3]):[0-5]\\\\d$\",\n default: null,\n description:\n \"The 24-hour local start time as HH:mm, or null for a day-only \" +\n \"commitment. Day-only is first-class, not a missing value.\",\n },\n description: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"What the visit is for, in the scheduler's words — the scope handed \" +\n \"to whoever shows up. Optional: a booking with nothing to add carries \" +\n \"null, and the performer and the slot are the whole record.\",\n },\n scheduledBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this work item. Null when the write was not user-attributable.\",\n },\n scheduledAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the work item was created.\",\n },\n noCharge: {\n type: [\"object\", \"null\"],\n additionalProperties: false,\n required: [\"setBy\", \"setAt\"],\n default: null,\n description:\n \"The explicit decision that this visit will never be billed, or \" +\n \"null while no decision has been made. A disposition rather than a \" +\n \"zero-dollar cost: nothing was charged, so there is no amount to \" +\n \"record, and financial completion asks whether every visit is \" +\n \"either billed or deliberately not. Reversible while the ticket is \" +\n \"active; frozen once it closes.\",\n properties: {\n setBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write set the disposition. Null when \" +\n \"the write was not user-attributable.\",\n },\n setAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the disposition was set.\",\n },\n },\n },\n },\n} as const;\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"issueChanged\",\n \"nudged\",\n \"approvalRequested\",\n \"approvalApproved\",\n \"approvalDenied\",\n \"workScheduled\",\n \"workRescheduled\",\n \"workCanceled\",\n \"costRecorded\",\n \"costPriceChanged\",\n \"costVoided\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description:\n \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n content: {\n type: \"array\",\n minItems: 1,\n description:\n \"Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.\",\n items: {\n anyOf: [\n richTextParagraphNode,\n richTextBulletListNode,\n richTextOrderedListNode,\n ],\n },\n },\n text: {\n type: \"string\",\n description: \"The mention text (legacy tokenized format).\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n attachments: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n description:\n \"Files attached to the message. Supersedes the singular media.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n 'Server-derived count of transitions back to \"open\" that followed a solve/close. reopenCount > 0 answers \"was this ticket ever reopened?\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.',\n },\n work: {\n type: \"array\",\n default: [],\n description:\n \"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 entry is implicitly done. Never redacted; vendor identity is already public in assignment.\",\n items: workItemSchema,\n },\n costs: {\n type: \"array\",\n default: [],\n description:\n \"Cost line items recorded on the ticket. Each entry stores the customer price and the vendor cost side by side and keeps them independent: the price is seeded from the estimate and markup at recording, and nothing about the vendor side moves it afterwards. Every entry arrives as either the full vendor shape or the redacted price-only shape depending on whether the viewer may see the cost split.\",\n items: {\n oneOf: [fullCostEntrySchema, redactedCostEntrySchema],\n },\n },\n approvals: {\n type: \"array\",\n default: [],\n description:\n \"Approval request history for the ticket. At most one pending record at a time; records are immutable once decided (enforced by use cases).\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"amount\", \"approverUserIds\", \"status\", \"requestedAt\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the approval record.\",\n },\n amount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The ticket's customer price total in integer cents, frozen at request time.\",\n },\n approverUserIds: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"string\",\n },\n description:\n \"The effective approver set for this request, frozen at request time.\",\n },\n status: {\n type: \"string\",\n enum: [\"pending\", \"approved\", \"denied\"],\n default: \"pending\",\n },\n requestedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the approval was requested.\",\n },\n requestedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this request, frozen at request time. Null when the write was not user-attributable.\",\n },\n decidedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description: \"The ID of the approver who decided the request.\",\n },\n decidedAt: {\n anyOf: [\n { $ref: \"definitions.json#/definitions/date\" },\n { type: \"null\" },\n ],\n default: null,\n description: \"When the request was decided.\",\n },\n comment: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The decider's comment. Required on deny, optional on approve (enforced by use cases).\",\n },\n },\n },\n },\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n description:\n \"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.\",\n },\n approvalState: {\n type: \"string\",\n enum: [\"clear\", \"awaitingApproval\", \"denied\"],\n default: \"clear\",\n description:\n \"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.\",\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\ntype TicketSchemaBase = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\n/** A stored cost entry: the full shape, with `price`, `estimate` and `markup`. */\nexport type TicketCostEntry = Extract<\n NonNullable<TicketSchemaBase[\"costs\"]>[number],\n { estimate: unknown }\n>;\n\n/** One scheduled performance of work on a ticket. */\nexport type TicketWorkItem = NonNullable<TicketSchemaBase[\"work\"]>[number];\n\n/** One append-only billing review entry on a stored cost entry. */\nexport type TicketCostBillingReviewEntry = NonNullable<\n TicketCostEntry[\"billingReview\"]\n>[number];\n\n// The runtime `costs.items` schema is a `oneOf` so a `Ticket` model validates\n// both wire shapes a read can return (see the schema comment), which makes the\n// derived element type a `full | redacted` union. A stored ticket, though, only\n// ever holds the full shape — the redacted projection exists solely at the API\n// read seam (`redactTicketCostSplit`, which casts through `unknown`). Model and\n// write-path consumers reason about the stored document, so `costs` is narrowed\n// back to the full entry here; the redacted shape stays a validation-only\n// concern rather than leaking into every `ticket.costs` dereference.\nexport type TicketSchema = Omit<TicketSchemaBase, \"costs\"> & {\n costs?: TicketCostEntry[];\n};\n"],"mappings":";;AAsDA,MAAM,sBAAsB;CAC1B,MAAM;CACN,UAAU;CACV,OAAO,EACL,OAAO;EAAC;GA3CV,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,QAAQ,MAAM;GACzB,YAAY;IACV,MAAM;KAAE,MAAM;KAAU,MAAM,CAAC,MAAM;IAAE;IACvC,MAAM,EAAE,MAAM,SAAS;IACvB,OAAO;KACL,MAAM;KACN,aAAa;KACb,OAAO;MAAE,MAAM;MAAU,MAAM;OAAC;OAAQ;OAAU;MAAW;KAAE;IACjE;GACF;EAgCyB;EAAG;GA5B5B,MAAM;GACN,sBAAsB;GACtB,UAAU;IAAC;IAAQ;IAAM;IAAiB;GAAO;GACjD,YAAY;IACV,MAAM;KAAE,MAAM;KAAU,MAAM,CAAC,SAAS;IAAE;IAC1C,IAAI,EAAE,MAAM,SAAS;IACrB,eAAe;KAAE,MAAM;KAAU,MAAM;MAAC;MAAQ;MAAU;KAAQ;IAAE;IACpE,OAAO;KACL,MAAM;KACN,aACE;IACJ;GACF;EAgB8C;EAAG;GAZjD,MAAM;GACN,sBAAsB;GACtB,UAAU,CAAC,MAAM;GACjB,YAAY,EACV,MAAM;IAAE,MAAM;IAAU,MAAM,CAAC,WAAW;GAAE,EAC9C;EAOqE;CAAC,EACtE;AACF;AAEA,MAAM,wBAAwB;CAC5B,MAAM;CACN,sBAAsB;CACtB,UAAU,CAAC,QAAQ,SAAS;CAC5B,YAAY;EACV,MAAM;GAAE,MAAM;GAAU,MAAM,CAAC,WAAW;EAAE;EAC5C,SAAS;CACX;AACF;AAEA,MAAM,uBAAuB;CAC3B,MAAM;CACN,sBAAsB;CACtB,UAAU,CAAC,QAAQ,SAAS;CAC5B,YAAY;EACV,MAAM;GAAE,MAAM;GAAU,MA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AAU;KAAC;KAAM;KAAiB;KAAa;KAAQ;IAAQ;IAC/D,YAAY;KACV,IAAI;MACF,MAAM;MACN,aAAa;KACf;KACA,eAAe;MACb,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;MACA,SAAS;MACT,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,aACE;MACF,SAAS;KACX;KACA,QAAQ;MACN,MAAM;MACN,sBAAsB;MACtB,UAAU;OAAC;OAAM;OAAiB;MAAM;MACxC,YAAY;OACV,IAAI;QACF,MAAM;QACN,aAAa;OACf;OACA,eAAe;QACb,MAAM;QACN,MAAM;SAAC;SAAQ;SAAU;QAAQ;QACjC,aAAa;OACf;OACA,MAAM;QACJ,MAAM;QACN,aAAa;OACf;MACF;KACF;KACA,WAAW;MACT,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,sBAAsB;MACtB,aACE;MACF,YAAY;OACV,SAAS;QACP,MAAM;QACN,UAAU;QACV,aACE;QACF,OAAO,EACL,OAAO;SACL;SACA;SACA;QACF,EACF;OACF;OACA,MAAM;QACJ,MAAM;QACN,aAAa;OACf;OACA,UAAU;QACR,MAAM;QACN,SAAS,CAAC;QACV,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU;UACR;UACA;UACA;UACA;UACA;SACF;SACA,YAAY;UACV,IAAI;WACF,MAAM;WACN,aAAa;UACf;UACA,eAAe;WACb,MAAM;WACN,MAAM;YAAC;YAAQ;YAAU;WAAQ;WACjC,aACE;UACJ;UACA,OAAO;WACL,MAAM;WACN,aAAa;UACf;UACA,QAAQ;WACN,MAAM;WACN,aAAa;UACf;UACA,cAAc;WACZ,MAAM;WACN,aAAa;UACf;SACF;QACF;OACF;MACF;KACF;KACA,eAAe;MACb,MAAM;MACN,sBAAs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ACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"ticket.js","names":[],"sources":["../../.generated/schemas/ticket.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport {\n costBillingReview,\n costEntryProperties,\n costEntryRequired,\n nullableMoney,\n} from \"./costEntry\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\n// Rich-text node vocabulary for parsedBody.content (ADR 0012). Deliberately\n// fixed-depth rather than recursive: json-schema-to-ts cannot derive types\n// from self-referencing schemas, so nested lists are excluded. These consts\n// must not be exported — the model generator treats the first export ending\n// in \"Schema\" as the entity schema.\nconst richTextTextNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"text\"],\n properties: {\n type: { type: \"string\", enum: [\"text\"] },\n text: { type: \"string\" },\n marks: {\n type: \"array\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"bold\", \"italic\", \"underline\"] },\n },\n },\n} as const;\n\nconst richTextMentionNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"id\", \"discriminator\", \"label\"],\n properties: {\n type: { type: \"string\", enum: [\"mention\"] },\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\", \"vendor\", \"system\"] },\n label: {\n type: \"string\",\n description:\n \"Display name of the mentioned entity, without the leading @.\",\n },\n },\n} as const;\n\nconst richTextHardBreakNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\"],\n properties: {\n type: { type: \"string\", enum: [\"hardBreak\"] },\n },\n} as const;\n\nconst richTextInlineNodes = {\n type: \"array\",\n minItems: 1,\n items: {\n anyOf: [richTextTextNode, richTextMentionNode, richTextHardBreakNode],\n },\n} as const;\n\nconst richTextParagraphNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"paragraph\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextListItemNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"listItem\"] },\n content: richTextInlineNodes,\n },\n} as const;\n\nconst richTextBulletListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"bulletList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\nconst richTextOrderedListNode = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"content\"],\n properties: {\n type: { type: \"string\", enum: [\"orderedList\"] },\n content: { type: \"array\", minItems: 1, items: richTextListItemNode },\n },\n} as const;\n\n// A cost entry reaches a client in one of two shapes, and both are valid wire\n// payloads a `Ticket` model must accept. A roster viewer or superadmin receives\n// the stored entry (`fullCostEntry`): the customer `price`, the vendor\n// `estimate`, `markup`, and an optional `actual`. Every other viewer receives\n// the redacted projection (`redactedCostEntry`) the API builds field-by-field —\n// the stored price as a bare amount, never the vendor cost or markup behind it\n// (see `redactCostEntry`/`applyTicketVisibility` in the API). The two are\n// disjoint (each forbids the other's discriminating fields via\n// `additionalProperties`, and `price` is an object on one and an integer on the\n// other), so `costs.items` is their `oneOf`.\nconst fullCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: costEntryRequired,\n properties: {\n ...costEntryProperties,\n // Both amounts are null together on a Pending cost: an entry the roster\n // recorded before the vendor quoted it. Nothing prices until the first\n // amount lands, which seeds the estimate and derives the price from it.\n price: nullableMoney(\n \"The authoritative customer price, what the org is charged, what the \" +\n \"approval gate totals, and what a bill line bills. Seeded at pricing \" +\n \"from the estimate and the markup, and from then on independent of \" +\n \"all three: editing `estimate`, `actual`, or `markup` never moves it. \" +\n \"Only an explicit price write does. Null while the entry is a Pending \" +\n \"cost, which prices nothing and never reaches an org-side viewer.\",\n ),\n estimate: nullableMoney(\n \"The vendor cost estimate phase of the entry. Null while the entry is \" +\n \"a Pending cost: this field is what says an amount is known, so a \" +\n \"null here is the whole definition of pending. Clearing a recorded \" +\n \"amount back to null is refused; void the entry and record it again.\",\n ),\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"When the entry was recorded, whether or not it carried an amount. \" +\n \"A Pending cost has no estimate to be dated by, so this is how long \" +\n \"the roster has been waiting on the quote.\",\n },\n createdBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user who recorded the entry. Null when the write was \" +\n \"not user-attributable. Stands in for `price.recordedBy` as the \" +\n \"entry's author while it is a Pending cost.\",\n },\n // A ticket cost can also be voided, which the standalone kind has no\n // ticket to be withdrawn from.\n billingReview: costBillingReview([\n \"writtenOff\",\n \"voided\",\n \"reinstated\",\n \"divergenceAcknowledged\",\n ]),\n workItemId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The Work item on this ticket that produced the cost. Many entries \" +\n \"may name one visit, so a single trip's labor and materials can be \" +\n \"itemized. Cleared when the Work item is removed — the money record \" +\n \"outlives the scheduling record. Internal, redacted org-side.\",\n },\n voided: {\n type: \"boolean\",\n default: false,\n description:\n \"Server-maintained denormalization of billingReview (writtenOff \" +\n \"pattern): true after a voided entry until a reinstated entry \" +\n \"follows. A voided cost is withdrawn: it counts toward \" +\n \"neither the approval gate nor financial completion and leaves the \" +\n \"uninvoiced pool, but stays on the ticket so every viewer sees it \" +\n \"was voided. Never set by clients.\",\n },\n },\n} as const;\n\nconst redactedCostEntrySchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"description\", \"currency\", \"price\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the cost entry.\",\n },\n description: {\n type: \"string\",\n description: \"What the cost covers.\",\n },\n currency: {\n type: \"string\",\n default: \"USD\",\n description: \"ISO 4217 currency code of the entry's amounts.\",\n },\n price: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The entry's stored customer price in integer cents — the whole of \" +\n \"what an org-side viewer receives, flattened out of the stored \" +\n \"price phase so none of its recording metadata comes with it.\",\n },\n voided: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether the entry was voided (withdrawn). Carried through \" +\n \"redaction so an org-side viewer sees the cost no longer counts.\",\n },\n settled: {\n type: \"boolean\",\n default: false,\n description:\n \"Whether a bill has claimed the entry or it was written off, so it \" +\n \"can no longer be voided. Carried through redaction as a bare flag: \" +\n \"neither the bill nor the write-off itself is exposed org-side.\",\n },\n },\n} as const;\n\n// A Work item is a scheduled performance of work on the ticket — who is coming,\n// when, and what for. Timing is wall-clock at the property, not an instant: vendors\n// commit to \"Thursday\" as often as to \"Thursday at 10\", and an instant would\n// force a fake time on the day-only case and drift a day across the property's\n// timezone on every render. `date` and `time` therefore mean exactly what the\n// building reads off them, and the conversation event can be minted without\n// resolving a timezone at all.\nconst workItemSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"performer\", \"date\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the work item.\",\n },\n performer: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description:\n \"Who is performing the work — a Vendor, or a staff User the work is \" +\n \"scheduled to. A discriminated reference in the same shape as \" +\n \"`assignedTo`, but orthogonal to it: `assignedTo` is who owns the \" +\n \"ticket, this is who shows up for one visit.\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the performer.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"vendor\", \"user\"],\n description: \"The discriminator of the performer.\",\n },\n name: {\n type: \"string\",\n description:\n \"The performer's name, denormalized at schedule time for rendering.\",\n },\n },\n },\n date: {\n type: \"string\",\n pattern: \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\",\n description:\n \"The calendar date of the visit as YYYY-MM-DD, read in the property's timezone.\",\n },\n time: {\n type: [\"string\", \"null\"],\n pattern: \"^([01]\\\\d|2[0-3]):[0-5]\\\\d$\",\n default: null,\n description:\n \"The 24-hour local start time as HH:mm, or null for a day-only \" +\n \"commitment. Day-only is first-class, not a missing value.\",\n },\n description: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"What the visit is for, in the scheduler's words — the scope handed \" +\n \"to whoever shows up. Optional: a booking with nothing to add carries \" +\n \"null, and the performer and the slot are the whole record.\",\n },\n scheduledBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this work item. Null when the write was not user-attributable.\",\n },\n scheduledAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the work item was created.\",\n },\n noCharge: {\n type: [\"object\", \"null\"],\n additionalProperties: false,\n required: [\"setBy\", \"setAt\"],\n default: null,\n description:\n \"The explicit decision that this visit will never be billed, or \" +\n \"null while no decision has been made. A disposition rather than a \" +\n \"zero-dollar cost: nothing was charged, so there is no amount to \" +\n \"record, and financial completion asks whether every visit is \" +\n \"either billed or deliberately not. Reversible while the ticket is \" +\n \"active; frozen once it closes.\",\n properties: {\n setBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write set the disposition. Null when \" +\n \"the write was not user-attributable.\",\n },\n setAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the disposition was set.\",\n },\n },\n },\n verification: {\n type: [\"object\", \"null\"],\n additionalProperties: false,\n required: [\"outcome\", \"verifiedBy\", \"verifiedAt\"],\n default: null,\n description:\n \"What a facilities roster member saw at this visit, or null while \" +\n \"nobody has recorded it. The date passing is not an outcome: an \" +\n \"unverified past-dated visit is unverified, and this slot is the \" +\n \"only thing that says whether the visit happened. Reversible by the \" +\n \"roster while the ticket is active; frozen once it closes.\",\n properties: {\n outcome: {\n type: \"string\",\n enum: [\"completed\", \"notCompleted\"],\n description:\n \"Whether the work the visit was booked for got done. A \" +\n \"not-completed visit is frozen: the return trip is a new work \" +\n \"item, not a re-dated one.\",\n },\n comment: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"What the verifier wants on the record, required when the visit \" +\n \"was not completed and optional when it was.\",\n },\n verifiedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"name\"],\n description:\n \"The roster member who recorded the outcome, named here so a \" +\n \"later rename cannot rewrite what the thread already said.\",\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the verifying user.\",\n },\n name: {\n type: \"string\",\n description:\n \"The verifying user's name at the time of the write.\",\n },\n },\n },\n verifiedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the outcome was recorded.\",\n },\n },\n },\n },\n} as const;\n\nexport const ticketSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"ticket.json\",\n title: \"Ticket\",\n description: \"A ticket is a request from a user.\",\n type: \"object\",\n required: [\n \"id\",\n \"conversation\",\n \"requester\",\n \"openedBy\",\n \"assignedTo\",\n \"status\",\n \"priority\",\n \"tags\",\n \"createdAt\",\n \"updatedAt\",\n ],\n additionalProperties: false,\n properties: {\n id: {\n $ref: \"definitions.json#/definitions/id\",\n },\n propertyId: {\n type: \"string\",\n description:\n \"ID of the property this entity belongs to. Optional — used as a per-document filter inside the org-scoped database.\",\n },\n type: {\n type: \"string\",\n enum: [\"ticket\"],\n default: \"ticket\",\n },\n number: {\n type: \"string\",\n description: \"The number of the ticket.\",\n },\n issueId: {\n type: \"string\",\n description: \"The ID of the issue that this ticket is associated with.\",\n },\n parentAutomationId: {\n type: \"string\",\n description: \"The ID of the automation that created this ticket.\",\n },\n conversation: {\n type: \"array\",\n default: [],\n description: \"The conversation history of the ticket.\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"timestamp\", \"body\", \"author\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\n \"message\",\n \"opened\",\n \"assigned\",\n \"rated\",\n \"scheduled\",\n \"collaboratorAdded\",\n \"collaboratorRemoved\",\n \"statusChanged\",\n \"priorityChanged\",\n \"scheduleDateChanged\",\n \"locationChanged\",\n \"issueChanged\",\n \"nudged\",\n \"approvalRequested\",\n \"approvalApproved\",\n \"approvalDenied\",\n \"workScheduled\",\n \"workRescheduled\",\n \"workCanceled\",\n \"workCompleted\",\n \"workNotCompleted\",\n \"workVerificationCleared\",\n \"costRecorded\",\n \"costPriceChanged\",\n \"costVoided\",\n \"awaitingResponse\",\n \"awaitingResponseCleared\",\n ],\n default: \"message\",\n description: \"The discriminator of the message.\",\n },\n isInternal: {\n type: \"boolean\",\n description:\n \"Whether the message is internal to the assignedTo and collaborators. Internal messages are not visible to the requester.\",\n default: false,\n },\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the author of the message.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description: \"The discriminator of the author of the message.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the author of the message.\",\n },\n },\n },\n timestamp: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"The ISO 8601 timestamp of the message.\",\n },\n body: {\n type: \"string\",\n description: \"The body of the message.\",\n },\n parsedBody: {\n type: \"object\",\n additionalProperties: false,\n description:\n \"An object containing the parsed body of the message for mentions.\",\n properties: {\n content: {\n type: \"array\",\n minItems: 1,\n description:\n \"Rich-text block nodes (ADR 0012). Present = rich message: `body` is the server-derived plain-text projection of this tree, and the legacy text/mentions fields are not written.\",\n items: {\n anyOf: [\n richTextParagraphNode,\n richTextBulletListNode,\n richTextOrderedListNode,\n ],\n },\n },\n text: {\n type: \"string\",\n description: \"The mention text (legacy tokenized format).\",\n },\n mentions: {\n type: \"array\",\n default: [],\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\n \"discriminator\",\n \"id\",\n \"index\",\n \"length\",\n \"originalText\",\n ],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the mention.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n description:\n \"The discriminator of entity that was mentioned.\",\n },\n index: {\n type: \"integer\",\n description: \"The index of the mention in the message.\",\n },\n length: {\n type: \"integer\",\n description: \"The length of the mention in the message.\",\n },\n originalText: {\n type: \"string\",\n description: \"The original text of the mention.\",\n },\n },\n },\n },\n },\n },\n statusChanged: {\n type: \"object\",\n additionalProperties: false,\n required: [\"from\", \"to\"],\n description:\n \"Structured status transition for `statusChanged` entries. Lets consumers detect reopens (from solved/closed to open) without parsing the body text.\",\n properties: {\n from: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned from.\",\n },\n to: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n description: \"The status the ticket transitioned to.\",\n },\n },\n },\n awaitingResponse: {\n type: \"object\",\n additionalProperties: false,\n required: [\"awaiting\"],\n description:\n \"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.\",\n properties: {\n awaiting: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\"] },\n name: { type: \"string\" },\n },\n },\n messageId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The conversation message this marker was sent with, when the composer set both in one write.\",\n },\n },\n },\n awaitingResponseCleared: {\n type: \"object\",\n additionalProperties: false,\n required: [\"reason\"],\n description:\n \"Legacy. Earlier releases announced the end of a wait in the conversation; no new entries of this kind are written.\",\n properties: {\n reason: {\n type: \"string\",\n enum: [\"explicit\", \"left\"],\n },\n },\n },\n readBy: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n description: \"The IDs of the users who have read the message.\",\n },\n media: {\n anyOf: [{ $ref: \"mediaFile.json\" }, { type: \"null\" }],\n description: \"The media file associated with the message.\",\n },\n attachments: {\n type: \"array\",\n items: { $ref: \"mediaFile.json\" },\n description:\n \"Files attached to the message. Supersedes the singular media.\",\n },\n },\n },\n },\n subject: {\n type: \"string\",\n description: \"The subject of the ticket.\",\n },\n openedBy: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"system\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n requester: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the requester.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\", \"device\"],\n description: \"The discriminator of the requester.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the requester.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the requester.\",\n },\n },\n },\n assignedTo: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the assigned to.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n description: \"The discriminator of the assigned to.\",\n },\n name: {\n type: \"string\",\n description: \"The name of the assigned to.\",\n },\n photo: {\n anyOf: [\n { $ref: \"mediaFile.json\" },\n { type: \"null\" },\n { type: \"string\" },\n ],\n description: \"The photo of the assigned to.\",\n },\n },\n },\n notify: {\n type: \"array\",\n description:\n \"A list of entities to notify when this ticket is created or resolved.\",\n default: [],\n items: {\n type: \"object\",\n required: [\"id\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the entity to notify.\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\"],\n },\n },\n },\n },\n collaborators: {\n type: \"array\",\n default: [],\n description: \"A list of entities who will collaborate on this ticket.\",\n items: {\n type: \"object\",\n required: [\"id\", \"name\", \"discriminator\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\"],\n },\n },\n },\n },\n location: {\n type: \"object\",\n required: [\"discriminator\", \"name\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n discriminator: {\n type: \"string\",\n enum: [\"space\", \"property\", \"customText\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n status: {\n type: \"string\",\n enum: [\"open\", \"pending\", \"solved\", \"closed\"],\n default: \"open\",\n },\n priority: {\n type: \"string\",\n enum: [\"low\", \"normal\", \"high\", \"critical\"],\n default: \"normal\",\n },\n priorityRank: {\n type: \"integer\",\n minimum: 1,\n maximum: 4,\n description:\n \"Server-derived numeric rank of priority (low=1, normal=2, high=3, critical=4). Denormalized to support priority sorting; never set by clients.\",\n },\n reopenCount: {\n type: \"integer\",\n minimum: 0,\n default: 0,\n description:\n 'Server-derived count of transitions back to \"open\" that followed a solve/close. reopenCount > 0 answers \"was this ticket ever reopened?\" in O(1); maintained at the repository layer across every status-write path. Never set by clients.',\n },\n work: {\n type: \"array\",\n default: [],\n description:\n \"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.\",\n items: workItemSchema,\n },\n costs: {\n type: \"array\",\n default: [],\n description:\n \"Cost line items recorded on the ticket. Each entry stores the customer price and the vendor cost side by side and keeps them independent: the price is seeded from the estimate and markup at recording, and nothing about the vendor side moves it afterwards. Every entry arrives as either the full vendor shape or the redacted price-only shape depending on whether the viewer may see the cost split.\",\n items: {\n oneOf: [fullCostEntrySchema, redactedCostEntrySchema],\n },\n },\n approvals: {\n type: \"array\",\n default: [],\n description:\n \"Approval request history for the ticket. At most one pending record at a time; records are immutable once decided (enforced by use cases).\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"amount\", \"approverUserIds\", \"status\", \"requestedAt\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The ID of the approval record.\",\n },\n amount: {\n type: \"integer\",\n minimum: 0,\n description:\n \"The ticket's customer price total in integer cents, frozen at request time.\",\n },\n approverUserIds: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"string\",\n },\n description:\n \"The effective approver set for this request, frozen at request time.\",\n },\n status: {\n type: \"string\",\n enum: [\"pending\", \"approved\", \"denied\"],\n default: \"pending\",\n },\n requestedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the approval was requested.\",\n },\n requestedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The ID of the user whose write created this request, frozen at request time. Null when the write was not user-attributable.\",\n },\n decidedBy: {\n type: [\"string\", \"null\"],\n default: null,\n description: \"The ID of the approver who decided the request.\",\n },\n decidedAt: {\n anyOf: [\n { $ref: \"definitions.json#/definitions/date\" },\n { type: \"null\" },\n ],\n default: null,\n description: \"When the request was decided.\",\n },\n comment: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"The decider's comment. Required on deny, optional on approve (enforced by use cases).\",\n },\n },\n },\n },\n dneAmount: {\n type: [\"integer\", \"null\"],\n minimum: 0,\n description:\n \"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.\",\n },\n stages: {\n type: \"array\",\n description:\n \"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.\",\n items: {\n type: \"string\",\n enum: [\n \"awaitingClientApproval\",\n \"awaitingClientResponse\",\n \"awaitingVendorQuote\",\n \"vendorScheduled\",\n \"confirmCosts\",\n \"resolveReady\",\n ],\n },\n },\n approvalState: {\n type: \"string\",\n enum: [\"clear\", \"awaitingApproval\", \"denied\"],\n default: \"clear\",\n description:\n \"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.\",\n },\n awaitingResponse: {\n type: [\"object\", \"null\"],\n default: null,\n additionalProperties: false,\n required: [\"author\", \"awaiting\", \"since\"],\n description:\n \"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.\",\n properties: {\n author: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description: \"Who set the marker.\",\n properties: {\n id: { type: \"string\" },\n discriminator: {\n type: \"string\",\n enum: [\"user\", \"vendor\", \"system\"],\n },\n name: { type: \"string\" },\n },\n },\n awaiting: {\n type: [\"object\", \"null\"],\n additionalProperties: false,\n required: [\"id\", \"discriminator\", \"name\"],\n description:\n \"The person the ticket is waiting on. Null when the wait is on anyone outside Kohost's side rather than one named person.\",\n properties: {\n id: { type: \"string\" },\n discriminator: { type: \"string\", enum: [\"user\"] },\n name: { type: \"string\" },\n },\n },\n since: {\n $ref: \"definitions.json#/definitions/date\",\n description: \"When the marker was set.\",\n },\n messageId: {\n type: [\"string\", \"null\"],\n default: null,\n description:\n \"Legacy. Earlier releases linked the marker to the message it was sent with; no longer written.\",\n },\n },\n },\n tags: {\n type: \"array\",\n default: [],\n items: {\n type: \"string\",\n },\n },\n rating: {\n type: \"number\",\n minimum: 0,\n maximum: 5,\n },\n ratingComment: {\n type: \"string\",\n },\n scheduleDate: {\n $ref: \"definitions.json#/definitions/date\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n solvedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n lastMessageAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"Server-derived timestamp of the latest conversation message; initialized to createdAt when no message exists. Denormalized to support recency sorting; never set by clients.\",\n },\n closedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n} as const;\n\ntype TicketSchemaBase = FromSchema<\n typeof ticketSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n\n/** A stored cost entry: the full shape, with `price`, `estimate` and `markup`. */\nexport type TicketCostEntry = Extract<\n NonNullable<TicketSchemaBase[\"costs\"]>[number],\n { estimate: unknown }\n>;\n\n/** One scheduled performance of work on a ticket. */\nexport type TicketWorkItem = NonNullable<TicketSchemaBase[\"work\"]>[number];\n\n/** One derived Stage a ticket may carry. The API's `resolveStages` owns the rules. */\nexport type TicketStage = NonNullable<TicketSchemaBase[\"stages\"]>[number];\n\n/** One append-only billing review entry on a stored cost entry. */\nexport type TicketCostBillingReviewEntry = NonNullable<\n TicketCostEntry[\"billingReview\"]\n>[number];\n\n// The runtime `costs.items` schema is a `oneOf` so a `Ticket` model validates\n// both wire shapes a read can return (see the schema comment), which makes the\n// derived element type a `full | redacted` union. A stored ticket, though, only\n// ever holds the full shape — the redacted projection exists solely at the API\n// read seam (`redactTicketCostSplit`, which casts through `unknown`). Model and\n// write-path consumers reason about the stored document, so `costs` is narrowed\n// back to the full entry here; the redacted shape stays a validation-only\n// concern rather than leaking into every `ticket.costs` dereference.\nexport type TicketSchema = Omit<TicketSchemaBase, \"costs\"> & {\n costs?: TicketCostEntry[];\n};\n"],"mappings":";;AAuDA,MAAM,sBAAsB;CAC1B,MAAM;CACN,UAAU;CACV,OAAO,EACL,OAAO;EAAC;GA3CV,MAAM;GACN,sBAAsB;GACtB,UAA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;MACb,MAAM;MACN,MAAM;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACF;MACA,SAAS;MACT,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,aACE;MACF,SAAS;KACX;KACA,QAAQ;MACN,MAAM;MACN,sBAAsB;MACtB,UAAU;OAAC;OAAM;OAAiB;MAAM;MACxC,YAAY;OACV,IAAI;QACF,MAAM;QACN,aAAa;OACf;OACA,eAAe;QACb,MAAM;QACN,MAAM;SAAC;SAAQ;SAAU;QAAQ;QACjC,aAAa;OACf;OACA,MAAM;QACJ,MAAM;QACN,aAAa;OACf;MACF;KACF;KACA,WAAW;MACT,MAAM;MACN,aAAa;KACf;KACA,MAAM;MACJ,MAAM;MACN,aAAa;KACf;KACA,YAAY;MACV,MAAM;MACN,sBAAsB;MACtB,aACE;MACF,YAAY;OACV,SAAS;QACP,MAAM;QACN,UAAU;QACV,aACE;QACF,OAAO,EACL,OAAO;SACL;SACA;SACA;QACF,EACF;OACF;OACA,MAAM;QACJ,MAAM;QACN,aAAa;OACf;OACA,UAAU;QACR,MAAM;QACN,SAAS,CAAC;QACV,OAAO;SACL,MAAM;SACN,sBAAsB;SACtB,UAAU;UACR;UACA;UACA;UACA;UACA;SACF;SACA,YAAY;UACV,IAAI;WACF,MAAM;WACN,aAAa;UACf;UACA,eAAe;WACb,MAAM;WACN,MAAM;YAAC;YAAQ;YAAU;WAAQ;WACjC,aACE;UACJ;UACA,OAAO;WACL,MAAM;WACN,aAAa;UACf;UACA,QAAQ;WACN,MAAM;WACN,aAAa;UACf;UACA,cAAc;WACZ,MAAM;WACN,aAAa;UACf;SACF;QACF;OACF;MACF;KACF;KACA,eAAe;MACb,MAAM;MACN,sBAAsB;MACtB,UAAU,CAAC,QAAQ,IAAI;MACvB,aACE;MACF,YAAY;OACV,MAAM;QACJ,MAAM;QAC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;MACnC;MACA,MAAM,EAAE,MAAM,SAAS;KACzB;IACF;IACA,UAAU;KACR,MAAM,CAAC,UAAU,MAAM;KACvB,sBAAsB;KACtB,UAAU;MAAC;MAAM;MAAiB;KAAM;KACxC,aACE;KACF,YAAY;MACV,IAAI,EAAE,MAAM,SAAS;MACrB,eAAe;OAAE,MAAM;OAAU,MAAM,CAAC,MAAM;MAAE;MAChD,MAAM,EAAE,MAAM,SAAS;KACzB;IACF;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,WAAW;KACT,MAAM,CAAC,UAAU,MAAM;KACvB,SAAS;KACT,aACE;IACJ;GACF;EACF;EACA,MAAM;GACJ,MAAM;GACN,SAAS,CAAC;GACV,OAAO,EACL,MAAM,SACR;EACF;EACA,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,eAAe,EACb,MAAM,SACR;EACA,cAAc,EACZ,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;EACA,UAAU,EACR,MAAM,qCACR;EACA,eAAe;GACb,MAAM;GACN,aACE;EACJ;EACA,UAAU,EACR,MAAM,qCACR;EACA,WAAW,EACT,MAAM,qCACR;CACF;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ClearAwaitingResponseCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
id: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | null;
|
|
6
|
+
headers?: Record<string, string> | null;
|
|
7
|
+
query?: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export interface ClearAwaitingResponseCommandRequestConfig {
|
|
10
|
+
method: "delete";
|
|
11
|
+
url: string;
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
params: Record<string, unknown> | null;
|
|
17
|
+
headers: Record<string, string> | null;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Ends the wait the ticket is carrying.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ClearAwaitingResponseCommand {
|
|
24
|
+
url: string;
|
|
25
|
+
data: {
|
|
26
|
+
id: string;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
} | null;
|
|
29
|
+
query: Record<string, unknown> | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
|
+
config: ClearAwaitingResponseCommandRequestConfig;
|
|
32
|
+
static params: readonly ["id"];
|
|
33
|
+
static url: string;
|
|
34
|
+
static method: "delete";
|
|
35
|
+
constructor(commandConfig: ClearAwaitingResponseCommandConfig, options?: Record<string, unknown>);
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/clearAwaitingResponse.ts
|
|
2
|
+
/**
|
|
3
|
+
* Ends the wait the ticket is carrying.
|
|
4
|
+
*/
|
|
5
|
+
var ClearAwaitingResponseCommand = class ClearAwaitingResponseCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = ["id"];
|
|
12
|
+
static url = "/tickets/:id/awaiting-response";
|
|
13
|
+
static method = "delete";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = ClearAwaitingResponseCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = ClearAwaitingResponseCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: ClearAwaitingResponseCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { ClearAwaitingResponseCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=clearAwaitingResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearAwaitingResponse.js","names":[],"sources":["../../.generated/useCases/clearAwaitingResponse.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface ClearAwaitingResponseCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface ClearAwaitingResponseCommandRequestConfig {\n method: \"delete\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * Ends the wait the ticket is carrying.\n */\nexport class ClearAwaitingResponseCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: ClearAwaitingResponseCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/tickets/:id/awaiting-response\";\n static method = \"delete\" as const;\n\n constructor(commandConfig: ClearAwaitingResponseCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = ClearAwaitingResponseCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = ClearAwaitingResponseCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: ClearAwaitingResponseCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,+BAAb,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,IAAI;CACrB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAmD,UAAmC,CAAC,GAAG;EACpG,MAAM,aAAa,6BAA6B;EAEhD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,6BAA6B;EAE/C,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,6BAA6B;GAChC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface ClearWorkItemVerificationCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
id: string;
|
|
4
|
+
workItemId: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
} | null;
|
|
7
|
+
headers?: Record<string, string> | null;
|
|
8
|
+
query?: Record<string, unknown> | null;
|
|
9
|
+
}
|
|
10
|
+
export interface ClearWorkItemVerificationCommandRequestConfig {
|
|
11
|
+
method: "delete";
|
|
12
|
+
url: string;
|
|
13
|
+
data: {
|
|
14
|
+
id: string;
|
|
15
|
+
workItemId: string;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
} | null;
|
|
18
|
+
params: Record<string, unknown> | null;
|
|
19
|
+
headers: Record<string, string> | null;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Takes the recorded outcome back off a scheduled visit.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ClearWorkItemVerificationCommand {
|
|
26
|
+
url: string;
|
|
27
|
+
data: {
|
|
28
|
+
id: string;
|
|
29
|
+
workItemId: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
} | null;
|
|
32
|
+
query: Record<string, unknown> | null;
|
|
33
|
+
headers: Record<string, string> | null;
|
|
34
|
+
config: ClearWorkItemVerificationCommandRequestConfig;
|
|
35
|
+
static params: readonly ["id", "workItemId"];
|
|
36
|
+
static url: string;
|
|
37
|
+
static method: "delete";
|
|
38
|
+
constructor(commandConfig: ClearWorkItemVerificationCommandConfig, options?: Record<string, unknown>);
|
|
39
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/clearWorkItemVerification.ts
|
|
2
|
+
/**
|
|
3
|
+
* Takes the recorded outcome back off a scheduled visit.
|
|
4
|
+
*/
|
|
5
|
+
var ClearWorkItemVerificationCommand = class ClearWorkItemVerificationCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = ["id", "workItemId"];
|
|
12
|
+
static url = "/tickets/:id/work/:workItemId/verification";
|
|
13
|
+
static method = "delete";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = ClearWorkItemVerificationCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = ClearWorkItemVerificationCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: ClearWorkItemVerificationCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { ClearWorkItemVerificationCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=clearWorkItemVerification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearWorkItemVerification.js","names":[],"sources":["../../.generated/useCases/clearWorkItemVerification.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface ClearWorkItemVerificationCommandConfig {\n data?: { id: string; workItemId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface ClearWorkItemVerificationCommandRequestConfig {\n method: \"delete\";\n url: string;\n data: { id: string; workItemId: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * Takes the recorded outcome back off a scheduled visit.\n */\nexport class ClearWorkItemVerificationCommand {\n url: string;\n data: { id: string; workItemId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: ClearWorkItemVerificationCommandRequestConfig;\n\n static params = [\"id\",\"workItemId\"] as const;\n static url = \"/tickets/:id/work/:workItemId/verification\";\n static method = \"delete\" as const;\n\n constructor(commandConfig: ClearWorkItemVerificationCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = ClearWorkItemVerificationCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = ClearWorkItemVerificationCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: ClearWorkItemVerificationCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,mCAAb,MAAa,iCAAiC;CAC5C;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,MAAK,YAAY;CAClC,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAuD,UAAmC,CAAC,GAAG;EACxG,MAAM,aAAa,iCAAiC;EAEpD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,iCAAiC;EAEnD,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,iCAAiC;GACpC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface DescribeConciergeBillsSummaryCommandConfig {
|
|
2
|
+
data?: Record<string, unknown> | unknown[] | null;
|
|
3
|
+
headers?: Record<string, string> | null;
|
|
4
|
+
query?: Record<string, unknown> | null;
|
|
5
|
+
}
|
|
6
|
+
export interface DescribeConciergeBillsSummaryCommandRequestConfig {
|
|
7
|
+
method: "get";
|
|
8
|
+
url: string;
|
|
9
|
+
data: Record<string, unknown> | unknown[] | null;
|
|
10
|
+
params: Record<string, unknown> | null;
|
|
11
|
+
headers: Record<string, string> | null;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Revenue, vendor cost, profit and margin billed through OneBill over a sentAt window, across the KFC-enabled organizations or one of them.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DescribeConciergeBillsSummaryCommand {
|
|
18
|
+
url: string;
|
|
19
|
+
data: Record<string, unknown> | unknown[] | null;
|
|
20
|
+
query: Record<string, unknown> | null;
|
|
21
|
+
headers: Record<string, string> | null;
|
|
22
|
+
config: DescribeConciergeBillsSummaryCommandRequestConfig;
|
|
23
|
+
static params: readonly [];
|
|
24
|
+
static url: string;
|
|
25
|
+
static method: "get";
|
|
26
|
+
constructor(commandConfig: DescribeConciergeBillsSummaryCommandConfig, options?: Record<string, unknown>);
|
|
27
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/describeConciergeBillsSummary.ts
|
|
2
|
+
/**
|
|
3
|
+
* Revenue, vendor cost, profit and margin billed through OneBill over a sentAt window, across the KFC-enabled organizations or one of them.
|
|
4
|
+
*/
|
|
5
|
+
var DescribeConciergeBillsSummaryCommand = class DescribeConciergeBillsSummaryCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = [];
|
|
12
|
+
static url = "/concierge/bills/summary";
|
|
13
|
+
static method = "get";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = DescribeConciergeBillsSummaryCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = DescribeConciergeBillsSummaryCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: DescribeConciergeBillsSummaryCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { DescribeConciergeBillsSummaryCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=describeConciergeBillsSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeConciergeBillsSummary.js","names":[],"sources":["../../.generated/useCases/describeConciergeBillsSummary.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface DescribeConciergeBillsSummaryCommandConfig {\n data?: Record<string, unknown> | unknown[] | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface DescribeConciergeBillsSummaryCommandRequestConfig {\n method: \"get\";\n url: string;\n data: Record<string, unknown> | unknown[] | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * Revenue, vendor cost, profit and margin billed through OneBill over a sentAt window, across the KFC-enabled organizations or one of them.\n */\nexport class DescribeConciergeBillsSummaryCommand {\n url: string;\n data: Record<string, unknown> | unknown[] | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: DescribeConciergeBillsSummaryCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/concierge/bills/summary\";\n static method = \"get\" as const;\n\n constructor(commandConfig: DescribeConciergeBillsSummaryCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = DescribeConciergeBillsSummaryCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = DescribeConciergeBillsSummaryCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: DescribeConciergeBillsSummaryCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,uCAAb,MAAa,qCAAqC;CAChD;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC;CACjB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAA2D,UAAmC,CAAC,GAAG;EAC5G,MAAM,aAAa,qCAAqC;EAExD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,qCAAqC;EAEvD,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,qCAAqC;GACxC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface DescribeConciergeStageCountsCommandConfig {
|
|
2
|
+
data?: Record<string, unknown> | unknown[] | null;
|
|
3
|
+
headers?: Record<string, string> | null;
|
|
4
|
+
query?: Record<string, unknown> | null;
|
|
5
|
+
}
|
|
6
|
+
export interface DescribeConciergeStageCountsCommandRequestConfig {
|
|
7
|
+
method: "get";
|
|
8
|
+
url: string;
|
|
9
|
+
data: Record<string, unknown> | unknown[] | null;
|
|
10
|
+
params: Record<string, unknown> | null;
|
|
11
|
+
headers: Record<string, string> | null;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Live KFC ticket counts per Stage, plus the action-needed bucket, with the longest wait in each.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DescribeConciergeStageCountsCommand {
|
|
18
|
+
url: string;
|
|
19
|
+
data: Record<string, unknown> | unknown[] | null;
|
|
20
|
+
query: Record<string, unknown> | null;
|
|
21
|
+
headers: Record<string, string> | null;
|
|
22
|
+
config: DescribeConciergeStageCountsCommandRequestConfig;
|
|
23
|
+
static params: readonly [];
|
|
24
|
+
static url: string;
|
|
25
|
+
static method: "get";
|
|
26
|
+
constructor(commandConfig: DescribeConciergeStageCountsCommandConfig, options?: Record<string, unknown>);
|
|
27
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/describeConciergeStageCounts.ts
|
|
2
|
+
/**
|
|
3
|
+
* Live KFC ticket counts per Stage, plus the action-needed bucket, with the longest wait in each.
|
|
4
|
+
*/
|
|
5
|
+
var DescribeConciergeStageCountsCommand = class DescribeConciergeStageCountsCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = [];
|
|
12
|
+
static url = "/concierge/tickets/stage-counts";
|
|
13
|
+
static method = "get";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = DescribeConciergeStageCountsCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = DescribeConciergeStageCountsCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: DescribeConciergeStageCountsCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { DescribeConciergeStageCountsCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=describeConciergeStageCounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeConciergeStageCounts.js","names":[],"sources":["../../.generated/useCases/describeConciergeStageCounts.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface DescribeConciergeStageCountsCommandConfig {\n data?: Record<string, unknown> | unknown[] | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface DescribeConciergeStageCountsCommandRequestConfig {\n method: \"get\";\n url: string;\n data: Record<string, unknown> | unknown[] | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * Live KFC ticket counts per Stage, plus the action-needed bucket, with the longest wait in each.\n */\nexport class DescribeConciergeStageCountsCommand {\n url: string;\n data: Record<string, unknown> | unknown[] | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: DescribeConciergeStageCountsCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/concierge/tickets/stage-counts\";\n static method = \"get\" as const;\n\n constructor(commandConfig: DescribeConciergeStageCountsCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = DescribeConciergeStageCountsCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = DescribeConciergeStageCountsCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: DescribeConciergeStageCountsCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,sCAAb,MAAa,oCAAoC;CAC/C;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC;CACjB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAA0D,UAAmC,CAAC,GAAG;EAC3G,MAAM,aAAa,oCAAoC;EAEvD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,oCAAoC;EAEtD,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,oCAAoC;GACvC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
package/dist/useCases/index.d.ts
CHANGED
|
@@ -100,7 +100,10 @@ export { DescribeConciergeStatsFiltersCommand } from "./describeConciergeStatsFi
|
|
|
100
100
|
export { DescribeConciergeStatsTicketsCommand } from "./describeConciergeStatsTickets.js";
|
|
101
101
|
export { DescribeConciergeStatsHeatmapCommand } from "./describeConciergeStatsHeatmap.js";
|
|
102
102
|
export { ListConciergeWorkspaceBillsCommand } from "./listConciergeWorkspaceBills.js";
|
|
103
|
+
export { ListConciergeWorkspaceBillLinesCommand } from "./listConciergeWorkspaceBillLines.js";
|
|
104
|
+
export { DescribeConciergeBillsSummaryCommand } from "./describeConciergeBillsSummary.js";
|
|
103
105
|
export { ListConciergeWorkspaceTicketsCommand } from "./listConciergeWorkspaceTickets.js";
|
|
106
|
+
export { DescribeConciergeStageCountsCommand } from "./describeConciergeStageCounts.js";
|
|
104
107
|
export { DescribeConciergeWorkspaceFiltersCommand } from "./describeConciergeWorkspaceFilters.js";
|
|
105
108
|
export { ListConciergeUninvoicedCostsCommand } from "./listConciergeUninvoicedCosts.js";
|
|
106
109
|
export { ListPropertiesCommand } from "./listProperties.js";
|
|
@@ -202,7 +205,11 @@ export { ScheduleWorkItemCommand } from "./scheduleWorkItem.js";
|
|
|
202
205
|
export { RescheduleWorkItemCommand } from "./rescheduleWorkItem.js";
|
|
203
206
|
export { CancelWorkItemCommand } from "./cancelWorkItem.js";
|
|
204
207
|
export { SetWorkItemNoChargeCommand } from "./setWorkItemNoCharge.js";
|
|
208
|
+
export { SetAwaitingResponseCommand } from "./setAwaitingResponse.js";
|
|
209
|
+
export { ClearAwaitingResponseCommand } from "./clearAwaitingResponse.js";
|
|
205
210
|
export { ClearWorkItemNoChargeCommand } from "./clearWorkItemNoCharge.js";
|
|
211
|
+
export { VerifyWorkItemCommand } from "./verifyWorkItem.js";
|
|
212
|
+
export { ClearWorkItemVerificationCommand } from "./clearWorkItemVerification.js";
|
|
206
213
|
export { RecordCostEntryCommand } from "./recordCostEntry.js";
|
|
207
214
|
export { EditCostEntryCommand } from "./editCostEntry.js";
|
|
208
215
|
export { RecordCostActualCommand } from "./recordCostActual.js";
|