@vinaverse/server 0.1.0-alpha.21 → 0.1.0-alpha.22
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/README.md +6 -4
- package/dist/api.cjs +42 -0
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +41 -1
- package/dist/api.d.ts +41 -1
- package/dist/api.js +42 -0
- package/dist/api.js.map +1 -1
- package/dist/express.d.cts +2 -2
- package/dist/express.d.ts +2 -2
- package/dist/fastify.d.cts +2 -2
- package/dist/fastify.d.ts +2 -2
- package/dist/hono.d.cts +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/lambda.d.cts +2 -2
- package/dist/lambda.d.ts +2 -2
- package/dist/{provider-1SsRbyN-.d.ts → provider-DsFlhWPu.d.ts} +92 -2
- package/dist/{provider-DhsUFcqq.d.cts → provider-PSwJ554B.d.cts} +92 -2
- package/dist/{vinaverse-v1.d-D-NPpZqW.d.cts → vinaverse-v1.d-C3ZVGBVA.d.cts} +469 -22
- package/dist/{vinaverse-v1.d-D-NPpZqW.d.ts → vinaverse-v1.d-C3ZVGBVA.d.ts} +469 -22
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as components$1, w as webhooks } from './vinaverse-v1.d-
|
|
1
|
+
import { c as components$1, w as webhooks } from './vinaverse-v1.d-C3ZVGBVA.js';
|
|
2
2
|
import { c as NonceStore, a as IdempotencyStore } from './nonces-scwljZwl.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -403,6 +403,23 @@ declare const TOOL_OPERATIONS: {
|
|
|
403
403
|
};
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
|
+
readonly read_proposal: {
|
|
407
|
+
readonly id: "read_proposal";
|
|
408
|
+
readonly method: "GET";
|
|
409
|
+
readonly path: "/proposals/{id}";
|
|
410
|
+
readonly effect: "read";
|
|
411
|
+
readonly maxResultBytes: 16384;
|
|
412
|
+
readonly successStatus: 200;
|
|
413
|
+
readonly idempotencyKey: false;
|
|
414
|
+
readonly body: false;
|
|
415
|
+
readonly pathParams: {
|
|
416
|
+
readonly id: {
|
|
417
|
+
readonly type: "string";
|
|
418
|
+
readonly required: true;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly queryParams: {};
|
|
422
|
+
};
|
|
406
423
|
readonly resolve_place: {
|
|
407
424
|
readonly id: "resolve_place";
|
|
408
425
|
readonly method: "GET";
|
|
@@ -807,7 +824,14 @@ interface components {
|
|
|
807
824
|
expires_at: string;
|
|
808
825
|
/** @description A link into the tenant's app, to edit the change there. It must start with a prefix registered for the environment and pass the link checks (`admin-v1.yaml`, `Connector.deep_link_prefixes`). The runtime removes one that fails, and the proposal is still shown. */
|
|
809
826
|
edit_deep_link?: string;
|
|
810
|
-
|
|
827
|
+
/** @description v1-draft.18, only once the proposal is `confirmed`: what the tenant saved, as its own setup read says it. Absent before it is applied. The agent says what was saved from it, never what it proposed. */
|
|
828
|
+
applied?: {
|
|
829
|
+
/** @description the setup step it belongs to */
|
|
830
|
+
step?: string;
|
|
831
|
+
/** @description one line per field saved, in the tenant's words; never a bank or card detail, a document number or a balance, since the agent repeats them to the person */
|
|
832
|
+
summary: string[];
|
|
833
|
+
};
|
|
834
|
+
} & (unknown & unknown & unknown & unknown & unknown);
|
|
811
835
|
/** @description The fields of a booking proposal (topic `booking`, `booking_reschedule` or `booking_cancellation`), whose keys are fixed so every app draws a booking card the same way (`docs/agents-guardrails-suggestions-writes.md` §3.4): `service`, `professional`, `space`, `booking`, `location`, `note` and `reason` are `text`, `services` is a `list`, `time` is a `time_range`, `place` an `address`, and `price`, `deposit`, `fee`, `cancellation_fee` and `refund` are `money_cents`. */
|
|
812
836
|
BookingFields: (unknown & unknown & unknown & unknown & unknown)[];
|
|
813
837
|
/** @description `before` is the current value, absent or null when the proposal creates it, and equal to `after` when the field does not change but says what the change is about (the booking a reschedule moves); `before` and `after` take the shape `type` names. */
|
|
@@ -883,9 +907,34 @@ interface components {
|
|
|
883
907
|
reason?: string;
|
|
884
908
|
/** @description the action's words on its `next_step` card */
|
|
885
909
|
label?: string;
|
|
910
|
+
/** @description v1-draft.17: whether the step is needed before the business can go live. `false` for a recommended step (payouts), which never stops it; left out, the step counts as required. */
|
|
911
|
+
required?: boolean;
|
|
886
912
|
/** @description For a step finished on the tenant's own screen, a link into the tenant's app. It must start with a prefix registered for the environment and pass the link checks (`admin-v1.yaml`, `Connector.deep_link_prefixes`). The runtime removes one that fails, and the step is then shown without a card. */
|
|
887
913
|
deep_link?: string;
|
|
888
914
|
} & unknown;
|
|
915
|
+
/** @description v1-draft.17: the state of the business's own payout account, read under the `payouts` capability (a professional, host or staff subject; the tenant answers for the business of the session's delegated token). Never a bank or card detail, a balance, or a payout amount other than what waits to be paid out. */
|
|
916
|
+
PayoutAccount: {
|
|
917
|
+
/**
|
|
918
|
+
* @description `not_started`: nothing connected yet; `onboarding`: setup begun and not finished; `pending_verification`: the payment provider is reviewing the details; `action_required`: the business must give something more (`missing`); `active`: payouts are sent; `restricted`: payouts are paused by the provider; `rejected`: the account was refused.
|
|
919
|
+
* @enum {string}
|
|
920
|
+
*/
|
|
921
|
+
state: "not_started" | "onboarding" | "pending_verification" | "action_required" | "active" | "restricted" | "rejected";
|
|
922
|
+
/** @description whether the business must act before payouts can be sent */
|
|
923
|
+
action_required?: boolean;
|
|
924
|
+
/** @description the codes of the requirements still missing, never the values given for them */
|
|
925
|
+
missing?: string[];
|
|
926
|
+
/** @description how fresh the state is, as the tenant names it; `refresh_failed` means the last state known */
|
|
927
|
+
sync_state?: string;
|
|
928
|
+
/** @description the tenant's payout screen, under a registered prefix (`admin-v1.yaml`, `Connector.deep_link_prefixes`) */
|
|
929
|
+
deep_link?: string;
|
|
930
|
+
/** @description what the business has earned from bookings that waits to be paid out, left out when nothing waits. The tenant returns it only to a subject its own rules let see the business's money (the owner; a staff member only when the tenant allows it), and leaves it out for anyone else; the state stays readable to all */
|
|
931
|
+
waiting_earnings?: components["schemas"]["Money"];
|
|
932
|
+
/**
|
|
933
|
+
* Format: date-time
|
|
934
|
+
* @description since when the oldest of it waits
|
|
935
|
+
*/
|
|
936
|
+
waiting_since?: string;
|
|
937
|
+
};
|
|
889
938
|
/** @description One of the signed-in customer's kits: items a styling-kit retailer sends to try at home, each kept or returned, the kept ones charged. `status` is where the kit is in its life: `preparing` (being put together), `shipped` (on its way), `delivered` (arrived, deciding not open yet), `feedback_open` (the customer decides keep or return for each item, until `feedback_closes_at`), `feedback_closed` (the decisions are in; the items to return are due back by `return_by`), `returned` (the returned items arrived), `billed` (the kept items were charged: `order_id`), `cancelled`. A retailer whose kits skip a state (feedback opens on delivery) never sends it. "What do I still need to do" is answered by `undecided_count` and each item's `decision` before `feedback_closes_at`, and by the items to return and `return_by` after it. */
|
|
890
939
|
Kit: {
|
|
891
940
|
/** @constant */
|
|
@@ -1513,6 +1562,19 @@ interface operations {
|
|
|
1513
1562
|
/** Format: date-time */
|
|
1514
1563
|
end: string;
|
|
1515
1564
|
}[];
|
|
1565
|
+
/** @description v1-draft.19, the service the times are for */
|
|
1566
|
+
service_name?: string;
|
|
1567
|
+
/** @description v1-draft.19, that service's length */
|
|
1568
|
+
duration_minutes?: number;
|
|
1569
|
+
/** @description v1-draft.19, true when no service was asked and the tenant took the professional's shortest */
|
|
1570
|
+
service_assumed?: boolean;
|
|
1571
|
+
/** @description v1-draft.19, only when `slots` is empty: the first open time the tenant found after the window (it may look up to 60 days ahead); absent when it found none */
|
|
1572
|
+
next_available?: {
|
|
1573
|
+
/** Format: date */
|
|
1574
|
+
date: string;
|
|
1575
|
+
/** Format: date-time */
|
|
1576
|
+
start?: string;
|
|
1577
|
+
};
|
|
1516
1578
|
};
|
|
1517
1579
|
};
|
|
1518
1580
|
};
|
|
@@ -1908,6 +1970,34 @@ interface operations {
|
|
|
1908
1970
|
default: components["responses"]["Problem"];
|
|
1909
1971
|
};
|
|
1910
1972
|
};
|
|
1973
|
+
read_proposal: {
|
|
1974
|
+
parameters: {
|
|
1975
|
+
query?: never;
|
|
1976
|
+
header?: {
|
|
1977
|
+
/** @description on every tool call in a session, a channel session's included (never on the catalogue sweep), the session's id; informational and not signed */
|
|
1978
|
+
"Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
|
|
1979
|
+
/** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
|
|
1980
|
+
"Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
|
|
1981
|
+
};
|
|
1982
|
+
path: {
|
|
1983
|
+
id: string;
|
|
1984
|
+
};
|
|
1985
|
+
cookie?: never;
|
|
1986
|
+
};
|
|
1987
|
+
requestBody?: never;
|
|
1988
|
+
responses: {
|
|
1989
|
+
/** @description OK */
|
|
1990
|
+
200: {
|
|
1991
|
+
headers: {
|
|
1992
|
+
[name: string]: unknown;
|
|
1993
|
+
};
|
|
1994
|
+
content: {
|
|
1995
|
+
"application/json": components["schemas"]["Proposal"];
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
default: components["responses"]["Problem"];
|
|
1999
|
+
};
|
|
2000
|
+
};
|
|
1911
2001
|
get_flow_definition: {
|
|
1912
2002
|
parameters: {
|
|
1913
2003
|
query?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as components$1, w as webhooks } from './vinaverse-v1.d-
|
|
1
|
+
import { c as components$1, w as webhooks } from './vinaverse-v1.d-C3ZVGBVA.cjs';
|
|
2
2
|
import { c as NonceStore, a as IdempotencyStore } from './nonces-scwljZwl.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -403,6 +403,23 @@ declare const TOOL_OPERATIONS: {
|
|
|
403
403
|
};
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
|
+
readonly read_proposal: {
|
|
407
|
+
readonly id: "read_proposal";
|
|
408
|
+
readonly method: "GET";
|
|
409
|
+
readonly path: "/proposals/{id}";
|
|
410
|
+
readonly effect: "read";
|
|
411
|
+
readonly maxResultBytes: 16384;
|
|
412
|
+
readonly successStatus: 200;
|
|
413
|
+
readonly idempotencyKey: false;
|
|
414
|
+
readonly body: false;
|
|
415
|
+
readonly pathParams: {
|
|
416
|
+
readonly id: {
|
|
417
|
+
readonly type: "string";
|
|
418
|
+
readonly required: true;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly queryParams: {};
|
|
422
|
+
};
|
|
406
423
|
readonly resolve_place: {
|
|
407
424
|
readonly id: "resolve_place";
|
|
408
425
|
readonly method: "GET";
|
|
@@ -807,7 +824,14 @@ interface components {
|
|
|
807
824
|
expires_at: string;
|
|
808
825
|
/** @description A link into the tenant's app, to edit the change there. It must start with a prefix registered for the environment and pass the link checks (`admin-v1.yaml`, `Connector.deep_link_prefixes`). The runtime removes one that fails, and the proposal is still shown. */
|
|
809
826
|
edit_deep_link?: string;
|
|
810
|
-
|
|
827
|
+
/** @description v1-draft.18, only once the proposal is `confirmed`: what the tenant saved, as its own setup read says it. Absent before it is applied. The agent says what was saved from it, never what it proposed. */
|
|
828
|
+
applied?: {
|
|
829
|
+
/** @description the setup step it belongs to */
|
|
830
|
+
step?: string;
|
|
831
|
+
/** @description one line per field saved, in the tenant's words; never a bank or card detail, a document number or a balance, since the agent repeats them to the person */
|
|
832
|
+
summary: string[];
|
|
833
|
+
};
|
|
834
|
+
} & (unknown & unknown & unknown & unknown & unknown);
|
|
811
835
|
/** @description The fields of a booking proposal (topic `booking`, `booking_reschedule` or `booking_cancellation`), whose keys are fixed so every app draws a booking card the same way (`docs/agents-guardrails-suggestions-writes.md` §3.4): `service`, `professional`, `space`, `booking`, `location`, `note` and `reason` are `text`, `services` is a `list`, `time` is a `time_range`, `place` an `address`, and `price`, `deposit`, `fee`, `cancellation_fee` and `refund` are `money_cents`. */
|
|
812
836
|
BookingFields: (unknown & unknown & unknown & unknown & unknown)[];
|
|
813
837
|
/** @description `before` is the current value, absent or null when the proposal creates it, and equal to `after` when the field does not change but says what the change is about (the booking a reschedule moves); `before` and `after` take the shape `type` names. */
|
|
@@ -883,9 +907,34 @@ interface components {
|
|
|
883
907
|
reason?: string;
|
|
884
908
|
/** @description the action's words on its `next_step` card */
|
|
885
909
|
label?: string;
|
|
910
|
+
/** @description v1-draft.17: whether the step is needed before the business can go live. `false` for a recommended step (payouts), which never stops it; left out, the step counts as required. */
|
|
911
|
+
required?: boolean;
|
|
886
912
|
/** @description For a step finished on the tenant's own screen, a link into the tenant's app. It must start with a prefix registered for the environment and pass the link checks (`admin-v1.yaml`, `Connector.deep_link_prefixes`). The runtime removes one that fails, and the step is then shown without a card. */
|
|
887
913
|
deep_link?: string;
|
|
888
914
|
} & unknown;
|
|
915
|
+
/** @description v1-draft.17: the state of the business's own payout account, read under the `payouts` capability (a professional, host or staff subject; the tenant answers for the business of the session's delegated token). Never a bank or card detail, a balance, or a payout amount other than what waits to be paid out. */
|
|
916
|
+
PayoutAccount: {
|
|
917
|
+
/**
|
|
918
|
+
* @description `not_started`: nothing connected yet; `onboarding`: setup begun and not finished; `pending_verification`: the payment provider is reviewing the details; `action_required`: the business must give something more (`missing`); `active`: payouts are sent; `restricted`: payouts are paused by the provider; `rejected`: the account was refused.
|
|
919
|
+
* @enum {string}
|
|
920
|
+
*/
|
|
921
|
+
state: "not_started" | "onboarding" | "pending_verification" | "action_required" | "active" | "restricted" | "rejected";
|
|
922
|
+
/** @description whether the business must act before payouts can be sent */
|
|
923
|
+
action_required?: boolean;
|
|
924
|
+
/** @description the codes of the requirements still missing, never the values given for them */
|
|
925
|
+
missing?: string[];
|
|
926
|
+
/** @description how fresh the state is, as the tenant names it; `refresh_failed` means the last state known */
|
|
927
|
+
sync_state?: string;
|
|
928
|
+
/** @description the tenant's payout screen, under a registered prefix (`admin-v1.yaml`, `Connector.deep_link_prefixes`) */
|
|
929
|
+
deep_link?: string;
|
|
930
|
+
/** @description what the business has earned from bookings that waits to be paid out, left out when nothing waits. The tenant returns it only to a subject its own rules let see the business's money (the owner; a staff member only when the tenant allows it), and leaves it out for anyone else; the state stays readable to all */
|
|
931
|
+
waiting_earnings?: components["schemas"]["Money"];
|
|
932
|
+
/**
|
|
933
|
+
* Format: date-time
|
|
934
|
+
* @description since when the oldest of it waits
|
|
935
|
+
*/
|
|
936
|
+
waiting_since?: string;
|
|
937
|
+
};
|
|
889
938
|
/** @description One of the signed-in customer's kits: items a styling-kit retailer sends to try at home, each kept or returned, the kept ones charged. `status` is where the kit is in its life: `preparing` (being put together), `shipped` (on its way), `delivered` (arrived, deciding not open yet), `feedback_open` (the customer decides keep or return for each item, until `feedback_closes_at`), `feedback_closed` (the decisions are in; the items to return are due back by `return_by`), `returned` (the returned items arrived), `billed` (the kept items were charged: `order_id`), `cancelled`. A retailer whose kits skip a state (feedback opens on delivery) never sends it. "What do I still need to do" is answered by `undecided_count` and each item's `decision` before `feedback_closes_at`, and by the items to return and `return_by` after it. */
|
|
890
939
|
Kit: {
|
|
891
940
|
/** @constant */
|
|
@@ -1513,6 +1562,19 @@ interface operations {
|
|
|
1513
1562
|
/** Format: date-time */
|
|
1514
1563
|
end: string;
|
|
1515
1564
|
}[];
|
|
1565
|
+
/** @description v1-draft.19, the service the times are for */
|
|
1566
|
+
service_name?: string;
|
|
1567
|
+
/** @description v1-draft.19, that service's length */
|
|
1568
|
+
duration_minutes?: number;
|
|
1569
|
+
/** @description v1-draft.19, true when no service was asked and the tenant took the professional's shortest */
|
|
1570
|
+
service_assumed?: boolean;
|
|
1571
|
+
/** @description v1-draft.19, only when `slots` is empty: the first open time the tenant found after the window (it may look up to 60 days ahead); absent when it found none */
|
|
1572
|
+
next_available?: {
|
|
1573
|
+
/** Format: date */
|
|
1574
|
+
date: string;
|
|
1575
|
+
/** Format: date-time */
|
|
1576
|
+
start?: string;
|
|
1577
|
+
};
|
|
1516
1578
|
};
|
|
1517
1579
|
};
|
|
1518
1580
|
};
|
|
@@ -1908,6 +1970,34 @@ interface operations {
|
|
|
1908
1970
|
default: components["responses"]["Problem"];
|
|
1909
1971
|
};
|
|
1910
1972
|
};
|
|
1973
|
+
read_proposal: {
|
|
1974
|
+
parameters: {
|
|
1975
|
+
query?: never;
|
|
1976
|
+
header?: {
|
|
1977
|
+
/** @description on every tool call in a session, a channel session's included (never on the catalogue sweep), the session's id; informational and not signed */
|
|
1978
|
+
"Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
|
|
1979
|
+
/** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
|
|
1980
|
+
"Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
|
|
1981
|
+
};
|
|
1982
|
+
path: {
|
|
1983
|
+
id: string;
|
|
1984
|
+
};
|
|
1985
|
+
cookie?: never;
|
|
1986
|
+
};
|
|
1987
|
+
requestBody?: never;
|
|
1988
|
+
responses: {
|
|
1989
|
+
/** @description OK */
|
|
1990
|
+
200: {
|
|
1991
|
+
headers: {
|
|
1992
|
+
[name: string]: unknown;
|
|
1993
|
+
};
|
|
1994
|
+
content: {
|
|
1995
|
+
"application/json": components["schemas"]["Proposal"];
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
default: components["responses"]["Problem"];
|
|
1999
|
+
};
|
|
2000
|
+
};
|
|
1911
2001
|
get_flow_definition: {
|
|
1912
2002
|
parameters: {
|
|
1913
2003
|
query?: {
|