|
1628 | 1628 | "x-codegen-request-body-name" : "payload" |
1629 | 1629 | } |
1630 | 1630 | }, |
| 1631 | + "/space/{space_id}/experience_confirmations" : { |
| 1632 | + "get" : { |
| 1633 | + "description" : "Get all experience confirmations in a space with cursor-based pagination", |
| 1634 | + "parameters" : [ { |
| 1635 | + "description" : "Space ID", |
| 1636 | + "in" : "path", |
| 1637 | + "name" : "space_id", |
| 1638 | + "required" : true, |
| 1639 | + "schema" : { |
| 1640 | + "format" : "uuid", |
| 1641 | + "type" : "string" |
| 1642 | + } |
| 1643 | + }, { |
| 1644 | + "description" : "Limit of confirmations to return, default 20. Max 200.", |
| 1645 | + "in" : "query", |
| 1646 | + "name" : "limit", |
| 1647 | + "schema" : { |
| 1648 | + "type" : "integer" |
| 1649 | + } |
| 1650 | + }, { |
| 1651 | + "description" : "Cursor for pagination. Use the cursor from the previous response to get the next page.", |
| 1652 | + "in" : "query", |
| 1653 | + "name" : "cursor", |
| 1654 | + "schema" : { |
| 1655 | + "type" : "string" |
| 1656 | + } |
| 1657 | + }, { |
| 1658 | + "description" : "Order by created_at descending if true, ascending if false (default false)", |
| 1659 | + "in" : "query", |
| 1660 | + "name" : "time_desc", |
| 1661 | + "schema" : { |
| 1662 | + "type" : "boolean" |
| 1663 | + } |
| 1664 | + } ], |
| 1665 | + "responses" : { |
| 1666 | + "200" : { |
| 1667 | + "content" : { |
| 1668 | + "application/json" : { |
| 1669 | + "schema" : { |
| 1670 | + "$ref" : "#/components/schemas/_space__space_id__experience_confirmations_get_200_response" |
| 1671 | + } |
| 1672 | + } |
| 1673 | + }, |
| 1674 | + "description" : "OK" |
| 1675 | + } |
| 1676 | + }, |
| 1677 | + "security" : [ { |
| 1678 | + "BearerAuth" : [ ] |
| 1679 | + } ], |
| 1680 | + "summary" : "Get experience confirmations", |
| 1681 | + "tags" : [ "space" ], |
| 1682 | + "x-code-samples" : [ { |
| 1683 | + "label" : "Python", |
| 1684 | + "lang" : "python", |
| 1685 | + "source" : "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Get unconfirmed experiences\nexperiences = client.spaces.get_unconfirmed_experiences(\n space_id='space-uuid',\n limit=20,\n time_desc=True\n)\nfor experience in experiences.items:\n print(f\"{experience.id}: {experience.experience_data}\")\n\n# If there are more, use the cursor for pagination\nif experiences.has_more:\n next_experiences = client.spaces.get_unconfirmed_experiences(\n space_id='space-uuid',\n limit=20,\n cursor=experiences.next_cursor\n )\n" |
| 1686 | + }, { |
| 1687 | + "label" : "JavaScript", |
| 1688 | + "lang" : "javascript", |
| 1689 | + "source" : "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Get unconfirmed experiences\nconst experiences = await client.spaces.getUnconfirmedExperiences('space-uuid', {\n limit: 20,\n timeDesc: true\n});\nfor (const experience of experiences.items) {\n console.log(`${experience.id}: ${JSON.stringify(experience.experience_data)}`);\n}\n\n// If there are more, use the cursor for pagination\nif (experiences.hasMore) {\n const nextExperiences = await client.spaces.getUnconfirmedExperiences('space-uuid', {\n limit: 20,\n cursor: experiences.nextCursor\n });\n}\n" |
| 1690 | + } ] |
| 1691 | + } |
| 1692 | + }, |
| 1693 | + "/space/{space_id}/experience_confirmations/{experience_id}" : { |
| 1694 | + "patch" : { |
| 1695 | + "description" : "Confirm an experience confirmation. If save is false, delete the row. If save is true, get the data first (TODO: process data), then delete the row.", |
| 1696 | + "parameters" : [ { |
| 1697 | + "description" : "Space ID", |
| 1698 | + "in" : "path", |
| 1699 | + "name" : "space_id", |
| 1700 | + "required" : true, |
| 1701 | + "schema" : { |
| 1702 | + "format" : "uuid", |
| 1703 | + "type" : "string" |
| 1704 | + } |
| 1705 | + }, { |
| 1706 | + "description" : "Experience Confirmation ID", |
| 1707 | + "in" : "path", |
| 1708 | + "name" : "experience_id", |
| 1709 | + "required" : true, |
| 1710 | + "schema" : { |
| 1711 | + "format" : "uuid", |
| 1712 | + "type" : "string" |
| 1713 | + } |
| 1714 | + } ], |
| 1715 | + "requestBody" : { |
| 1716 | + "content" : { |
| 1717 | + "application/json" : { |
| 1718 | + "schema" : { |
| 1719 | + "$ref" : "#/components/schemas/handler.ConfirmExperienceReq" |
| 1720 | + } |
| 1721 | + } |
| 1722 | + }, |
| 1723 | + "description" : "Confirmation request with save flag", |
| 1724 | + "required" : true |
| 1725 | + }, |
| 1726 | + "responses" : { |
| 1727 | + "200" : { |
| 1728 | + "content" : { |
| 1729 | + "application/json" : { |
| 1730 | + "schema" : { |
| 1731 | + "$ref" : "#/components/schemas/_space__space_id__experience_confirmations__experience_id__patch_200_response" |
| 1732 | + } |
| 1733 | + } |
| 1734 | + }, |
| 1735 | + "description" : "OK" |
| 1736 | + } |
| 1737 | + }, |
| 1738 | + "security" : [ { |
| 1739 | + "BearerAuth" : [ ] |
| 1740 | + } ], |
| 1741 | + "summary" : "Confirm experience", |
| 1742 | + "tags" : [ "space" ], |
| 1743 | + "x-code-samples" : [ { |
| 1744 | + "label" : "Python", |
| 1745 | + "lang" : "python", |
| 1746 | + "source" : "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Confirm experience and save data\nconfirmation = client.spaces.confirm_experience(\n space_id='space-uuid',\n experience_id='experience-uuid',\n save=True\n)\nprint(f\"Saved confirmation: {confirmation.experience_data}\")\n\n# Confirm experience without saving (just delete)\nclient.spaces.confirm_experience(\n space_id='space-uuid',\n experience_id='experience-uuid',\n save=False\n)\n" |
| 1747 | + }, { |
| 1748 | + "label" : "JavaScript", |
| 1749 | + "lang" : "javascript", |
| 1750 | + "source" : "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Confirm experience and save data\nconst confirmation = await client.spaces.confirmExperience('space-uuid', 'experience-uuid', {\n save: true\n});\nconsole.log(`Saved confirmation: ${JSON.stringify(confirmation.experience_data)}`);\n\n// Confirm experience without saving (just delete)\nawait client.spaces.confirmExperience('space-uuid', 'experience-uuid', {\n save: false\n});\n" |
| 1751 | + } ], |
| 1752 | + "x-codegen-request-body-name" : "request" |
| 1753 | + } |
| 1754 | + }, |
1631 | 1755 | "/space/{space_id}/experience_search" : { |
1632 | 1756 | "get" : { |
1633 | 1757 | "description" : "Retrieve the experience search results for a given query within a space by its ID", |
|
1922 | 2046 | }, |
1923 | 2047 | "type" : "object" |
1924 | 2048 | }, |
| 2049 | + "handler.ConfirmExperienceReq" : { |
| 2050 | + "properties" : { |
| 2051 | + "save" : { |
| 2052 | + "type" : "boolean" |
| 2053 | + } |
| 2054 | + }, |
| 2055 | + "required" : [ "save" ], |
| 2056 | + "type" : "object" |
| 2057 | + }, |
1925 | 2058 | "handler.ConnectToSpaceReq" : { |
1926 | 2059 | "properties" : { |
1927 | 2060 | "space_id" : { |
|
2280 | 2413 | }, |
2281 | 2414 | "type" : "object" |
2282 | 2415 | }, |
| 2416 | + "model.ExperienceConfirmation" : { |
| 2417 | + "properties" : { |
| 2418 | + "created_at" : { |
| 2419 | + "type" : "string" |
| 2420 | + }, |
| 2421 | + "experience_data" : { |
| 2422 | + "properties" : { }, |
| 2423 | + "type" : "object" |
| 2424 | + }, |
| 2425 | + "id" : { |
| 2426 | + "type" : "string" |
| 2427 | + }, |
| 2428 | + "space_id" : { |
| 2429 | + "type" : "string" |
| 2430 | + }, |
| 2431 | + "task_id" : { |
| 2432 | + "type" : "string" |
| 2433 | + }, |
| 2434 | + "updated_at" : { |
| 2435 | + "type" : "string" |
| 2436 | + } |
| 2437 | + }, |
| 2438 | + "type" : "object" |
| 2439 | + }, |
2283 | 2440 | "model.Message" : { |
2284 | 2441 | "properties" : { |
2285 | 2442 | "created_at" : { |
|
2473 | 2630 | }, |
2474 | 2631 | "type" : "object" |
2475 | 2632 | }, |
| 2633 | + "service.ListExperienceConfirmationsOutput" : { |
| 2634 | + "properties" : { |
| 2635 | + "has_more" : { |
| 2636 | + "type" : "boolean" |
| 2637 | + }, |
| 2638 | + "items" : { |
| 2639 | + "items" : { |
| 2640 | + "$ref" : "#/components/schemas/model.ExperienceConfirmation" |
| 2641 | + }, |
| 2642 | + "type" : "array" |
| 2643 | + }, |
| 2644 | + "next_cursor" : { |
| 2645 | + "type" : "string" |
| 2646 | + } |
| 2647 | + }, |
| 2648 | + "type" : "object" |
| 2649 | + }, |
2476 | 2650 | "service.ListSessionsOutput" : { |
2477 | 2651 | "properties" : { |
2478 | 2652 | "has_more" : { |
|
2782 | 2956 | "type" : "object" |
2783 | 2957 | } ] |
2784 | 2958 | }, |
| 2959 | + "_space__space_id__experience_confirmations_get_200_response" : { |
| 2960 | + "allOf" : [ { |
| 2961 | + "$ref" : "#/components/schemas/serializer.Response" |
| 2962 | + }, { |
| 2963 | + "properties" : { |
| 2964 | + "data" : { |
| 2965 | + "$ref" : "#/components/schemas/service.ListExperienceConfirmationsOutput" |
| 2966 | + } |
| 2967 | + }, |
| 2968 | + "type" : "object" |
| 2969 | + } ] |
| 2970 | + }, |
| 2971 | + "_space__space_id__experience_confirmations__experience_id__patch_200_response" : { |
| 2972 | + "allOf" : [ { |
| 2973 | + "$ref" : "#/components/schemas/serializer.Response" |
| 2974 | + }, { |
| 2975 | + "properties" : { |
| 2976 | + "data" : { |
| 2977 | + "$ref" : "#/components/schemas/model.ExperienceConfirmation" |
| 2978 | + } |
| 2979 | + }, |
| 2980 | + "type" : "object" |
| 2981 | + } ] |
| 2982 | + }, |
2785 | 2983 | "_space__space_id__experience_search_get_200_response" : { |
2786 | 2984 | "allOf" : [ { |
2787 | 2985 | "$ref" : "#/components/schemas/serializer.Response" |
|
0 commit comments