@vinaverse/server 0.1.0-alpha.1 → 0.1.0-alpha.11

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.
@@ -1,4 +1,4 @@
1
- import { c as components$1, w as webhooks } from './vinaverse-v1.d-BVc4uyUd.cjs';
1
+ import { c as components$1, w as webhooks } from './vinaverse-v1.d-DiulmRgx.cjs';
2
2
  import { c as NonceStore, a as IdempotencyStore } from './nonces-scwljZwl.cjs';
3
3
 
4
4
  /**
@@ -265,6 +265,18 @@ declare const TOOL_OPERATIONS: {
265
265
  readonly pathParams: {};
266
266
  readonly queryParams: {};
267
267
  };
268
+ readonly get_setup_state: {
269
+ readonly id: "get_setup_state";
270
+ readonly method: "GET";
271
+ readonly path: "/business/setup";
272
+ readonly effect: "read";
273
+ readonly maxResultBytes: 16384;
274
+ readonly successStatus: 200;
275
+ readonly idempotencyKey: false;
276
+ readonly body: false;
277
+ readonly pathParams: {};
278
+ readonly queryParams: {};
279
+ };
268
280
  readonly get_workspace: {
269
281
  readonly id: "get_workspace";
270
282
  readonly method: "GET";
@@ -366,6 +378,31 @@ declare const TOOL_OPERATIONS: {
366
378
  };
367
379
  };
368
380
  };
381
+ readonly list_services_in_area: {
382
+ readonly id: "list_services_in_area";
383
+ readonly method: "GET";
384
+ readonly path: "/areas/services";
385
+ readonly effect: "read";
386
+ readonly maxResultBytes: 16384;
387
+ readonly successStatus: 200;
388
+ readonly idempotencyKey: false;
389
+ readonly body: false;
390
+ readonly pathParams: {};
391
+ readonly queryParams: {
392
+ readonly lat: {
393
+ readonly type: "number";
394
+ readonly required: false;
395
+ };
396
+ readonly lng: {
397
+ readonly type: "number";
398
+ readonly required: false;
399
+ };
400
+ readonly radius_miles: {
401
+ readonly type: "integer";
402
+ readonly required: false;
403
+ };
404
+ };
405
+ };
369
406
  readonly resolve_place: {
370
407
  readonly id: "resolve_place";
371
408
  readonly method: "GET";
@@ -578,6 +615,55 @@ interface components {
578
615
  price_is_from?: boolean;
579
616
  duration_minutes: number;
580
617
  };
618
+ /**
619
+ * @description `estimate`: the tenant did not count exactly (a cached or sampled figure); the agent says "about"
620
+ * @enum {string}
621
+ */
622
+ CountStatus: "exact" | "estimate";
623
+ InventoryService: {
624
+ id: string;
625
+ name: string;
626
+ count: number;
627
+ count_status: components["schemas"]["CountStatus"];
628
+ };
629
+ InventoryCategory: {
630
+ id: string;
631
+ name: string;
632
+ count: number;
633
+ count_status: components["schemas"]["CountStatus"];
634
+ services?: components["schemas"]["InventoryService"][];
635
+ };
636
+ NearbyArea: {
637
+ area: components["schemas"]["Area"];
638
+ lat?: number;
639
+ lng?: number;
640
+ count: number;
641
+ count_status: components["schemas"]["CountStatus"];
642
+ };
643
+ /** @description v1-draft.15, `list_services_in_area`'s result: what is represented around the place, and where else there is supply. Empty `categories` means nothing is offered within the radius; `nearest_areas` then says where there is. */
644
+ AreaInventory: {
645
+ /** @constant */
646
+ type: "area_inventory";
647
+ /**
648
+ * Format: date-time
649
+ * @description when the tenant counted
650
+ */
651
+ as_of: string;
652
+ categories: components["schemas"]["InventoryCategory"][];
653
+ /** @description the nearest areas outside the radius that have supply, nearest first */
654
+ nearest_areas: components["schemas"]["NearbyArea"][];
655
+ };
656
+ /** @description v1-draft.15: one approved photo. `id` and `version` name the asset as the tenant's media store does: a new version is a new photo, and approval binds to the version, never to a mutable URL. The URL is https and starts with a prefix the manifest registers (`image_url_prefixes`), compared after the runtime parses and normalizes it: a URL with user info, a backslash, a fragment, or a `.` or `..` path segment (also percent-encoded, as `%2e`) is dropped, never resolved, so no path can step outside the approved one. `expires_at` is set only when the URL expires (a signed URL), and then the runtime drops it from a card it records after that time. */
657
+ ImageAsset: {
658
+ id: string;
659
+ version: string;
660
+ /** Format: uri */
661
+ url: string;
662
+ width?: number;
663
+ height?: number;
664
+ /** Format: date-time */
665
+ expires_at?: string;
666
+ };
581
667
  ProfessionalSummary: {
582
668
  /** @constant */
583
669
  type: "professional";
@@ -586,8 +672,12 @@ interface components {
586
672
  headline?: string;
587
673
  /** Format: uri */
588
674
  photo_url?: string;
675
+ /** @description v1-draft.15, approved photos, the first the hero (`photo_url` is its URL) */
676
+ images?: components["schemas"]["ImageAsset"][];
589
677
  rating?: components["schemas"]["Rating"];
590
678
  area?: components["schemas"]["Area"];
679
+ /** @description v1-draft.15: the lowest price the professional asks for a service, as the tenant knows it; left out when it does not */
680
+ price_from?: components["schemas"]["Money"];
591
681
  top_services?: components["schemas"]["ServiceOffer"][];
592
682
  /** Format: date-time */
593
683
  next_available?: string | null;
@@ -609,6 +699,8 @@ interface components {
609
699
  category?: string;
610
700
  /** Format: uri */
611
701
  photo_url?: string;
702
+ /** @description v1-draft.15, approved photos, the first the hero (`photo_url` is its URL) */
703
+ images?: components["schemas"]["ImageAsset"][];
612
704
  rating?: components["schemas"]["Rating"];
613
705
  area?: components["schemas"]["Area"];
614
706
  price_from?: components["schemas"]["Money"];
@@ -760,6 +852,35 @@ interface components {
760
852
  country: string;
761
853
  };
762
854
  TextList: string[];
855
+ /** @description A business's setup steps, in the order the business should do them. The steps and their state are the tenant's own record; a business with nothing left to set up has every step `done`. */
856
+ SetupState: {
857
+ steps: components["schemas"]["SetupStep"][];
858
+ };
859
+ /** @description One step of a business's setup. `title`, `body` and `label` are the tenant's own words for it, shown on the `next_step` card when the step has a `deep_link`. A `blocked` step says why in `reason`. */
860
+ SetupStep: {
861
+ /**
862
+ * @description the tenant's id for the step, stable across reads; the agent names a step by it
863
+ * @example business_name
864
+ * @example opening_hours
865
+ * @example payouts
866
+ */
867
+ id: string;
868
+ /** @description the step, as the person knows it */
869
+ title: string;
870
+ /**
871
+ * @description `not_started` and `in_progress` are still to do, `done` is finished, and `blocked` waits on something the person cannot do in this conversation (a review, another step), named in `reason`.
872
+ * @enum {string}
873
+ */
874
+ status: "not_started" | "in_progress" | "done" | "blocked";
875
+ /** @description what the step is for, in one or two sentences */
876
+ body?: string;
877
+ /** @description why a `blocked` step is blocked; only a `blocked` step has one */
878
+ reason?: string;
879
+ /** @description the action's words on its `next_step` card */
880
+ label?: string;
881
+ /** @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. */
882
+ deep_link?: string;
883
+ } & unknown;
763
884
  /** @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. */
764
885
  Kit: {
765
886
  /** @constant */
@@ -1218,6 +1339,36 @@ interface operations {
1218
1339
  default: components["responses"]["Problem"];
1219
1340
  };
1220
1341
  };
1342
+ list_services_in_area: {
1343
+ parameters: {
1344
+ query?: {
1345
+ lat?: components["parameters"]["Lat"];
1346
+ lng?: components["parameters"]["Lng"];
1347
+ radius_miles?: components["parameters"]["RadiusMiles"];
1348
+ };
1349
+ header?: {
1350
+ /** @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 */
1351
+ "Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
1352
+ /** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
1353
+ "Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
1354
+ };
1355
+ path?: never;
1356
+ cookie?: never;
1357
+ };
1358
+ requestBody?: never;
1359
+ responses: {
1360
+ /** @description OK */
1361
+ 200: {
1362
+ headers: {
1363
+ [name: string]: unknown;
1364
+ };
1365
+ content: {
1366
+ "application/json": components["schemas"]["AreaInventory"];
1367
+ };
1368
+ };
1369
+ default: components["responses"]["Problem"];
1370
+ };
1371
+ };
1221
1372
  search_workspaces: {
1222
1373
  parameters: {
1223
1374
  query?: {
@@ -1605,6 +1756,32 @@ interface operations {
1605
1756
  default: components["responses"]["Problem"];
1606
1757
  };
1607
1758
  };
1759
+ get_setup_state: {
1760
+ parameters: {
1761
+ query?: never;
1762
+ header?: {
1763
+ /** @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 */
1764
+ "Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
1765
+ /** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
1766
+ "Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
1767
+ };
1768
+ path?: never;
1769
+ cookie?: never;
1770
+ };
1771
+ requestBody?: never;
1772
+ responses: {
1773
+ /** @description OK */
1774
+ 200: {
1775
+ headers: {
1776
+ [name: string]: unknown;
1777
+ };
1778
+ content: {
1779
+ "application/json": components["schemas"]["SetupState"];
1780
+ };
1781
+ };
1782
+ default: components["responses"]["Problem"];
1783
+ };
1784
+ };
1608
1785
  create_handoff: {
1609
1786
  parameters: {
1610
1787
  query?: never;
@@ -1,4 +1,4 @@
1
- import { c as components$1, w as webhooks } from './vinaverse-v1.d-BVc4uyUd.js';
1
+ import { c as components$1, w as webhooks } from './vinaverse-v1.d-DiulmRgx.js';
2
2
  import { c as NonceStore, a as IdempotencyStore } from './nonces-scwljZwl.js';
3
3
 
4
4
  /**
@@ -265,6 +265,18 @@ declare const TOOL_OPERATIONS: {
265
265
  readonly pathParams: {};
266
266
  readonly queryParams: {};
267
267
  };
268
+ readonly get_setup_state: {
269
+ readonly id: "get_setup_state";
270
+ readonly method: "GET";
271
+ readonly path: "/business/setup";
272
+ readonly effect: "read";
273
+ readonly maxResultBytes: 16384;
274
+ readonly successStatus: 200;
275
+ readonly idempotencyKey: false;
276
+ readonly body: false;
277
+ readonly pathParams: {};
278
+ readonly queryParams: {};
279
+ };
268
280
  readonly get_workspace: {
269
281
  readonly id: "get_workspace";
270
282
  readonly method: "GET";
@@ -366,6 +378,31 @@ declare const TOOL_OPERATIONS: {
366
378
  };
367
379
  };
368
380
  };
381
+ readonly list_services_in_area: {
382
+ readonly id: "list_services_in_area";
383
+ readonly method: "GET";
384
+ readonly path: "/areas/services";
385
+ readonly effect: "read";
386
+ readonly maxResultBytes: 16384;
387
+ readonly successStatus: 200;
388
+ readonly idempotencyKey: false;
389
+ readonly body: false;
390
+ readonly pathParams: {};
391
+ readonly queryParams: {
392
+ readonly lat: {
393
+ readonly type: "number";
394
+ readonly required: false;
395
+ };
396
+ readonly lng: {
397
+ readonly type: "number";
398
+ readonly required: false;
399
+ };
400
+ readonly radius_miles: {
401
+ readonly type: "integer";
402
+ readonly required: false;
403
+ };
404
+ };
405
+ };
369
406
  readonly resolve_place: {
370
407
  readonly id: "resolve_place";
371
408
  readonly method: "GET";
@@ -578,6 +615,55 @@ interface components {
578
615
  price_is_from?: boolean;
579
616
  duration_minutes: number;
580
617
  };
618
+ /**
619
+ * @description `estimate`: the tenant did not count exactly (a cached or sampled figure); the agent says "about"
620
+ * @enum {string}
621
+ */
622
+ CountStatus: "exact" | "estimate";
623
+ InventoryService: {
624
+ id: string;
625
+ name: string;
626
+ count: number;
627
+ count_status: components["schemas"]["CountStatus"];
628
+ };
629
+ InventoryCategory: {
630
+ id: string;
631
+ name: string;
632
+ count: number;
633
+ count_status: components["schemas"]["CountStatus"];
634
+ services?: components["schemas"]["InventoryService"][];
635
+ };
636
+ NearbyArea: {
637
+ area: components["schemas"]["Area"];
638
+ lat?: number;
639
+ lng?: number;
640
+ count: number;
641
+ count_status: components["schemas"]["CountStatus"];
642
+ };
643
+ /** @description v1-draft.15, `list_services_in_area`'s result: what is represented around the place, and where else there is supply. Empty `categories` means nothing is offered within the radius; `nearest_areas` then says where there is. */
644
+ AreaInventory: {
645
+ /** @constant */
646
+ type: "area_inventory";
647
+ /**
648
+ * Format: date-time
649
+ * @description when the tenant counted
650
+ */
651
+ as_of: string;
652
+ categories: components["schemas"]["InventoryCategory"][];
653
+ /** @description the nearest areas outside the radius that have supply, nearest first */
654
+ nearest_areas: components["schemas"]["NearbyArea"][];
655
+ };
656
+ /** @description v1-draft.15: one approved photo. `id` and `version` name the asset as the tenant's media store does: a new version is a new photo, and approval binds to the version, never to a mutable URL. The URL is https and starts with a prefix the manifest registers (`image_url_prefixes`), compared after the runtime parses and normalizes it: a URL with user info, a backslash, a fragment, or a `.` or `..` path segment (also percent-encoded, as `%2e`) is dropped, never resolved, so no path can step outside the approved one. `expires_at` is set only when the URL expires (a signed URL), and then the runtime drops it from a card it records after that time. */
657
+ ImageAsset: {
658
+ id: string;
659
+ version: string;
660
+ /** Format: uri */
661
+ url: string;
662
+ width?: number;
663
+ height?: number;
664
+ /** Format: date-time */
665
+ expires_at?: string;
666
+ };
581
667
  ProfessionalSummary: {
582
668
  /** @constant */
583
669
  type: "professional";
@@ -586,8 +672,12 @@ interface components {
586
672
  headline?: string;
587
673
  /** Format: uri */
588
674
  photo_url?: string;
675
+ /** @description v1-draft.15, approved photos, the first the hero (`photo_url` is its URL) */
676
+ images?: components["schemas"]["ImageAsset"][];
589
677
  rating?: components["schemas"]["Rating"];
590
678
  area?: components["schemas"]["Area"];
679
+ /** @description v1-draft.15: the lowest price the professional asks for a service, as the tenant knows it; left out when it does not */
680
+ price_from?: components["schemas"]["Money"];
591
681
  top_services?: components["schemas"]["ServiceOffer"][];
592
682
  /** Format: date-time */
593
683
  next_available?: string | null;
@@ -609,6 +699,8 @@ interface components {
609
699
  category?: string;
610
700
  /** Format: uri */
611
701
  photo_url?: string;
702
+ /** @description v1-draft.15, approved photos, the first the hero (`photo_url` is its URL) */
703
+ images?: components["schemas"]["ImageAsset"][];
612
704
  rating?: components["schemas"]["Rating"];
613
705
  area?: components["schemas"]["Area"];
614
706
  price_from?: components["schemas"]["Money"];
@@ -760,6 +852,35 @@ interface components {
760
852
  country: string;
761
853
  };
762
854
  TextList: string[];
855
+ /** @description A business's setup steps, in the order the business should do them. The steps and their state are the tenant's own record; a business with nothing left to set up has every step `done`. */
856
+ SetupState: {
857
+ steps: components["schemas"]["SetupStep"][];
858
+ };
859
+ /** @description One step of a business's setup. `title`, `body` and `label` are the tenant's own words for it, shown on the `next_step` card when the step has a `deep_link`. A `blocked` step says why in `reason`. */
860
+ SetupStep: {
861
+ /**
862
+ * @description the tenant's id for the step, stable across reads; the agent names a step by it
863
+ * @example business_name
864
+ * @example opening_hours
865
+ * @example payouts
866
+ */
867
+ id: string;
868
+ /** @description the step, as the person knows it */
869
+ title: string;
870
+ /**
871
+ * @description `not_started` and `in_progress` are still to do, `done` is finished, and `blocked` waits on something the person cannot do in this conversation (a review, another step), named in `reason`.
872
+ * @enum {string}
873
+ */
874
+ status: "not_started" | "in_progress" | "done" | "blocked";
875
+ /** @description what the step is for, in one or two sentences */
876
+ body?: string;
877
+ /** @description why a `blocked` step is blocked; only a `blocked` step has one */
878
+ reason?: string;
879
+ /** @description the action's words on its `next_step` card */
880
+ label?: string;
881
+ /** @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. */
882
+ deep_link?: string;
883
+ } & unknown;
763
884
  /** @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. */
764
885
  Kit: {
765
886
  /** @constant */
@@ -1218,6 +1339,36 @@ interface operations {
1218
1339
  default: components["responses"]["Problem"];
1219
1340
  };
1220
1341
  };
1342
+ list_services_in_area: {
1343
+ parameters: {
1344
+ query?: {
1345
+ lat?: components["parameters"]["Lat"];
1346
+ lng?: components["parameters"]["Lng"];
1347
+ radius_miles?: components["parameters"]["RadiusMiles"];
1348
+ };
1349
+ header?: {
1350
+ /** @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 */
1351
+ "Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
1352
+ /** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
1353
+ "Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
1354
+ };
1355
+ path?: never;
1356
+ cookie?: never;
1357
+ };
1358
+ requestBody?: never;
1359
+ responses: {
1360
+ /** @description OK */
1361
+ 200: {
1362
+ headers: {
1363
+ [name: string]: unknown;
1364
+ };
1365
+ content: {
1366
+ "application/json": components["schemas"]["AreaInventory"];
1367
+ };
1368
+ };
1369
+ default: components["responses"]["Problem"];
1370
+ };
1371
+ };
1221
1372
  search_workspaces: {
1222
1373
  parameters: {
1223
1374
  query?: {
@@ -1605,6 +1756,32 @@ interface operations {
1605
1756
  default: components["responses"]["Problem"];
1606
1757
  };
1607
1758
  };
1759
+ get_setup_state: {
1760
+ parameters: {
1761
+ query?: never;
1762
+ header?: {
1763
+ /** @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 */
1764
+ "Vinaverse-Session"?: components["parameters"]["VinaverseSession"];
1765
+ /** @description on every tool call of a session that belongs to a conversation (never on the catalogue sweep), its id; informational and not signed */
1766
+ "Vinaverse-Conversation"?: components["parameters"]["VinaverseConversation"];
1767
+ };
1768
+ path?: never;
1769
+ cookie?: never;
1770
+ };
1771
+ requestBody?: never;
1772
+ responses: {
1773
+ /** @description OK */
1774
+ 200: {
1775
+ headers: {
1776
+ [name: string]: unknown;
1777
+ };
1778
+ content: {
1779
+ "application/json": components["schemas"]["SetupState"];
1780
+ };
1781
+ };
1782
+ default: components["responses"]["Problem"];
1783
+ };
1784
+ };
1608
1785
  create_handoff: {
1609
1786
  parameters: {
1610
1787
  query?: never;