@botpress/client 0.16.2 → 0.18.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.
Files changed (134) hide show
  1. package/dist/bundle.cjs +13 -10
  2. package/dist/bundle.cjs.map +4 -4
  3. package/dist/gen/index.d.ts +372 -13
  4. package/dist/gen/models.d.ts +1160 -0
  5. package/dist/gen/operations/addParticipant.d.ts +56 -0
  6. package/dist/gen/operations/breakDownWorkspaceUsageByBot.d.ts +27 -0
  7. package/dist/gen/operations/callAction.d.ts +36 -0
  8. package/dist/gen/operations/changeAISpendQuota.d.ts +21 -0
  9. package/dist/gen/operations/chargeWorkspaceUnpaidInvoices.d.ts +40 -0
  10. package/dist/gen/operations/checkHandleAvailability.d.ts +24 -0
  11. package/dist/gen/operations/configureIntegration.d.ts +24 -0
  12. package/dist/gen/operations/createBot.d.ts +487 -0
  13. package/dist/gen/operations/createConversation.d.ts +70 -0
  14. package/dist/gen/operations/createEvent.d.ts +95 -0
  15. package/dist/gen/operations/createFile.d.ts +108 -0
  16. package/dist/gen/operations/createIntegration.d.ts +533 -0
  17. package/dist/gen/operations/createIntegrationApiKey.d.ts +29 -0
  18. package/dist/gen/operations/createMessage.d.ts +98 -0
  19. package/dist/gen/operations/createPersonalAccessToken.d.ts +33 -0
  20. package/dist/gen/operations/createTable.d.ts +151 -0
  21. package/dist/gen/operations/createTableRows.d.ts +71 -0
  22. package/dist/gen/operations/createTask.d.ts +125 -0
  23. package/dist/gen/operations/createUser.d.ts +70 -0
  24. package/dist/gen/operations/createWorkspace.d.ts +39 -0
  25. package/dist/gen/operations/createWorkspaceMember.d.ts +27 -0
  26. package/dist/gen/operations/deleteBot.d.ts +21 -0
  27. package/dist/gen/operations/deleteBotIssue.d.ts +22 -0
  28. package/dist/gen/operations/deleteConversation.d.ts +21 -0
  29. package/dist/gen/operations/deleteFile.d.ts +21 -0
  30. package/dist/gen/operations/deleteIntegration.d.ts +21 -0
  31. package/dist/gen/operations/deleteIntegrationApiKey.d.ts +21 -0
  32. package/dist/gen/operations/deleteMessage.d.ts +21 -0
  33. package/dist/gen/operations/deletePersonalAccessToken.d.ts +21 -0
  34. package/dist/gen/operations/deleteTable.d.ts +21 -0
  35. package/dist/gen/operations/deleteTableRows.d.ts +36 -0
  36. package/dist/gen/operations/deleteTask.d.ts +21 -0
  37. package/dist/gen/operations/deleteUser.d.ts +21 -0
  38. package/dist/gen/operations/deleteWorkspace.d.ts +21 -0
  39. package/dist/gen/operations/deleteWorkspaceMember.d.ts +21 -0
  40. package/dist/gen/operations/duplicateTable.d.ts +137 -0
  41. package/dist/gen/operations/findTableRows.d.ts +94 -0
  42. package/dist/gen/operations/getAccount.d.ts +31 -0
  43. package/dist/gen/operations/getAccountPreference.d.ts +22 -0
  44. package/dist/gen/operations/getAllWorkspaceQuotaCompletion.d.ts +24 -0
  45. package/dist/gen/operations/getAuditRecords.d.ts +38 -0
  46. package/dist/gen/operations/getBot.d.ts +308 -0
  47. package/dist/gen/operations/getBotAnalytics.d.ts +49 -0
  48. package/dist/gen/operations/getBotLogs.d.ts +30 -0
  49. package/dist/gen/operations/getBotWebchat.d.ts +23 -0
  50. package/dist/gen/operations/getConversation.d.ts +56 -0
  51. package/dist/gen/operations/getEvent.d.ts +61 -0
  52. package/dist/gen/operations/getFile.d.ts +85 -0
  53. package/dist/gen/operations/getIntegration.d.ts +295 -0
  54. package/dist/gen/operations/getIntegrationByName.d.ts +296 -0
  55. package/dist/gen/operations/getIntegrationLogs.d.ts +30 -0
  56. package/dist/gen/operations/getMessage.d.ts +62 -0
  57. package/dist/gen/operations/getOrCreateConversation.d.ts +70 -0
  58. package/dist/gen/operations/getOrCreateMessage.d.ts +98 -0
  59. package/dist/gen/operations/getOrCreateTable.d.ts +164 -0
  60. package/dist/gen/operations/getOrCreateUser.d.ts +70 -0
  61. package/dist/gen/operations/getOrSetState.d.ts +76 -0
  62. package/dist/gen/operations/getParticipant.d.ts +53 -0
  63. package/dist/gen/operations/getPublicIntegration.d.ts +301 -0
  64. package/dist/gen/operations/getPublicIntegrationById.d.ts +300 -0
  65. package/dist/gen/operations/getPublicWorkspace.d.ts +31 -0
  66. package/dist/gen/operations/getState.d.ts +66 -0
  67. package/dist/gen/operations/getTable.d.ts +136 -0
  68. package/dist/gen/operations/getTableRow.d.ts +53 -0
  69. package/dist/gen/operations/getTask.d.ts +86 -0
  70. package/dist/gen/operations/getUpcomingInvoice.d.ts +29 -0
  71. package/dist/gen/operations/getUsage.d.ts +45 -0
  72. package/dist/gen/operations/getUser.d.ts +52 -0
  73. package/dist/gen/operations/getWorkspace.d.ts +39 -0
  74. package/dist/gen/operations/getWorkspaceMember.d.ts +25 -0
  75. package/dist/gen/operations/getWorkspaceQuota.d.ts +37 -0
  76. package/dist/gen/operations/introspect.d.ts +24 -0
  77. package/dist/gen/operations/listActivities.d.ts +42 -0
  78. package/dist/gen/operations/listBotIssueEvents.d.ts +32 -0
  79. package/dist/gen/operations/listBotIssues.d.ts +45 -0
  80. package/dist/gen/operations/listBots.d.ts +44 -0
  81. package/dist/gen/operations/listConversations.d.ts +64 -0
  82. package/dist/gen/operations/listEvents.d.ts +69 -0
  83. package/dist/gen/operations/listFiles.d.ts +94 -0
  84. package/dist/gen/operations/listIntegrationApiKeys.d.ts +26 -0
  85. package/dist/gen/operations/listIntegrations.d.ts +68 -0
  86. package/dist/gen/operations/listMessages.d.ts +69 -0
  87. package/dist/gen/operations/listParticipants.d.ts +56 -0
  88. package/dist/gen/operations/listPersonalAccessTokens.d.ts +25 -0
  89. package/dist/gen/operations/listPublicIntegrations.d.ts +72 -0
  90. package/dist/gen/operations/listTables.d.ts +126 -0
  91. package/dist/gen/operations/listTasks.d.ts +97 -0
  92. package/dist/gen/operations/listUsageHistory.d.ts +44 -0
  93. package/dist/gen/operations/listUsers.d.ts +59 -0
  94. package/dist/gen/operations/listWorkspaceInvoices.d.ts +53 -0
  95. package/dist/gen/operations/listWorkspaceMembers.d.ts +34 -0
  96. package/dist/gen/operations/listWorkspaceQuotas.d.ts +36 -0
  97. package/dist/gen/operations/listWorkspaceUsages.d.ts +45 -0
  98. package/dist/gen/operations/listWorkspaces.d.ts +48 -0
  99. package/dist/gen/operations/patchState.d.ts +72 -0
  100. package/dist/gen/operations/removeParticipant.d.ts +22 -0
  101. package/dist/gen/operations/renameTableColumn.d.ts +132 -0
  102. package/dist/gen/operations/runVrl.d.ts +28 -0
  103. package/dist/gen/operations/searchFiles.d.ts +60 -0
  104. package/dist/gen/operations/setAccountPreference.d.ts +22 -0
  105. package/dist/gen/operations/setState.d.ts +76 -0
  106. package/dist/gen/operations/setWorkspacePaymentMethod.d.ts +37 -0
  107. package/dist/gen/operations/trackAnalytics.d.ts +22 -0
  108. package/dist/gen/operations/transferBot.d.ts +25 -0
  109. package/dist/gen/operations/updateAccount.d.ts +34 -0
  110. package/dist/gen/operations/updateBot.d.ts +486 -0
  111. package/dist/gen/operations/updateConversation.d.ts +63 -0
  112. package/dist/gen/operations/updateFile.d.ts +95 -0
  113. package/dist/gen/operations/updateIntegration.d.ts +522 -0
  114. package/dist/gen/operations/updateMessage.d.ts +68 -0
  115. package/dist/gen/operations/updateTable.d.ts +152 -0
  116. package/dist/gen/operations/updateTableRows.d.ts +74 -0
  117. package/dist/gen/operations/updateTask.d.ts +114 -0
  118. package/dist/gen/operations/updateUser.d.ts +66 -0
  119. package/dist/gen/operations/updateWorkspace.d.ts +51 -0
  120. package/dist/gen/operations/updateWorkspaceMember.d.ts +27 -0
  121. package/dist/gen/operations/upsertTableRows.d.ts +107 -0
  122. package/dist/index.cjs +4 -1
  123. package/dist/index.cjs.map +4 -4
  124. package/dist/index.d.ts +5 -14
  125. package/dist/index.mjs +4 -1
  126. package/dist/index.mjs.map +4 -4
  127. package/openapi.ts +3 -3
  128. package/package.json +4 -2
  129. package/readme.md +2 -3
  130. package/dist/gen/api.d.ts +0 -14072
  131. package/dist/gen/base.d.ts +0 -54
  132. package/dist/gen/client.d.ts +0 -255
  133. package/dist/gen/common.d.ts +0 -65
  134. package/dist/gen/configuration.d.ts +0 -83
package/dist/index.d.ts CHANGED
@@ -1,29 +1,20 @@
1
1
  /// <reference types="node" />
2
2
  import { AxiosError } from 'axios';
3
3
  import { ClientProps, ClientConfig } from './config';
4
- import { CreateFileResponse, GetFileResponse } from './gen';
5
- import { ApiClient as AutoGeneratedClient, CreateFileProps } from './gen/client';
4
+ import { Client as AutoGeneratedClient } from './gen';
5
+ import { CreateFileInput, CreateFileResponse } from './gen/operations/createFile';
6
+ import { GetFileResponse } from './gen/operations/getFile';
6
7
  export { isApiError } from './gen/errors';
7
8
  export * as axios from 'axios';
8
- export type { Message, Conversation, User, State, Event, ModelFile as File, Bot, Integration, Issue, IssueEvent, Account, Workspace, Usage, } from './gen';
9
+ export type { Message, Conversation, User, State, Event, File, Bot, Integration, Issue, IssueEvent, Account, Workspace, Usage, } from './gen/models';
9
10
  export * from './gen/errors';
10
11
  export declare class Client extends AutoGeneratedClient {
11
12
  readonly config: Readonly<ClientConfig>;
12
- private readonly axiosClient;
13
13
  constructor(clientProps?: ClientProps);
14
14
  /**
15
15
  * Creates and uploads a new file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
16
16
  */
17
- createAndUploadFile: ({ name, data, index, tags, contentType, accessPolicies, }: Omit<{
18
- name?: string | undefined;
19
- tags?: {
20
- [key: string]: string;
21
- } | undefined;
22
- size: number;
23
- index?: boolean | undefined;
24
- accessPolicies?: import("./gen").CreateFileBodyAccessPoliciesEnum[] | undefined;
25
- contentType?: string | undefined;
26
- }, "size"> & {
17
+ createAndUploadFile: ({ name, data, index, tags, contentType, accessPolicies, }: Omit<CreateFileInput, "size"> & {
27
18
  data: Buffer;
28
19
  }) => Promise<GetFileResponse>;
29
20
  }
package/dist/index.mjs CHANGED
@@ -1,2 +1,5 @@
1
- var me=Object.create;var ae=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var ne=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Ce=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fe(t))!Pe.call(r,n)&&n!==e&&ae(r,n,{get:()=>t[n],enumerable:!(s=be(t,n))||s.enumerable});return r};var oe=(r,t,e)=>(e=r!=null?me(xe(r)):{},Ce(t||!r||!r.__esModule?ae(e,"default",{value:r,enumerable:!0}):e,r));var re=ne(()=>{});var ie=ne(()=>{});var ye=oe(re()),Ae=oe(ie());import ge from"axios";import{isNode as ue}from"browser-or-node";import{isBrowser as le,isNode as Ie}from"browser-or-node";var Te="https://api.botpress.cloud",Be=6e4,ke="BP_API_URL",qe="BP_BOT_ID",Ue="BP_INTEGRATION_ID",Ve="BP_WORKSPACE_ID",ve="BP_TOKEN";function ce(r){let t=De(r),e={};t.workspaceId&&(e["x-workspace-id"]=t.workspaceId),t.botId&&(e["x-bot-id"]=t.botId),t.integrationId&&(e["x-integration-id"]=t.integrationId),t.token&&(e.Authorization=`Bearer ${t.token}`),e={...e,...t.headers};let s=t.apiUrl??Te,n=t.timeout??Be;return{apiUrl:s,timeout:n,withCredentials:le,headers:e}}function De(r){return le?r:Ie?Oe(r):r}function Oe(r){let t={...r,apiUrl:r.apiUrl??process.env[ke],botId:r.botId??process.env[qe],integrationId:r.integrationId??process.env[Ue],workspaceId:r.workspaceId??process.env[Ve]},e=t.token??process.env[ve];return e&&(t.token=e),t}import Fe from"axios";import h from"axios";import Ee from"axios";var u="https://api.botpress.cloud".replace(/\/+$/,"");var k=class{constructor(t,e=u,s=Ee){this.basePath=e;this.axios=s;t&&(this.configuration=t,this.basePath=t.basePath||this.basePath)}configuration},q=class extends Error{constructor(e,s){super(s);this.field=e;this.name="RequiredError"}};var d="https://example.com",b=function(r,t,e){if(e==null)throw new q(t,`Required parameter ${t} was null or undefined when calling ${r}.`)};function v(r,t,e=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>v(r,s,e)):Object.keys(t).forEach(s=>v(r,t[s],`${e}${e!==""?".":""}${s}`)):r.has(e)?r.append(e,t):r.set(e,t))}var g=function(r,...t){let e=new URLSearchParams(r.search);v(e,t),r.search=e.toString()},x=function(r,t,e){let s=typeof r!="string";return(s&&e&&e.isJsonMime?e.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(r!==void 0?r:{}):r||""},y=function(r){return r.pathname+r.search+r.hash},A=function(r,t,e,s){return(n=t,a=e)=>{let o={...r.options,url:(s?.basePath||a)+r.url};return n.request(o)}};var we=function(r){return{addParticipant:async(t,e,s={})=>{b("addParticipant","id",t);let n="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},breakDownWorkspaceUsageByBot:async(t,e,s,n={})=>{b("breakDownWorkspaceUsageByBot","id",t),b("breakDownWorkspaceUsageByBot","type",e);let a="/v1/admin/workspaces/{id}/usages/by-bot".replace("{id}",encodeURIComponent(String(t))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};e!==void 0&&(p.type=e),s!==void 0&&(p.period=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},callAction:async(t,e={})=>{let s="/v1/chat/actions",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},changeAISpendQuota:async(t,e={})=>{let s="/v1/admin/quotas/ai-spend",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"PUT",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},chargeWorkspaceUnpaidInvoices:async(t,e,s={})=>{b("chargeWorkspaceUnpaidInvoices","id",t);let n="/v1/admin/workspaces/{id}/billing/invoices/charge-unpaid".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},checkHandleAvailability:async(t,e={})=>{let s="/v1/admin/workspaces/handle-availability",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"PUT",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},configureIntegration:async(t,e={})=>{let s="/v1/chat/integrations/configure",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createBot:async(t,e={})=>{let s="/v1/admin/bots",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createConversation:async(t,e={})=>{let s="/v1/chat/conversations",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createEvent:async(t,e={})=>{let s="/v1/chat/events",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createFile:async(t,e={})=>{let s="/v1/files",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createIntegration:async(t,e={})=>{let s="/v1/admin/integrations",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createIntegrationApiKey:async(t,e={})=>{let s="/v1/admin/integrations/iaks",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createMessage:async(t,e={})=>{let s="/v1/chat/messages",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createPersonalAccessToken:async(t,e={})=>{let s="/v1/admin/account/pats",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createTable:async(t,e={})=>{let s="/v1/tables",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createTableRows:async(t,e,s={})=>{b("createTableRows","table",t);let n="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},createTask:async(t,e={})=>{let s="/v1/chat/tasks",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createUser:async(t,e={})=>{let s="/v1/chat/users",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createWorkspace:async(t,e={})=>{let s="/v1/admin/workspaces",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},createWorkspaceMember:async(t,e={})=>{let s="/v1/admin/workspace-members",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},deleteBot:async(t,e={})=>{b("deleteBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteBotIssue:async(t,e,s={})=>{b("deleteBotIssue","id",t),b("deleteBotIssue","issueId",e);let n="/v1/admin/bots/{id}/issues/{issueId}".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"DELETE",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},deleteConversation:async(t,e={})=>{b("deleteConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteFile:async(t,e={})=>{b("deleteFile","id",t);let s="/v1/files/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteIntegration:async(t,e={})=>{b("deleteIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteIntegrationApiKey:async(t,e={})=>{b("deleteIntegrationApiKey","id",t);let s="/v1/admin/integrations/iaks/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteMessage:async(t,e={})=>{b("deleteMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deletePersonalAccessToken:async(t,e={})=>{b("deletePersonalAccessToken","id",t);let s="/v1/admin/account/pats/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteTable:async(t,e={})=>{b("deleteTable","table",t);let s="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteTableRows:async(t,e,s={})=>{b("deleteTableRows","table",t);let n="/v1/tables/{table}/rows/delete".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},deleteTask:async(t,e={})=>{b("deleteTask","id",t);let s="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteUser:async(t,e={})=>{b("deleteUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteWorkspace:async(t,e={})=>{b("deleteWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},deleteWorkspaceMember:async(t,e={})=>{b("deleteWorkspaceMember","id",t);let s="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"DELETE",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},duplicateTable:async(t,e,s={})=>{b("duplicateTable","sourceTableId",t);let n="/v1/tables/{sourceTableId}/duplicate".replace("{sourceTableId}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},findTableRows:async(t,e,s={})=>{b("findTableRows","table",t);let n="/v1/tables/{table}/rows/find".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},getAccount:async(t={})=>{let e="/v1/admin/account/me",s=new URL(e,d),n;r&&(n=r.baseOptions);let a={method:"GET",...n,...t},o={};g(s,{});let l=n&&n.headers?n.headers:{};return a.headers={...o,...l,...t.headers},{url:y(s),options:a}},getAccountPreference:async(t,e={})=>{b("getAccountPreference","key",t);let s="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getAllWorkspaceQuotaCompletion:async(t={})=>{let e="/v1/admin/workspaces/usages/quota-completion",s=new URL(e,d),n;r&&(n=r.baseOptions);let a={method:"GET",...n,...t},o={};g(s,{});let l=n&&n.headers?n.headers:{};return a.headers={...o,...l,...t.headers},{url:y(s),options:a}},getAuditRecords:async(t,e,s={})=>{b("getAuditRecords","id",t);let n="/v1/admin/workspaces/{id}/audit-records".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getBot:async(t,e={})=>{b("getBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getBotAnalytics:async(t,e,s,n={})=>{b("getBotAnalytics","id",t),b("getBotAnalytics","startDate",e),b("getBotAnalytics","endDate",s);let a="/v1/admin/bots/{id}/analytics".replace("{id}",encodeURIComponent(String(t))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};e!==void 0&&(p.startDate=e),s!==void 0&&(p.endDate=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},getBotLogs:async(t,e,s,n,a={})=>{b("getBotLogs","id",t),b("getBotLogs","timeStart",e),b("getBotLogs","timeEnd",s);let o="/v1/admin/bots/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"GET",...l,...a},p={},f={};e!==void 0&&(f.timeStart=e),s!==void 0&&(f.timeEnd=s),n!==void 0&&(f.nextToken=n),g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},{url:y(i),options:c}},getBotWebchat:async(t,e,s={})=>{b("getBotWebchat","id",t),b("getBotWebchat","type",e);let n="/v1/admin/bots/{id}/webchat".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.type=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getConversation:async(t,e={})=>{b("getConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getEvent:async(t,e={})=>{b("getEvent","id",t);let s="/v1/chat/events/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getFile:async(t,e={})=>{b("getFile","id",t);let s="/v1/files/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getIntegration:async(t,e={})=>{b("getIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getIntegrationByName:async(t,e,s={})=>{b("getIntegrationByName","name",t),b("getIntegrationByName","version",e);let n="/v1/admin/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getIntegrationLogs:async(t,e,s,n,a={})=>{b("getIntegrationLogs","id",t),b("getIntegrationLogs","timeStart",e),b("getIntegrationLogs","timeEnd",s);let o="/v1/admin/integrations/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"GET",...l,...a},p={},f={};e!==void 0&&(f.timeStart=e),s!==void 0&&(f.timeEnd=s),n!==void 0&&(f.nextToken=n),g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},{url:y(i),options:c}},getMessage:async(t,e={})=>{b("getMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getOrCreateConversation:async(t,e={})=>{let s="/v1/chat/conversations/get-or-create",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},getOrCreateMessage:async(t,e={})=>{let s="/v1/chat/messages/get-or-create",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},getOrCreateTable:async(t,e,s={})=>{b("getOrCreateTable","table",t);let n="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},getOrCreateUser:async(t,e={})=>{let s="/v1/chat/users/get-or-create",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},getOrSetState:async(t,e,s,n,a={})=>{b("getOrSetState","type",t),b("getOrSetState","id",e),b("getOrSetState","name",s);let o="/v1/chat/states/{type}/{id}/{name}/get-or-set".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"POST",...l,...a},p={},f={};p["Content-Type"]="application/json",g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},c.data=x(n,c,r),{url:y(i),options:c}},getParticipant:async(t,e,s={})=>{b("getParticipant","id",t),b("getParticipant","userId",e);let n="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getPublicIntegration:async(t,e,s={})=>{b("getPublicIntegration","name",t),b("getPublicIntegration","version",e);let n="/v1/admin/hub/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getPublicIntegrationById:async(t,e={})=>{b("getPublicIntegrationById","id",t);let s="/v1/admin/hub/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getPublicWorkspace:async(t,e={})=>{b("getPublicWorkspace","id",t);let s="/v1/admin/workspaces/{id}/public".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getState:async(t,e,s,n={})=>{b("getState","type",t),b("getState","id",e),b("getState","name",s);let a="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={};g(o,{});let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},getTable:async(t,e={})=>{b("getTable","table",t);let s="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getTableRow:async(t,e,s={})=>{b("getTableRow","table",t),b("getTableRow","id",e);let n="/v1/tables/{table}/row".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.id=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},getTask:async(t,e={})=>{b("getTask","id",t);let s="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getUpcomingInvoice:async(t,e={})=>{b("getUpcomingInvoice","id",t);let s="/v1/admin/workspaces/{id}/billing/upcoming-invoice".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getUsage:async(t,e,s,n={})=>{b("getUsage","type",t),b("getUsage","id",e);let a="/v1/admin/usages/{id}".replace("{id}",encodeURIComponent(String(e))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};t!==void 0&&(p.type=t),s!==void 0&&(p.period=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},getUser:async(t,e={})=>{b("getUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getWorkspace:async(t,e={})=>{b("getWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},getWorkspaceMember:async(t={})=>{let e="/v1/admin/workspace-members/me",s=new URL(e,d),n;r&&(n=r.baseOptions);let a={method:"GET",...n,...t},o={};g(s,{});let l=n&&n.headers?n.headers:{};return a.headers={...o,...l,...t.headers},{url:y(s),options:a}},getWorkspaceQuota:async(t,e,s,n={})=>{b("getWorkspaceQuota","id",t),b("getWorkspaceQuota","type",e);let a="/v1/admin/workspaces/{id}/quota".replace("{id}",encodeURIComponent(String(t))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};e!==void 0&&(p.type=e),s!==void 0&&(p.period=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},introspect:async(t,e={})=>{let s="/v1/admin/introspect",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},listActivities:async(t,e,s,n={})=>{b("listActivities","taskId",t),b("listActivities","botId",e);let a="/v1/admin/activities",o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};s!==void 0&&(p.nextToken=s),t!==void 0&&(p.taskId=t),e!==void 0&&(p.botId=e),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},listBotIssueEvents:async(t,e,s={})=>{b("listBotIssueEvents","id",t),b("listBotIssueEvents","issueId",e);let n="/v1/admin/bots/{id}/issues/{issueId}/events".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listBotIssues:async(t,e,s={})=>{b("listBotIssues","id",t);let n="/v1/admin/bots/{id}/issues".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listBots:async(t,e,s={})=>{let n="/v1/admin/bots",a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};t!==void 0&&(c.dev=t),e!==void 0&&(c.nextToken=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listConversations:async(t,e,s,n,a={})=>{let o="/v1/chat/conversations",i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"GET",...l,...a},p={},f={};t!==void 0&&(f.nextToken=t),e!==void 0&&(f.tags=e),s&&(f.participantIds=s),n!==void 0&&(f.integrationName=n),g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},{url:y(i),options:c}},listEvents:async(t,e,s,n,a,o,i={})=>{let l="/v1/chat/events",c=new URL(l,d),p;r&&(p=r.baseOptions);let f={method:"GET",...p,...i},C={},T={};t!==void 0&&(T.nextToken=t),e!==void 0&&(T.type=e),s!==void 0&&(T.conversationId=s),n!==void 0&&(T.userId=n),a!==void 0&&(T.messageId=a),o!==void 0&&(T.status=o),g(c,T);let I=p&&p.headers?p.headers:{};return f.headers={...C,...I,...i.headers},{url:y(c),options:f}},listFiles:async(t,e,s={})=>{let n="/v1/files",a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};t!==void 0&&(c.nextToken=t),e!==void 0&&(c.tags=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listIntegrationApiKeys:async(t,e={})=>{b("listIntegrationApiKeys","integrationId",t);let s="/v1/admin/integrations/iaks",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={},l={};t!==void 0&&(l.integrationId=t),g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},listIntegrations:async(t,e,s,n,a={})=>{let o="/v1/admin/integrations",i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"GET",...l,...a},p={},f={};t!==void 0&&(f.nextToken=t),e!==void 0&&(f.name=e),s!==void 0&&(f.version=s),n!==void 0&&(f.dev=n),g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},{url:y(i),options:c}},listMessages:async(t,e,s,n={})=>{let a="/v1/chat/messages",o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};t!==void 0&&(p.nextToken=t),e!==void 0&&(p.conversationId=e),s!==void 0&&(p.tags=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},listParticipants:async(t,e,s={})=>{b("listParticipants","id",t);let n="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listPersonalAccessTokens:async(t={})=>{let e="/v1/admin/account/pats",s=new URL(e,d),n;r&&(n=r.baseOptions);let a={method:"GET",...n,...t},o={};g(s,{});let l=n&&n.headers?n.headers:{};return a.headers={...o,...l,...t.headers},{url:y(s),options:a}},listPublicIntegrations:async(t,e,s,n={})=>{let a="/v1/admin/hub/integrations",o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};t!==void 0&&(p.nextToken=t),e!==void 0&&(p.name=e),s!==void 0&&(p.version=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},listTables:async(t,e={})=>{let s="/v1/tables",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={},l={};t!==void 0&&(l.tags=t),g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},listTasks:async(t,e,s,n,a,o,i,l={})=>{let c="/v1/chat/tasks",p=new URL(c,d),f;r&&(f=r.baseOptions);let C={method:"GET",...f,...l},T={},I={};t!==void 0&&(I.nextToken=t),e!==void 0&&(I.tags=e),s!==void 0&&(I.conversationId=s),n!==void 0&&(I.userId=n),a!==void 0&&(I.parentTaskId=a),o&&(I.status=o),i!==void 0&&(I.type=i),g(p,I);let Re=f&&f.headers?f.headers:{};return C.headers={...T,...Re,...l.headers},{url:y(p),options:C}},listUsageHistory:async(t,e,s={})=>{b("listUsageHistory","type",t),b("listUsageHistory","id",e);let n="/v1/admin/usages/{id}/history".replace("{id}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};t!==void 0&&(c.type=t),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listUsers:async(t,e,s,n={})=>{let a="/v1/chat/users",o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};t!==void 0&&(p.nextToken=t),e!==void 0&&(p.conversationId=e),s!==void 0&&(p.tags=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},listWorkspaceInvoices:async(t,e={})=>{b("listWorkspaceInvoices","id",t);let s="/v1/admin/workspaces/{id}/billing/invoices".replace("{id}",encodeURIComponent(String(t))),n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={};g(n,{});let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},listWorkspaceMembers:async(t,e={})=>{let s="/v1/admin/workspace-members",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={},l={};t!==void 0&&(l.nextToken=t),g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},listWorkspaceQuotas:async(t,e,s={})=>{b("listWorkspaceQuotas","id",t);let n="/v1/admin/workspaces/{id}/quotas".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"GET",...o,...s},l={},c={};e!==void 0&&(c.period=e),g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},listWorkspaceUsages:async(t,e,s,n={})=>{b("listWorkspaceUsages","id",t),b("listWorkspaceUsages","type",e);let a="/v1/admin/workspaces/{id}/usages".replace("{id}",encodeURIComponent(String(t))),o=new URL(a,d),i;r&&(i=r.baseOptions);let l={method:"GET",...i,...n},c={},p={};e!==void 0&&(p.type=e),s!==void 0&&(p.period=s),g(o,p);let f=i&&i.headers?i.headers:{};return l.headers={...c,...f,...n.headers},{url:y(o),options:l}},listWorkspaces:async(t,e={})=>{let s="/v1/admin/workspaces",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"GET",...a,...e},i={},l={};t!==void 0&&(l.nextToken=t),g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},{url:y(n),options:o}},patchState:async(t,e,s,n,a={})=>{b("patchState","type",t),b("patchState","id",e),b("patchState","name",s);let o="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"PATCH",...l,...a},p={},f={};p["Content-Type"]="application/json",g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},c.data=x(n,c,r),{url:y(i),options:c}},removeParticipant:async(t,e,s={})=>{b("removeParticipant","id",t),b("removeParticipant","userId",e);let n="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"DELETE",...o,...s},l={};g(a,{});let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},{url:y(a),options:i}},renameTableColumn:async(t,e,s={})=>{b("renameTableColumn","table",t);let n="/v1/tables/{table}/column".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},runVrl:async(t,e={})=>{let s="/v1/admin/helper/vrl",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},searchFiles:async(t,e,s,n,a={})=>{b("searchFiles","query",t);let o="/v1/files/search",i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"GET",...l,...a},p={},f={};e!==void 0&&(f.tags=e),t!==void 0&&(f.query=t),s!==void 0&&(f.contextDepth=s),n!==void 0&&(f.limit=n),g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},{url:y(i),options:c}},setAccountPreference:async(t,e,s={})=>{b("setAccountPreference","key",t);let n="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},setState:async(t,e,s,n,a={})=>{b("setState","type",t),b("setState","id",e),b("setState","name",s);let o="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(o,d),l;r&&(l=r.baseOptions);let c={method:"POST",...l,...a},p={},f={};p["Content-Type"]="application/json",g(i,f);let C=l&&l.headers?l.headers:{};return c.headers={...p,...C,...a.headers},c.data=x(n,c,r),{url:y(i),options:c}},setWorkspacePaymentMethod:async(t,e,s={})=>{b("setWorkspacePaymentMethod","id",t);let n="/v1/admin/workspaces/{id}/billing/payment-method".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},trackAnalytics:async(t,e={})=>{let s="/v1/chat/analytics",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"POST",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},transferBot:async(t,e,s={})=>{b("transferBot","id",t);let n="/v1/admin/bots/{id}/transfer".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateAccount:async(t,e={})=>{let s="/v1/admin/account/me",n=new URL(s,d),a;r&&(a=r.baseOptions);let o={method:"PUT",...a,...e},i={},l={};i["Content-Type"]="application/json",g(n,l);let c=a&&a.headers?a.headers:{};return o.headers={...i,...c,...e.headers},o.data=x(t,o,r),{url:y(n),options:o}},updateBot:async(t,e,s={})=>{b("updateBot","id",t);let n="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateConversation:async(t,e,s={})=>{b("updateConversation","id",t);let n="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateFile:async(t,e,s={})=>{b("updateFile","id",t);let n="/v1/files/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateIntegration:async(t,e,s={})=>{b("updateIntegration","id",t);let n="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateMessage:async(t,e,s={})=>{b("updateMessage","id",t);let n="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateTable:async(t,e,s={})=>{b("updateTable","table",t);let n="/v1/tables/{table}".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateTableRows:async(t,e,s={})=>{b("updateTableRows","table",t);let n="/v1/tables/{table}/rows".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateTask:async(t,e,s={})=>{b("updateTask","id",t);let n="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateUser:async(t,e,s={})=>{b("updateUser","id",t);let n="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateWorkspace:async(t,e,s={})=>{b("updateWorkspace","id",t);let n="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},updateWorkspaceMember:async(t,e,s={})=>{b("updateWorkspaceMember","id",t);let n="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"PUT",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}},upsertTableRows:async(t,e,s={})=>{b("upsertTableRows","table",t);let n="/v1/tables/{table}/rows/upsert".replace("{table}",encodeURIComponent(String(t))),a=new URL(n,d),o;r&&(o=r.baseOptions);let i={method:"POST",...o,...s},l={},c={};l["Content-Type"]="application/json",g(a,c);let p=o&&o.headers?o.headers:{};return i.headers={...l,...p,...s.headers},i.data=x(e,i,r),{url:y(a),options:i}}}},R=function(r){let t=we(r);return{async addParticipant(e,s,n){let a=await t.addParticipant(e,s,n);return A(a,h,u,r)},async breakDownWorkspaceUsageByBot(e,s,n,a){let o=await t.breakDownWorkspaceUsageByBot(e,s,n,a);return A(o,h,u,r)},async callAction(e,s){let n=await t.callAction(e,s);return A(n,h,u,r)},async changeAISpendQuota(e,s){let n=await t.changeAISpendQuota(e,s);return A(n,h,u,r)},async chargeWorkspaceUnpaidInvoices(e,s,n){let a=await t.chargeWorkspaceUnpaidInvoices(e,s,n);return A(a,h,u,r)},async checkHandleAvailability(e,s){let n=await t.checkHandleAvailability(e,s);return A(n,h,u,r)},async configureIntegration(e,s){let n=await t.configureIntegration(e,s);return A(n,h,u,r)},async createBot(e,s){let n=await t.createBot(e,s);return A(n,h,u,r)},async createConversation(e,s){let n=await t.createConversation(e,s);return A(n,h,u,r)},async createEvent(e,s){let n=await t.createEvent(e,s);return A(n,h,u,r)},async createFile(e,s){let n=await t.createFile(e,s);return A(n,h,u,r)},async createIntegration(e,s){let n=await t.createIntegration(e,s);return A(n,h,u,r)},async createIntegrationApiKey(e,s){let n=await t.createIntegrationApiKey(e,s);return A(n,h,u,r)},async createMessage(e,s){let n=await t.createMessage(e,s);return A(n,h,u,r)},async createPersonalAccessToken(e,s){let n=await t.createPersonalAccessToken(e,s);return A(n,h,u,r)},async createTable(e,s){let n=await t.createTable(e,s);return A(n,h,u,r)},async createTableRows(e,s,n){let a=await t.createTableRows(e,s,n);return A(a,h,u,r)},async createTask(e,s){let n=await t.createTask(e,s);return A(n,h,u,r)},async createUser(e,s){let n=await t.createUser(e,s);return A(n,h,u,r)},async createWorkspace(e,s){let n=await t.createWorkspace(e,s);return A(n,h,u,r)},async createWorkspaceMember(e,s){let n=await t.createWorkspaceMember(e,s);return A(n,h,u,r)},async deleteBot(e,s){let n=await t.deleteBot(e,s);return A(n,h,u,r)},async deleteBotIssue(e,s,n){let a=await t.deleteBotIssue(e,s,n);return A(a,h,u,r)},async deleteConversation(e,s){let n=await t.deleteConversation(e,s);return A(n,h,u,r)},async deleteFile(e,s){let n=await t.deleteFile(e,s);return A(n,h,u,r)},async deleteIntegration(e,s){let n=await t.deleteIntegration(e,s);return A(n,h,u,r)},async deleteIntegrationApiKey(e,s){let n=await t.deleteIntegrationApiKey(e,s);return A(n,h,u,r)},async deleteMessage(e,s){let n=await t.deleteMessage(e,s);return A(n,h,u,r)},async deletePersonalAccessToken(e,s){let n=await t.deletePersonalAccessToken(e,s);return A(n,h,u,r)},async deleteTable(e,s){let n=await t.deleteTable(e,s);return A(n,h,u,r)},async deleteTableRows(e,s,n){let a=await t.deleteTableRows(e,s,n);return A(a,h,u,r)},async deleteTask(e,s){let n=await t.deleteTask(e,s);return A(n,h,u,r)},async deleteUser(e,s){let n=await t.deleteUser(e,s);return A(n,h,u,r)},async deleteWorkspace(e,s){let n=await t.deleteWorkspace(e,s);return A(n,h,u,r)},async deleteWorkspaceMember(e,s){let n=await t.deleteWorkspaceMember(e,s);return A(n,h,u,r)},async duplicateTable(e,s,n){let a=await t.duplicateTable(e,s,n);return A(a,h,u,r)},async findTableRows(e,s,n){let a=await t.findTableRows(e,s,n);return A(a,h,u,r)},async getAccount(e){let s=await t.getAccount(e);return A(s,h,u,r)},async getAccountPreference(e,s){let n=await t.getAccountPreference(e,s);return A(n,h,u,r)},async getAllWorkspaceQuotaCompletion(e){let s=await t.getAllWorkspaceQuotaCompletion(e);return A(s,h,u,r)},async getAuditRecords(e,s,n){let a=await t.getAuditRecords(e,s,n);return A(a,h,u,r)},async getBot(e,s){let n=await t.getBot(e,s);return A(n,h,u,r)},async getBotAnalytics(e,s,n,a){let o=await t.getBotAnalytics(e,s,n,a);return A(o,h,u,r)},async getBotLogs(e,s,n,a,o){let i=await t.getBotLogs(e,s,n,a,o);return A(i,h,u,r)},async getBotWebchat(e,s,n){let a=await t.getBotWebchat(e,s,n);return A(a,h,u,r)},async getConversation(e,s){let n=await t.getConversation(e,s);return A(n,h,u,r)},async getEvent(e,s){let n=await t.getEvent(e,s);return A(n,h,u,r)},async getFile(e,s){let n=await t.getFile(e,s);return A(n,h,u,r)},async getIntegration(e,s){let n=await t.getIntegration(e,s);return A(n,h,u,r)},async getIntegrationByName(e,s,n){let a=await t.getIntegrationByName(e,s,n);return A(a,h,u,r)},async getIntegrationLogs(e,s,n,a,o){let i=await t.getIntegrationLogs(e,s,n,a,o);return A(i,h,u,r)},async getMessage(e,s){let n=await t.getMessage(e,s);return A(n,h,u,r)},async getOrCreateConversation(e,s){let n=await t.getOrCreateConversation(e,s);return A(n,h,u,r)},async getOrCreateMessage(e,s){let n=await t.getOrCreateMessage(e,s);return A(n,h,u,r)},async getOrCreateTable(e,s,n){let a=await t.getOrCreateTable(e,s,n);return A(a,h,u,r)},async getOrCreateUser(e,s){let n=await t.getOrCreateUser(e,s);return A(n,h,u,r)},async getOrSetState(e,s,n,a,o){let i=await t.getOrSetState(e,s,n,a,o);return A(i,h,u,r)},async getParticipant(e,s,n){let a=await t.getParticipant(e,s,n);return A(a,h,u,r)},async getPublicIntegration(e,s,n){let a=await t.getPublicIntegration(e,s,n);return A(a,h,u,r)},async getPublicIntegrationById(e,s){let n=await t.getPublicIntegrationById(e,s);return A(n,h,u,r)},async getPublicWorkspace(e,s){let n=await t.getPublicWorkspace(e,s);return A(n,h,u,r)},async getState(e,s,n,a){let o=await t.getState(e,s,n,a);return A(o,h,u,r)},async getTable(e,s){let n=await t.getTable(e,s);return A(n,h,u,r)},async getTableRow(e,s,n){let a=await t.getTableRow(e,s,n);return A(a,h,u,r)},async getTask(e,s){let n=await t.getTask(e,s);return A(n,h,u,r)},async getUpcomingInvoice(e,s){let n=await t.getUpcomingInvoice(e,s);return A(n,h,u,r)},async getUsage(e,s,n,a){let o=await t.getUsage(e,s,n,a);return A(o,h,u,r)},async getUser(e,s){let n=await t.getUser(e,s);return A(n,h,u,r)},async getWorkspace(e,s){let n=await t.getWorkspace(e,s);return A(n,h,u,r)},async getWorkspaceMember(e){let s=await t.getWorkspaceMember(e);return A(s,h,u,r)},async getWorkspaceQuota(e,s,n,a){let o=await t.getWorkspaceQuota(e,s,n,a);return A(o,h,u,r)},async introspect(e,s){let n=await t.introspect(e,s);return A(n,h,u,r)},async listActivities(e,s,n,a){let o=await t.listActivities(e,s,n,a);return A(o,h,u,r)},async listBotIssueEvents(e,s,n){let a=await t.listBotIssueEvents(e,s,n);return A(a,h,u,r)},async listBotIssues(e,s,n){let a=await t.listBotIssues(e,s,n);return A(a,h,u,r)},async listBots(e,s,n){let a=await t.listBots(e,s,n);return A(a,h,u,r)},async listConversations(e,s,n,a,o){let i=await t.listConversations(e,s,n,a,o);return A(i,h,u,r)},async listEvents(e,s,n,a,o,i,l){let c=await t.listEvents(e,s,n,a,o,i,l);return A(c,h,u,r)},async listFiles(e,s,n){let a=await t.listFiles(e,s,n);return A(a,h,u,r)},async listIntegrationApiKeys(e,s){let n=await t.listIntegrationApiKeys(e,s);return A(n,h,u,r)},async listIntegrations(e,s,n,a,o){let i=await t.listIntegrations(e,s,n,a,o);return A(i,h,u,r)},async listMessages(e,s,n,a){let o=await t.listMessages(e,s,n,a);return A(o,h,u,r)},async listParticipants(e,s,n){let a=await t.listParticipants(e,s,n);return A(a,h,u,r)},async listPersonalAccessTokens(e){let s=await t.listPersonalAccessTokens(e);return A(s,h,u,r)},async listPublicIntegrations(e,s,n,a){let o=await t.listPublicIntegrations(e,s,n,a);return A(o,h,u,r)},async listTables(e,s){let n=await t.listTables(e,s);return A(n,h,u,r)},async listTasks(e,s,n,a,o,i,l,c){let p=await t.listTasks(e,s,n,a,o,i,l,c);return A(p,h,u,r)},async listUsageHistory(e,s,n){let a=await t.listUsageHistory(e,s,n);return A(a,h,u,r)},async listUsers(e,s,n,a){let o=await t.listUsers(e,s,n,a);return A(o,h,u,r)},async listWorkspaceInvoices(e,s){let n=await t.listWorkspaceInvoices(e,s);return A(n,h,u,r)},async listWorkspaceMembers(e,s){let n=await t.listWorkspaceMembers(e,s);return A(n,h,u,r)},async listWorkspaceQuotas(e,s,n){let a=await t.listWorkspaceQuotas(e,s,n);return A(a,h,u,r)},async listWorkspaceUsages(e,s,n,a){let o=await t.listWorkspaceUsages(e,s,n,a);return A(o,h,u,r)},async listWorkspaces(e,s){let n=await t.listWorkspaces(e,s);return A(n,h,u,r)},async patchState(e,s,n,a,o){let i=await t.patchState(e,s,n,a,o);return A(i,h,u,r)},async removeParticipant(e,s,n){let a=await t.removeParticipant(e,s,n);return A(a,h,u,r)},async renameTableColumn(e,s,n){let a=await t.renameTableColumn(e,s,n);return A(a,h,u,r)},async runVrl(e,s){let n=await t.runVrl(e,s);return A(n,h,u,r)},async searchFiles(e,s,n,a,o){let i=await t.searchFiles(e,s,n,a,o);return A(i,h,u,r)},async setAccountPreference(e,s,n){let a=await t.setAccountPreference(e,s,n);return A(a,h,u,r)},async setState(e,s,n,a,o){let i=await t.setState(e,s,n,a,o);return A(i,h,u,r)},async setWorkspacePaymentMethod(e,s,n){let a=await t.setWorkspacePaymentMethod(e,s,n);return A(a,h,u,r)},async trackAnalytics(e,s){let n=await t.trackAnalytics(e,s);return A(n,h,u,r)},async transferBot(e,s,n){let a=await t.transferBot(e,s,n);return A(a,h,u,r)},async updateAccount(e,s){let n=await t.updateAccount(e,s);return A(n,h,u,r)},async updateBot(e,s,n){let a=await t.updateBot(e,s,n);return A(a,h,u,r)},async updateConversation(e,s,n){let a=await t.updateConversation(e,s,n);return A(a,h,u,r)},async updateFile(e,s,n){let a=await t.updateFile(e,s,n);return A(a,h,u,r)},async updateIntegration(e,s,n){let a=await t.updateIntegration(e,s,n);return A(a,h,u,r)},async updateMessage(e,s,n){let a=await t.updateMessage(e,s,n);return A(a,h,u,r)},async updateTable(e,s,n){let a=await t.updateTable(e,s,n);return A(a,h,u,r)},async updateTableRows(e,s,n){let a=await t.updateTableRows(e,s,n);return A(a,h,u,r)},async updateTask(e,s,n){let a=await t.updateTask(e,s,n);return A(a,h,u,r)},async updateUser(e,s,n){let a=await t.updateUser(e,s,n);return A(a,h,u,r)},async updateWorkspace(e,s,n){let a=await t.updateWorkspace(e,s,n);return A(a,h,u,r)},async updateWorkspaceMember(e,s,n){let a=await t.updateWorkspaceMember(e,s,n);return A(a,h,u,r)},async upsertTableRows(e,s,n){let a=await t.upsertTableRows(e,s,n);return A(a,h,u,r)}}};var U=class extends k{addParticipant(t,e){return R(this.configuration).addParticipant(t.id,t.addParticipantBody,e).then(s=>s(this.axios,this.basePath))}breakDownWorkspaceUsageByBot(t,e){return R(this.configuration).breakDownWorkspaceUsageByBot(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}callAction(t={},e){return R(this.configuration).callAction(t.callActionBody,e).then(s=>s(this.axios,this.basePath))}changeAISpendQuota(t={},e){return R(this.configuration).changeAISpendQuota(t.changeAISpendQuotaBody,e).then(s=>s(this.axios,this.basePath))}chargeWorkspaceUnpaidInvoices(t,e){return R(this.configuration).chargeWorkspaceUnpaidInvoices(t.id,t.chargeWorkspaceUnpaidInvoicesBody,e).then(s=>s(this.axios,this.basePath))}checkHandleAvailability(t={},e){return R(this.configuration).checkHandleAvailability(t.checkHandleAvailabilityBody,e).then(s=>s(this.axios,this.basePath))}configureIntegration(t={},e){return R(this.configuration).configureIntegration(t.configureIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createBot(t={},e){return R(this.configuration).createBot(t.createBotBody,e).then(s=>s(this.axios,this.basePath))}createConversation(t={},e){return R(this.configuration).createConversation(t.createConversationBody,e).then(s=>s(this.axios,this.basePath))}createEvent(t={},e){return R(this.configuration).createEvent(t.createEventBody,e).then(s=>s(this.axios,this.basePath))}createFile(t={},e){return R(this.configuration).createFile(t.createFileBody,e).then(s=>s(this.axios,this.basePath))}createIntegration(t={},e){return R(this.configuration).createIntegration(t.createIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createIntegrationApiKey(t={},e){return R(this.configuration).createIntegrationApiKey(t.createIntegrationApiKeyBody,e).then(s=>s(this.axios,this.basePath))}createMessage(t={},e){return R(this.configuration).createMessage(t.createMessageBody,e).then(s=>s(this.axios,this.basePath))}createPersonalAccessToken(t={},e){return R(this.configuration).createPersonalAccessToken(t.createPersonalAccessTokenBody,e).then(s=>s(this.axios,this.basePath))}createTable(t={},e){return R(this.configuration).createTable(t.createTableBody,e).then(s=>s(this.axios,this.basePath))}createTableRows(t,e){return R(this.configuration).createTableRows(t.table,t.createTableRowsBody,e).then(s=>s(this.axios,this.basePath))}createTask(t={},e){return R(this.configuration).createTask(t.createTaskBody,e).then(s=>s(this.axios,this.basePath))}createUser(t={},e){return R(this.configuration).createUser(t.createUserBody,e).then(s=>s(this.axios,this.basePath))}createWorkspace(t={},e){return R(this.configuration).createWorkspace(t.createWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}createWorkspaceMember(t={},e){return R(this.configuration).createWorkspaceMember(t.createWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}deleteBot(t,e){return R(this.configuration).deleteBot(t.id,e).then(s=>s(this.axios,this.basePath))}deleteBotIssue(t,e){return R(this.configuration).deleteBotIssue(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}deleteConversation(t,e){return R(this.configuration).deleteConversation(t.id,e).then(s=>s(this.axios,this.basePath))}deleteFile(t,e){return R(this.configuration).deleteFile(t.id,e).then(s=>s(this.axios,this.basePath))}deleteIntegration(t,e){return R(this.configuration).deleteIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}deleteIntegrationApiKey(t,e){return R(this.configuration).deleteIntegrationApiKey(t.id,e).then(s=>s(this.axios,this.basePath))}deleteMessage(t,e){return R(this.configuration).deleteMessage(t.id,e).then(s=>s(this.axios,this.basePath))}deletePersonalAccessToken(t,e){return R(this.configuration).deletePersonalAccessToken(t.id,e).then(s=>s(this.axios,this.basePath))}deleteTable(t,e){return R(this.configuration).deleteTable(t.table,e).then(s=>s(this.axios,this.basePath))}deleteTableRows(t,e){return R(this.configuration).deleteTableRows(t.table,t.deleteTableRowsBody,e).then(s=>s(this.axios,this.basePath))}deleteTask(t,e){return R(this.configuration).deleteTask(t.id,e).then(s=>s(this.axios,this.basePath))}deleteUser(t,e){return R(this.configuration).deleteUser(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspace(t,e){return R(this.configuration).deleteWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspaceMember(t,e){return R(this.configuration).deleteWorkspaceMember(t.id,e).then(s=>s(this.axios,this.basePath))}duplicateTable(t,e){return R(this.configuration).duplicateTable(t.sourceTableId,t.duplicateTableBody,e).then(s=>s(this.axios,this.basePath))}findTableRows(t,e){return R(this.configuration).findTableRows(t.table,t.findTableRowsBody,e).then(s=>s(this.axios,this.basePath))}getAccount(t){return R(this.configuration).getAccount(t).then(e=>e(this.axios,this.basePath))}getAccountPreference(t,e){return R(this.configuration).getAccountPreference(t.key,e).then(s=>s(this.axios,this.basePath))}getAllWorkspaceQuotaCompletion(t){return R(this.configuration).getAllWorkspaceQuotaCompletion(t).then(e=>e(this.axios,this.basePath))}getAuditRecords(t,e){return R(this.configuration).getAuditRecords(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBot(t,e){return R(this.configuration).getBot(t.id,e).then(s=>s(this.axios,this.basePath))}getBotAnalytics(t,e){return R(this.configuration).getBotAnalytics(t.id,t.startDate,t.endDate,e).then(s=>s(this.axios,this.basePath))}getBotLogs(t,e){return R(this.configuration).getBotLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBotWebchat(t,e){return R(this.configuration).getBotWebchat(t.id,t.type,e).then(s=>s(this.axios,this.basePath))}getConversation(t,e){return R(this.configuration).getConversation(t.id,e).then(s=>s(this.axios,this.basePath))}getEvent(t,e){return R(this.configuration).getEvent(t.id,e).then(s=>s(this.axios,this.basePath))}getFile(t,e){return R(this.configuration).getFile(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegration(t,e){return R(this.configuration).getIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegrationByName(t,e){return R(this.configuration).getIntegrationByName(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getIntegrationLogs(t,e){return R(this.configuration).getIntegrationLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getMessage(t,e){return R(this.configuration).getMessage(t.id,e).then(s=>s(this.axios,this.basePath))}getOrCreateConversation(t={},e){return R(this.configuration).getOrCreateConversation(t.getOrCreateConversationBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateMessage(t={},e){return R(this.configuration).getOrCreateMessage(t.getOrCreateMessageBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateTable(t,e){return R(this.configuration).getOrCreateTable(t.table,t.getOrCreateTableBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateUser(t={},e){return R(this.configuration).getOrCreateUser(t.getOrCreateUserBody,e).then(s=>s(this.axios,this.basePath))}getOrSetState(t,e){return R(this.configuration).getOrSetState(t.type,t.id,t.name,t.getOrSetStateBody,e).then(s=>s(this.axios,this.basePath))}getParticipant(t,e){return R(this.configuration).getParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}getPublicIntegration(t,e){return R(this.configuration).getPublicIntegration(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getPublicIntegrationById(t,e){return R(this.configuration).getPublicIntegrationById(t.id,e).then(s=>s(this.axios,this.basePath))}getPublicWorkspace(t,e){return R(this.configuration).getPublicWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}getState(t,e){return R(this.configuration).getState(t.type,t.id,t.name,e).then(s=>s(this.axios,this.basePath))}getTable(t,e){return R(this.configuration).getTable(t.table,e).then(s=>s(this.axios,this.basePath))}getTableRow(t,e){return R(this.configuration).getTableRow(t.table,t.id,e).then(s=>s(this.axios,this.basePath))}getTask(t,e){return R(this.configuration).getTask(t.id,e).then(s=>s(this.axios,this.basePath))}getUpcomingInvoice(t,e){return R(this.configuration).getUpcomingInvoice(t.id,e).then(s=>s(this.axios,this.basePath))}getUsage(t,e){return R(this.configuration).getUsage(t.type,t.id,t.period,e).then(s=>s(this.axios,this.basePath))}getUser(t,e){return R(this.configuration).getUser(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspace(t,e){return R(this.configuration).getWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspaceMember(t){return R(this.configuration).getWorkspaceMember(t).then(e=>e(this.axios,this.basePath))}getWorkspaceQuota(t,e){return R(this.configuration).getWorkspaceQuota(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}introspect(t={},e){return R(this.configuration).introspect(t.introspectBody,e).then(s=>s(this.axios,this.basePath))}listActivities(t,e){return R(this.configuration).listActivities(t.taskId,t.botId,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listBotIssueEvents(t,e){return R(this.configuration).listBotIssueEvents(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}listBotIssues(t,e){return R(this.configuration).listBotIssues(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listBots(t={},e){return R(this.configuration).listBots(t.dev,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listConversations(t={},e){return R(this.configuration).listConversations(t.nextToken,t.tags,t.participantIds,t.integrationName,e).then(s=>s(this.axios,this.basePath))}listEvents(t={},e){return R(this.configuration).listEvents(t.nextToken,t.type,t.conversationId,t.userId,t.messageId,t.status,e).then(s=>s(this.axios,this.basePath))}listFiles(t={},e){return R(this.configuration).listFiles(t.nextToken,t.tags,e).then(s=>s(this.axios,this.basePath))}listIntegrationApiKeys(t,e){return R(this.configuration).listIntegrationApiKeys(t.integrationId,e).then(s=>s(this.axios,this.basePath))}listIntegrations(t={},e){return R(this.configuration).listIntegrations(t.nextToken,t.name,t.version,t.dev,e).then(s=>s(this.axios,this.basePath))}listMessages(t={},e){return R(this.configuration).listMessages(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listParticipants(t,e){return R(this.configuration).listParticipants(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listPersonalAccessTokens(t){return R(this.configuration).listPersonalAccessTokens(t).then(e=>e(this.axios,this.basePath))}listPublicIntegrations(t={},e){return R(this.configuration).listPublicIntegrations(t.nextToken,t.name,t.version,e).then(s=>s(this.axios,this.basePath))}listTables(t={},e){return R(this.configuration).listTables(t.tags,e).then(s=>s(this.axios,this.basePath))}listTasks(t={},e){return R(this.configuration).listTasks(t.nextToken,t.tags,t.conversationId,t.userId,t.parentTaskId,t.status,t.type,e).then(s=>s(this.axios,this.basePath))}listUsageHistory(t,e){return R(this.configuration).listUsageHistory(t.type,t.id,e).then(s=>s(this.axios,this.basePath))}listUsers(t={},e){return R(this.configuration).listUsers(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listWorkspaceInvoices(t,e){return R(this.configuration).listWorkspaceInvoices(t.id,e).then(s=>s(this.axios,this.basePath))}listWorkspaceMembers(t={},e){return R(this.configuration).listWorkspaceMembers(t.nextToken,e).then(s=>s(this.axios,this.basePath))}listWorkspaceQuotas(t,e){return R(this.configuration).listWorkspaceQuotas(t.id,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaceUsages(t,e){return R(this.configuration).listWorkspaceUsages(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaces(t={},e){return R(this.configuration).listWorkspaces(t.nextToken,e).then(s=>s(this.axios,this.basePath))}patchState(t,e){return R(this.configuration).patchState(t.type,t.id,t.name,t.patchStateBody,e).then(s=>s(this.axios,this.basePath))}removeParticipant(t,e){return R(this.configuration).removeParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}renameTableColumn(t,e){return R(this.configuration).renameTableColumn(t.table,t.renameTableColumnBody,e).then(s=>s(this.axios,this.basePath))}runVrl(t={},e){return R(this.configuration).runVrl(t.runVrlBody,e).then(s=>s(this.axios,this.basePath))}searchFiles(t,e){return R(this.configuration).searchFiles(t.query,t.tags,t.contextDepth,t.limit,e).then(s=>s(this.axios,this.basePath))}setAccountPreference(t,e){return R(this.configuration).setAccountPreference(t.key,t.setAccountPreferenceBody,e).then(s=>s(this.axios,this.basePath))}setState(t,e){return R(this.configuration).setState(t.type,t.id,t.name,t.setStateBody,e).then(s=>s(this.axios,this.basePath))}setWorkspacePaymentMethod(t,e){return R(this.configuration).setWorkspacePaymentMethod(t.id,t.setWorkspacePaymentMethodBody,e).then(s=>s(this.axios,this.basePath))}trackAnalytics(t={},e){return R(this.configuration).trackAnalytics(t.trackAnalyticsBody,e).then(s=>s(this.axios,this.basePath))}transferBot(t,e){return R(this.configuration).transferBot(t.id,t.transferBotBody,e).then(s=>s(this.axios,this.basePath))}updateAccount(t={},e){return R(this.configuration).updateAccount(t.updateAccountBody,e).then(s=>s(this.axios,this.basePath))}updateBot(t,e){return R(this.configuration).updateBot(t.id,t.updateBotBody,e).then(s=>s(this.axios,this.basePath))}updateConversation(t,e){return R(this.configuration).updateConversation(t.id,t.updateConversationBody,e).then(s=>s(this.axios,this.basePath))}updateFile(t,e){return R(this.configuration).updateFile(t.id,t.updateFileBody,e).then(s=>s(this.axios,this.basePath))}updateIntegration(t,e){return R(this.configuration).updateIntegration(t.id,t.updateIntegrationBody,e).then(s=>s(this.axios,this.basePath))}updateMessage(t,e){return R(this.configuration).updateMessage(t.id,t.updateMessageBody,e).then(s=>s(this.axios,this.basePath))}updateTable(t,e){return R(this.configuration).updateTable(t.table,t.updateTableBody,e).then(s=>s(this.axios,this.basePath))}updateTableRows(t,e){return R(this.configuration).updateTableRows(t.table,t.updateTableRowsBody,e).then(s=>s(this.axios,this.basePath))}updateTask(t,e){return R(this.configuration).updateTask(t.id,t.updateTaskBody,e).then(s=>s(this.axios,this.basePath))}updateUser(t,e){return R(this.configuration).updateUser(t.id,t.updateUserBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspace(t,e){return R(this.configuration).updateWorkspace(t.id,t.updateWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspaceMember(t,e){return R(this.configuration).updateWorkspaceMember(t.id,t.updateWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}upsertTableRows(t,e){return R(this.configuration).upsertTableRows(t.table,t.upsertTableRowsBody,e).then(s=>s(this.axios,this.basePath))}};import Se from"crypto";var We={getRandomValues:r=>new Uint8Array(r.map(()=>Math.floor(Math.random()*256)))},D=typeof window<"u"&&typeof window.document<"u"?window.crypto:Se;D.getRandomValues||(D=We);var P=class extends Error{constructor(e,s,n,a,o,i){super(a);this.code=e;this.description=s;this.type=n;this.message=a;this.error=o;this.id=i;this.id||(this.id=P.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let e=this.getPrefix(),s=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,a=Array.from(D.getRandomValues(new Uint8Array(n))).map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase();return`${e}_${s}x${a}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Ge=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,pe=r=>r instanceof P||Ge(r)&&r.isApiError===!0,B=class extends P{constructor(t,e,s){super(500,"An unknown error occurred","Unknown",t,e,s)}},O=class extends P{constructor(t,e,s){super(500,"An internal error occurred","Internal",t,e,s)}},E=class extends P{constructor(t,e,s){super(401,"The request requires to be authenticated.","Unauthorized",t,e,s)}},w=class extends P{constructor(t,e,s){super(403,"The requested action can't be peform by this resource.","Forbidden",t,e,s)}},S=class extends P{constructor(t,e,s){super(413,"The request payload is too large.","PayloadTooLarge",t,e,s)}},W=class extends P{constructor(t,e,s){super(400,"The request payload is invalid.","InvalidPayload",t,e,s)}},G=class extends P{constructor(t,e,s){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,e,s)}},M=class extends P{constructor(t,e,s){super(405,"The requested method does not exist.","MethodNotFound",t,e,s)}},L=class extends P{constructor(t,e,s){super(404,"The requested resource does not exist.","ResourceNotFound",t,e,s)}},F=class extends P{constructor(t,e,s){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,e,s)}},_=class extends P{constructor(t,e,s){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,e,s)}},Q=class extends P{constructor(t,e,s){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,e,s)}},N=class extends P{constructor(t,e,s){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,e,s)}},j=class extends P{constructor(t,e,s){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,e,s)}},H=class extends P{constructor(t,e,s){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,e,s)}},K=class extends P{constructor(t,e,s){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,e,s)}},$=class extends P{constructor(t,e,s){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,e,s)}},z=class extends P{constructor(t,e,s){super(409,"The record attempted to be created already exists.","AlreadyExists",t,e,s)}},J=class extends P{constructor(t,e,s){super(429,"The request has been rate limited.","RateLimited",t,e,s)}},X=class extends P{constructor(t,e,s){super(402,"A payment is required to perform this request.","PaymentRequired",t,e,s)}},Y=class extends P{constructor(t,e,s){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,e,s)}},Z=class extends P{constructor(t,e,s){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,e,s)}},ee=class extends P{constructor(t,e,s){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,e,s)}},Me={Unknown:B,Internal:O,Unauthorized:E,Forbidden:w,PayloadTooLarge:S,InvalidPayload:W,UnsupportedMediaType:G,MethodNotFound:M,ResourceNotFound:L,InvalidJsonSchema:F,InvalidDataFormat:_,InvalidIdentifier:Q,RelationConflict:N,ReferenceConstraint:j,ReferenceNotFound:H,InvalidQuery:K,Runtime:$,AlreadyExists:z,RateLimited:J,PaymentRequired:X,QuotaExceeded:Y,LimitExceeded:Z,BreakingChanges:ee},te=r=>pe(r)?r:r instanceof Error?new B(r.message,r):typeof r=="string"?new B(r):Le(r);function Le(r){if(typeof r=="object"&&"code"in r&&"type"in r&&"id"in r&&"message"in r&&typeof r.type=="string"&&typeof r.message=="string"){let t=Me[r.type];return t?new t(r.message,void 0,r.id||"UNKNOWN"):new B(`An unclassified API error occurred: ${r.message} (Type: ${r.type}, Code: ${r.code})`)}return new B("An invalid error occurred: "+JSON.stringify(r))}var V=class{_innerClient;constructor(t,e,s){this._innerClient=new U(t,e,s)}createConversation=t=>this._innerClient.createConversation({createConversationBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getConversation=t=>this._innerClient.getConversation(t).then(e=>e.data).catch(e=>{throw m(e)});listConversations=t=>this._innerClient.listConversations(t).then(e=>e.data).catch(e=>{throw m(e)});getOrCreateConversation=t=>this._innerClient.getOrCreateConversation({getOrCreateConversationBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateConversation=({id:t,...e})=>this._innerClient.updateConversation({id:t,updateConversationBody:e}).then(s=>s.data).catch(s=>{throw m(s)});deleteConversation=t=>this._innerClient.deleteConversation(t).then(e=>e.data).catch(e=>{throw m(e)});listParticipants=t=>this._innerClient.listParticipants(t).then(e=>e.data).catch(e=>{throw m(e)});addParticipant=({id:t,...e})=>this._innerClient.addParticipant({id:t,addParticipantBody:e}).then(s=>s.data).catch(s=>{throw m(s)});getParticipant=t=>this._innerClient.getParticipant(t).then(e=>e.data).catch(e=>{throw m(e)});removeParticipant=t=>this._innerClient.removeParticipant(t).then(e=>e.data).catch(e=>{throw m(e)});createEvent=t=>this._innerClient.createEvent({createEventBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getEvent=t=>this._innerClient.getEvent(t).then(e=>e.data).catch(e=>{throw m(e)});listEvents=t=>this._innerClient.listEvents(t).then(e=>e.data).catch(e=>{throw m(e)});createMessage=t=>this._innerClient.createMessage({createMessageBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getOrCreateMessage=t=>this._innerClient.getOrCreateMessage({getOrCreateMessageBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getMessage=t=>this._innerClient.getMessage(t).then(e=>e.data).catch(e=>{throw m(e)});updateMessage=({id:t,...e})=>this._innerClient.updateMessage({id:t,updateMessageBody:e}).then(s=>s.data).catch(s=>{throw m(s)});listMessages=t=>this._innerClient.listMessages(t).then(e=>e.data).catch(e=>{throw m(e)});deleteMessage=t=>this._innerClient.deleteMessage(t).then(e=>e.data).catch(e=>{throw m(e)});createUser=t=>this._innerClient.createUser({createUserBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getUser=t=>this._innerClient.getUser(t).then(e=>e.data).catch(e=>{throw m(e)});listUsers=t=>this._innerClient.listUsers(t).then(e=>e.data).catch(e=>{throw m(e)});getOrCreateUser=t=>this._innerClient.getOrCreateUser({getOrCreateUserBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateUser=({id:t,...e})=>this._innerClient.updateUser({id:t,updateUserBody:e}).then(s=>s.data).catch(s=>{throw m(s)});deleteUser=t=>this._innerClient.deleteUser(t).then(e=>e.data).catch(e=>{throw m(e)});getState=t=>this._innerClient.getState(t).then(e=>e.data).catch(e=>{throw m(e)});setState=({type:t,id:e,name:s,...n})=>this._innerClient.setState({type:t,id:e,name:s,setStateBody:n}).then(a=>a.data).catch(a=>{throw m(a)});getOrSetState=({type:t,id:e,name:s,...n})=>this._innerClient.getOrSetState({type:t,id:e,name:s,getOrSetStateBody:n}).then(a=>a.data).catch(a=>{throw m(a)});patchState=({type:t,id:e,name:s,...n})=>this._innerClient.patchState({type:t,id:e,name:s,patchStateBody:n}).then(a=>a.data).catch(a=>{throw m(a)});callAction=t=>this._innerClient.callAction({callActionBody:t}).then(e=>e.data).catch(e=>{throw m(e)});configureIntegration=t=>this._innerClient.configureIntegration({configureIntegrationBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getTask=t=>this._innerClient.getTask(t).then(e=>e.data).catch(e=>{throw m(e)});createTask=t=>this._innerClient.createTask({createTaskBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateTask=({id:t,...e})=>this._innerClient.updateTask({id:t,updateTaskBody:e}).then(s=>s.data).catch(s=>{throw m(s)});deleteTask=t=>this._innerClient.deleteTask(t).then(e=>e.data).catch(e=>{throw m(e)});listTasks=t=>this._innerClient.listTasks(t).then(e=>e.data).catch(e=>{throw m(e)});trackAnalytics=t=>this._innerClient.trackAnalytics({trackAnalyticsBody:t}).then(e=>e.data).catch(e=>{throw m(e)});runVrl=t=>this._innerClient.runVrl({runVrlBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getAccount=()=>this._innerClient.getAccount().then(t=>t.data).catch(t=>{throw m(t)});updateAccount=t=>this._innerClient.updateAccount({updateAccountBody:t}).then(e=>e.data).catch(e=>{throw m(e)});listPersonalAccessTokens=()=>this._innerClient.listPersonalAccessTokens().then(t=>t.data).catch(t=>{throw m(t)});createPersonalAccessToken=t=>this._innerClient.createPersonalAccessToken({createPersonalAccessTokenBody:t}).then(e=>e.data).catch(e=>{throw m(e)});deletePersonalAccessToken=t=>this._innerClient.deletePersonalAccessToken(t).then(e=>e.data).catch(e=>{throw m(e)});setAccountPreference=({key:t,...e})=>this._innerClient.setAccountPreference({key:t,setAccountPreferenceBody:e}).then(s=>s.data).catch(s=>{throw m(s)});getAccountPreference=t=>this._innerClient.getAccountPreference(t).then(e=>e.data).catch(e=>{throw m(e)});listPublicIntegrations=t=>this._innerClient.listPublicIntegrations(t).then(e=>e.data).catch(e=>{throw m(e)});getPublicIntegrationById=t=>this._innerClient.getPublicIntegrationById(t).then(e=>e.data).catch(e=>{throw m(e)});getPublicIntegration=t=>this._innerClient.getPublicIntegration(t).then(e=>e.data).catch(e=>{throw m(e)});createBot=t=>this._innerClient.createBot({createBotBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateBot=({id:t,...e})=>this._innerClient.updateBot({id:t,updateBotBody:e}).then(s=>s.data).catch(s=>{throw m(s)});transferBot=({id:t,...e})=>this._innerClient.transferBot({id:t,transferBotBody:e}).then(s=>s.data).catch(s=>{throw m(s)});listBots=t=>this._innerClient.listBots(t).then(e=>e.data).catch(e=>{throw m(e)});getBot=t=>this._innerClient.getBot(t).then(e=>e.data).catch(e=>{throw m(e)});deleteBot=t=>this._innerClient.deleteBot(t).then(e=>e.data).catch(e=>{throw m(e)});getBotLogs=t=>this._innerClient.getBotLogs(t).then(e=>e.data).catch(e=>{throw m(e)});getBotWebchat=t=>this._innerClient.getBotWebchat(t).then(e=>e.data).catch(e=>{throw m(e)});getBotAnalytics=t=>this._innerClient.getBotAnalytics(t).then(e=>e.data).catch(e=>{throw m(e)});listBotIssues=t=>this._innerClient.listBotIssues(t).then(e=>e.data).catch(e=>{throw m(e)});deleteBotIssue=t=>this._innerClient.deleteBotIssue(t).then(e=>e.data).catch(e=>{throw m(e)});listBotIssueEvents=t=>this._innerClient.listBotIssueEvents(t).then(e=>e.data).catch(e=>{throw m(e)});setWorkspacePaymentMethod=({id:t,...e})=>this._innerClient.setWorkspacePaymentMethod({id:t,setWorkspacePaymentMethodBody:e}).then(s=>s.data).catch(s=>{throw m(s)});listWorkspaceInvoices=t=>this._innerClient.listWorkspaceInvoices(t).then(e=>e.data).catch(e=>{throw m(e)});getUpcomingInvoice=t=>this._innerClient.getUpcomingInvoice(t).then(e=>e.data).catch(e=>{throw m(e)});chargeWorkspaceUnpaidInvoices=({id:t,...e})=>this._innerClient.chargeWorkspaceUnpaidInvoices({id:t,chargeWorkspaceUnpaidInvoicesBody:e}).then(s=>s.data).catch(s=>{throw m(s)});createWorkspace=t=>this._innerClient.createWorkspace({createWorkspaceBody:t}).then(e=>e.data).catch(e=>{throw m(e)});getPublicWorkspace=t=>this._innerClient.getPublicWorkspace(t).then(e=>e.data).catch(e=>{throw m(e)});getWorkspace=t=>this._innerClient.getWorkspace(t).then(e=>e.data).catch(e=>{throw m(e)});listWorkspaceUsages=t=>this._innerClient.listWorkspaceUsages(t).then(e=>e.data).catch(e=>{throw m(e)});breakDownWorkspaceUsageByBot=t=>this._innerClient.breakDownWorkspaceUsageByBot(t).then(e=>e.data).catch(e=>{throw m(e)});getAllWorkspaceQuotaCompletion=()=>this._innerClient.getAllWorkspaceQuotaCompletion().then(t=>t.data).catch(t=>{throw m(t)});getWorkspaceQuota=t=>this._innerClient.getWorkspaceQuota(t).then(e=>e.data).catch(e=>{throw m(e)});listWorkspaceQuotas=t=>this._innerClient.listWorkspaceQuotas(t).then(e=>e.data).catch(e=>{throw m(e)});updateWorkspace=({id:t,...e})=>this._innerClient.updateWorkspace({id:t,updateWorkspaceBody:e}).then(s=>s.data).catch(s=>{throw m(s)});checkHandleAvailability=t=>this._innerClient.checkHandleAvailability({checkHandleAvailabilityBody:t}).then(e=>e.data).catch(e=>{throw m(e)});listWorkspaces=t=>this._innerClient.listWorkspaces(t).then(e=>e.data).catch(e=>{throw m(e)});deleteWorkspace=t=>this._innerClient.deleteWorkspace(t).then(e=>e.data).catch(e=>{throw m(e)});getAuditRecords=t=>this._innerClient.getAuditRecords(t).then(e=>e.data).catch(e=>{throw m(e)});listWorkspaceMembers=t=>this._innerClient.listWorkspaceMembers(t).then(e=>e.data).catch(e=>{throw m(e)});getWorkspaceMember=()=>this._innerClient.getWorkspaceMember().then(t=>t.data).catch(t=>{throw m(t)});deleteWorkspaceMember=t=>this._innerClient.deleteWorkspaceMember(t).then(e=>e.data).catch(e=>{throw m(e)});createWorkspaceMember=t=>this._innerClient.createWorkspaceMember({createWorkspaceMemberBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateWorkspaceMember=({id:t,...e})=>this._innerClient.updateWorkspaceMember({id:t,updateWorkspaceMemberBody:e}).then(s=>s.data).catch(s=>{throw m(s)});listIntegrationApiKeys=t=>this._innerClient.listIntegrationApiKeys(t).then(e=>e.data).catch(e=>{throw m(e)});createIntegrationApiKey=t=>this._innerClient.createIntegrationApiKey({createIntegrationApiKeyBody:t}).then(e=>e.data).catch(e=>{throw m(e)});deleteIntegrationApiKey=t=>this._innerClient.deleteIntegrationApiKey(t).then(e=>e.data).catch(e=>{throw m(e)});createIntegration=t=>this._innerClient.createIntegration({createIntegrationBody:t}).then(e=>e.data).catch(e=>{throw m(e)});updateIntegration=({id:t,...e})=>this._innerClient.updateIntegration({id:t,updateIntegrationBody:e}).then(s=>s.data).catch(s=>{throw m(s)});listIntegrations=t=>this._innerClient.listIntegrations(t).then(e=>e.data).catch(e=>{throw m(e)});getIntegration=t=>this._innerClient.getIntegration(t).then(e=>e.data).catch(e=>{throw m(e)});getIntegrationLogs=t=>this._innerClient.getIntegrationLogs(t).then(e=>e.data).catch(e=>{throw m(e)});getIntegrationByName=t=>this._innerClient.getIntegrationByName(t).then(e=>e.data).catch(e=>{throw m(e)});deleteIntegration=t=>this._innerClient.deleteIntegration(t).then(e=>e.data).catch(e=>{throw m(e)});getUsage=t=>this._innerClient.getUsage(t).then(e=>e.data).catch(e=>{throw m(e)});listUsageHistory=t=>this._innerClient.listUsageHistory(t).then(e=>e.data).catch(e=>{throw m(e)});changeAISpendQuota=t=>this._innerClient.changeAISpendQuota({changeAISpendQuotaBody:t}).then(e=>e.data).catch(e=>{throw m(e)});listActivities=t=>this._innerClient.listActivities(t).then(e=>e.data).catch(e=>{throw m(e)});introspect=t=>this._innerClient.introspect({introspectBody:t}).then(e=>e.data).catch(e=>{throw m(e)});createFile=t=>this._innerClient.createFile({createFileBody:t}).then(e=>e.data).catch(e=>{throw m(e)});deleteFile=t=>this._innerClient.deleteFile(t).then(e=>e.data).catch(e=>{throw m(e)});listFiles=t=>this._innerClient.listFiles(t).then(e=>e.data).catch(e=>{throw m(e)});getFile=t=>this._innerClient.getFile(t).then(e=>e.data).catch(e=>{throw m(e)});updateFile=({id:t,...e})=>this._innerClient.updateFile({id:t,updateFileBody:e}).then(s=>s.data).catch(s=>{throw m(s)});searchFiles=t=>this._innerClient.searchFiles(t).then(e=>e.data).catch(e=>{throw m(e)});listTables=t=>this._innerClient.listTables(t).then(e=>e.data).catch(e=>{throw m(e)});getTable=t=>this._innerClient.getTable(t).then(e=>e.data).catch(e=>{throw m(e)});getOrCreateTable=({table:t,...e})=>this._innerClient.getOrCreateTable({table:t,getOrCreateTableBody:e}).then(s=>s.data).catch(s=>{throw m(s)});createTable=t=>this._innerClient.createTable({createTableBody:t}).then(e=>e.data).catch(e=>{throw m(e)});duplicateTable=({sourceTableId:t,...e})=>this._innerClient.duplicateTable({sourceTableId:t,duplicateTableBody:e}).then(s=>s.data).catch(s=>{throw m(s)});updateTable=({table:t,...e})=>this._innerClient.updateTable({table:t,updateTableBody:e}).then(s=>s.data).catch(s=>{throw m(s)});renameTableColumn=({table:t,...e})=>this._innerClient.renameTableColumn({table:t,renameTableColumnBody:e}).then(s=>s.data).catch(s=>{throw m(s)});deleteTable=t=>this._innerClient.deleteTable(t).then(e=>e.data).catch(e=>{throw m(e)});getTableRow=t=>this._innerClient.getTableRow(t).then(e=>e.data).catch(e=>{throw m(e)});findTableRows=({table:t,...e})=>this._innerClient.findTableRows({table:t,findTableRowsBody:e}).then(s=>s.data).catch(s=>{throw m(s)});createTableRows=({table:t,...e})=>this._innerClient.createTableRows({table:t,createTableRowsBody:e}).then(s=>s.data).catch(s=>{throw m(s)});deleteTableRows=({table:t,...e})=>this._innerClient.deleteTableRows({table:t,deleteTableRowsBody:e}).then(s=>s.data).catch(s=>{throw m(s)});updateTableRows=({table:t,...e})=>this._innerClient.updateTableRows({table:t,updateTableRowsBody:e}).then(s=>s.data).catch(s=>{throw m(s)});upsertTableRows=({table:t,...e})=>this._innerClient.upsertTableRows({table:t,upsertTableRowsBody:e}).then(s=>s.data).catch(s=>{throw m(s)})};function m(r){return Fe.isAxiosError(r)&&r.response?.data?te(r.response.data):te(r)}import*as La from"axios";var he=100*1024*1024,_e=he,Qe=he,de=class extends V{config;axiosClient;constructor(t={}){let e=ce(t),s=Ne(e);super(void 0,e.apiUrl,s),this.config=e,this.axiosClient=s}createAndUploadFile=async({name:t,data:e,index:s,tags:n,contentType:a,accessPolicies:o})=>{let{file:i}=await this.createFile({name:t,tags:n,index:s,accessPolicies:o,contentType:a,size:e.byteLength});try{await ge.put(i.uploadUrl,e,{maxBodyLength:1/0})}catch(l){throw new se(`Failed to upload file: ${l.message}`,l,i)}return await this.getFile({id:i.id})}},se=class extends Error{constructor(e,s,n){super(e);this.error=s;this.file=n;this.name="FileUploadError"}};function Ne(r){let{headers:t,withCredentials:e,timeout:s}=r;return ge.create({headers:t,withCredentials:e,timeout:s,maxBodyLength:_e,maxContentLength:Qe,httpAgent:ue?new ye.default.Agent({keepAlive:!0}):void 0,httpsAgent:ue?new Ae.default.Agent({keepAlive:!0}):void 0})}export{z as AlreadyExistsError,ee as BreakingChangesError,de as Client,se as FileUploadError,w as ForbiddenError,O as InternalError,_ as InvalidDataFormatError,Q as InvalidIdentifierError,F as InvalidJsonSchemaError,W as InvalidPayloadError,K as InvalidQueryError,Z as LimitExceededError,M as MethodNotFoundError,S as PayloadTooLargeError,X as PaymentRequiredError,Y as QuotaExceededError,J as RateLimitedError,j as ReferenceConstraintError,H as ReferenceNotFoundError,N as RelationConflictError,L as ResourceNotFoundError,$ as RuntimeError,E as UnauthorizedError,B as UnknownError,G as UnsupportedMediaTypeError,La as axios,te as errorFrom,pe as isApiError};
1
+ var gi=Object.create;var It=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var Ri=Object.getOwnPropertyNames;var mi=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var hi=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ri(t))!qi.call(e,o)&&o!==s&&It(e,o,{get:()=>t[o],enumerable:!(a=yi(t,o))||a.enumerable});return e};var Pe=(e,t,s)=>(s=e!=null?gi(mi(e)):{},hi(t||!e||!e.__esModule?It(s,"default",{value:e,enumerable:!0}):s,e));var kt=b(()=>{});var vt=b(()=>{});var Ct=b((Au,At)=>{"use strict";At.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),a=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;t[s]=o;for(s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var n=Object.getOwnPropertySymbols(t);if(n.length!==1||n[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,s);if(i.value!==o||i.enumerable!==!0)return!1}return!0}});var Gt=b((Cu,Ut)=>{"use strict";var Bt=typeof Symbol<"u"&&Symbol,Bi=Ct();Ut.exports=function(){return typeof Bt!="function"||typeof Symbol!="function"||typeof Bt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bi()}});var Wt=b((Bu,Lt)=>{"use strict";var wt={foo:{}},Ui=Object;Lt.exports=function(){return{__proto__:wt}.foo===wt.foo&&!({__proto__:null}instanceof Ui)}});var Qt=b((Uu,St)=>{"use strict";var Gi="Function.prototype.bind called on incompatible ",Te=Array.prototype.slice,wi=Object.prototype.toString,Li="[object Function]";St.exports=function(t){var s=this;if(typeof s!="function"||wi.call(s)!==Li)throw new TypeError(Gi+s);for(var a=Te.call(arguments,1),o,n=function(){if(this instanceof o){var l=s.apply(this,a.concat(Te.call(arguments)));return Object(l)===l?l:this}else return s.apply(t,a.concat(Te.call(arguments)))},i=Math.max(0,s.length-a.length),r=[],c=0;c<i;c++)r.push("$"+c);if(o=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")(n),s.prototype){var d=function(){};d.prototype=s.prototype,o.prototype=new d,d.prototype=null}return o}});var le=b((Gu,Dt)=>{"use strict";var Wi=Qt();Dt.exports=Function.prototype.bind||Wi});var Et=b((wu,Ht)=>{"use strict";var Si=le();Ht.exports=Si.call(Function.call,Object.prototype.hasOwnProperty)});var Re=b((Lu,Nt)=>{"use strict";var g,Y=SyntaxError,Ft=Function,X=TypeError,Ae=function(e){try{return Ft('"use strict"; return ('+e+").constructor;")()}catch{}},_=Object.getOwnPropertyDescriptor;if(_)try{_({},"")}catch{_=null}var Ce=function(){throw new X},Qi=_?function(){try{return arguments.callee,Ce}catch{try{return _(arguments,"callee").get}catch{return Ce}}}():Ce,j=Gt()(),Di=Wt()(),x=Object.getPrototypeOf||(Di?function(e){return e.__proto__}:null),J={},Hi=typeof Uint8Array>"u"||!x?g:x(Uint8Array),O={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":j&&x?x([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":Ft,"%GeneratorFunction%":J,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&x?x(x([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!j||!x?g:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!j||!x?g:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&x?x(""[Symbol.iterator]()):g,"%Symbol%":j?Symbol:g,"%SyntaxError%":Y,"%ThrowTypeError%":Qi,"%TypedArray%":Hi,"%TypeError%":X,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(x)try{null.error}catch(e){Mt=x(x(e)),O["%Error.prototype%"]=Mt}var Mt,Ei=function e(t){var s;if(t==="%AsyncFunction%")s=Ae("async function () {}");else if(t==="%GeneratorFunction%")s=Ae("function* () {}");else if(t==="%AsyncGeneratorFunction%")s=Ae("async function* () {}");else if(t==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(s=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&x&&(s=x(o.prototype))}return O[t]=s,s},_t={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ie=le(),ge=Et(),Mi=ie.call(Function.call,Array.prototype.concat),_i=ie.call(Function.apply,Array.prototype.splice),Ot=ie.call(Function.call,String.prototype.replace),ye=ie.call(Function.call,String.prototype.slice),Oi=ie.call(Function.call,RegExp.prototype.exec),Fi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ni=/\\(\\)?/g,$i=function(t){var s=ye(t,0,1),a=ye(t,-1);if(s==="%"&&a!=="%")throw new Y("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&s!=="%")throw new Y("invalid intrinsic syntax, expected opening `%`");var o=[];return Ot(t,Fi,function(n,i,r,c){o[o.length]=r?Ot(c,Ni,"$1"):i||n}),o},Ki=function(t,s){var a=t,o;if(ge(_t,a)&&(o=_t[a],a="%"+o[0]+"%"),ge(O,a)){var n=O[a];if(n===J&&(n=Ei(a)),typeof n>"u"&&!s)throw new X("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:a,value:n}}throw new Y("intrinsic "+t+" does not exist!")};Nt.exports=function(t,s){if(typeof t!="string"||t.length===0)throw new X("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof s!="boolean")throw new X('"allowMissing" argument must be a boolean');if(Oi(/^%?[^%]*%?$/,t)===null)throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=$i(t),o=a.length>0?a[0]:"",n=Ki("%"+o+"%",s),i=n.name,r=n.value,c=!1,d=n.alias;d&&(o=d[0],_i(a,Mi([0,1],d)));for(var l=1,h=!0;l<a.length;l+=1){var y=a[l],f=ye(y,0,1),m=ye(y,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new Y("property names with quotes must have matching quotes");if((y==="constructor"||!h)&&(c=!0),o+="."+y,i="%"+o+"%",ge(O,i))r=O[i];else if(r!=null){if(!(y in r)){if(!s)throw new X("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=a.length){var P=_(r,y);h=!!P,h&&"get"in P&&!("originalValue"in P.get)?r=P.get:r=r[y]}else h=ge(r,y),r=r[y];h&&!c&&(O[i]=r)}}return r}});var Jt=b((Wu,me)=>{"use strict";var Be=le(),Z=Re(),Vt=Z("%Function.prototype.apply%"),zt=Z("%Function.prototype.call%"),jt=Z("%Reflect.apply%",!0)||Be.call(zt,Vt),$t=Z("%Object.getOwnPropertyDescriptor%",!0),F=Z("%Object.defineProperty%",!0),Vi=Z("%Math.max%");if(F)try{F({},"a",{value:1})}catch{F=null}me.exports=function(t){var s=jt(Be,zt,arguments);if($t&&F){var a=$t(s,"length");a.configurable&&F(s,"length",{value:1+Vi(0,t.length-(arguments.length-1))})}return s};var Kt=function(){return jt(Be,Vt,arguments)};F?F(me.exports,"apply",{value:Kt}):me.exports.apply=Kt});var er=b((Su,Zt)=>{"use strict";var Xt=Re(),Yt=Jt(),zi=Yt(Xt("String.prototype.indexOf"));Zt.exports=function(t,s){var a=Xt(t,!!s);return typeof a=="function"&&zi(t,".prototype.")>-1?Yt(a):a}});var tr=b(()=>{});var xr=b((Hu,br)=>{var Ee=typeof Map=="function"&&Map.prototype,Ue=Object.getOwnPropertyDescriptor&&Ee?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,he=Ee&&Ue&&typeof Ue.get=="function"?Ue.get:null,rr=Ee&&Map.prototype.forEach,Me=typeof Set=="function"&&Set.prototype,Ge=Object.getOwnPropertyDescriptor&&Me?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fe=Me&&Ge&&typeof Ge.get=="function"?Ge.get:null,sr=Me&&Set.prototype.forEach,ji=typeof WeakMap=="function"&&WeakMap.prototype,ue=ji?WeakMap.prototype.has:null,Ji=typeof WeakSet=="function"&&WeakSet.prototype,ce=Ji?WeakSet.prototype.has:null,Xi=typeof WeakRef=="function"&&WeakRef.prototype,ar=Xi?WeakRef.prototype.deref:null,Yi=Boolean.prototype.valueOf,Zi=Object.prototype.toString,ep=Function.prototype.toString,tp=String.prototype.match,_e=String.prototype.slice,D=String.prototype.replace,rp=String.prototype.toUpperCase,nr=String.prototype.toLowerCase,yr=RegExp.prototype.test,or=Array.prototype.concat,A=Array.prototype.join,sp=Array.prototype.slice,ir=Math.floor,We=typeof BigInt=="function"?BigInt.prototype.valueOf:null,we=Object.getOwnPropertySymbols,Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="object",v=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ee||"symbol")?Symbol.toStringTag:null,Rr=Object.prototype.propertyIsEnumerable,pr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ur(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||yr.call(/e/,t))return t;var s=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var a=e<0?-ir(-e):ir(e);if(a!==e){var o=String(a),n=_e.call(t,o.length+1);return D.call(o,s,"$&_")+"."+D.call(D.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return D.call(t,s,"$&_")}var Qe=tr(),cr=Qe.custom,dr=qr(cr)?cr:null;br.exports=function e(t,s,a,o){var n=s||{};if(Q(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Q(n,"customInspect")?n.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=n.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return fr(t,n);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return r?ur(t,c):c}if(typeof t=="bigint"){var d=String(t)+"n";return r?ur(t,d):d}var l=typeof n.depth>"u"?5:n.depth;if(typeof a>"u"&&(a=0),a>=l&&l>0&&typeof t=="object")return De(t)?"[Array]":"[Object]";var h=xp(n,a);if(typeof o>"u")o=[];else if(hr(o,t)>=0)return"[Circular]";function y(T,S,G){if(S&&(o=sp.call(o),o.push(S)),G){var oe={depth:n.depth};return Q(n,"quoteStyle")&&(oe.quoteStyle=n.quoteStyle),e(T,oe,a+1,o)}return e(T,n,a+1,o)}if(typeof t=="function"&&!lr(t)){var f=lp(t),m=qe(t,y);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+A.call(m,", ")+" }":"")}if(qr(t)){var P=ee?D.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Se.call(t);return typeof t=="object"&&!ee?pe(P):P}if(hp(t)){for(var B="<"+nr.call(String(t.nodeName)),R=t.attributes||[],U=0;U<R.length;U++)B+=" "+R[U].name+"="+mr(ap(R[U].value),"double",n);return B+=">",t.childNodes&&t.childNodes.length&&(B+="..."),B+="</"+nr.call(String(t.nodeName))+">",B}if(De(t)){if(t.length===0)return"[]";var L=qe(t,y);return h&&!bp(L)?"["+He(L,h)+"]":"[ "+A.call(L,", ")+" ]"}if(op(t)){var K=qe(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!Rr.call(t,"cause")?"{ ["+String(t)+"] "+A.call(or.call("[cause]: "+y(t.cause),K),", ")+" }":K.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(K,", ")+" }"}if(typeof t=="object"&&i){if(dr&&typeof t[dr]=="function"&&Qe)return Qe(t,{depth:l-a});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(gp(t)){var se=[];return rr&&rr.call(t,function(T,S){se.push(y(S,t,!0)+" => "+y(T,t))}),gr("Map",he.call(t),se,h)}if(mp(t)){var ae=[];return sr&&sr.call(t,function(T){ae.push(y(T,t))}),gr("Set",fe.call(t),ae,h)}if(yp(t))return Le("WeakMap");if(qp(t))return Le("WeakSet");if(Rp(t))return Le("WeakRef");if(pp(t))return pe(y(Number(t)));if(cp(t))return pe(y(We.call(t)));if(up(t))return pe(Yi.call(t));if(ip(t))return pe(y(String(t)));if(!np(t)&&!lr(t)){var E=qe(t,y),ne=pr?pr(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",V=!ne&&v&&Object(t)===t&&v in t?_e.call(H(t),8,-1):W?"Object":"",M=ne||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=M+(V||W?"["+A.call(or.call([],V||[],W||[]),": ")+"] ":"");return E.length===0?z+"{}":h?z+"{"+He(E,h)+"}":z+"{ "+A.call(E,", ")+" }"}return String(t)};function mr(e,t,s){var a=(s.quoteStyle||t)==="double"?'"':"'";return a+e+a}function ap(e){return D.call(String(e),/"/g,"&quot;")}function De(e){return H(e)==="[object Array]"&&(!v||!(typeof e=="object"&&v in e))}function np(e){return H(e)==="[object Date]"&&(!v||!(typeof e=="object"&&v in e))}function lr(e){return H(e)==="[object RegExp]"&&(!v||!(typeof e=="object"&&v in e))}function op(e){return H(e)==="[object Error]"&&(!v||!(typeof e=="object"&&v in e))}function ip(e){return H(e)==="[object String]"&&(!v||!(typeof e=="object"&&v in e))}function pp(e){return H(e)==="[object Number]"&&(!v||!(typeof e=="object"&&v in e))}function up(e){return H(e)==="[object Boolean]"&&(!v||!(typeof e=="object"&&v in e))}function qr(e){if(ee)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Se)return!1;try{return Se.call(e),!0}catch{}return!1}function cp(e){if(!e||typeof e!="object"||!We)return!1;try{return We.call(e),!0}catch{}return!1}var dp=Object.prototype.hasOwnProperty||function(e){return e in this};function Q(e,t){return dp.call(e,t)}function H(e){return Zi.call(e)}function lp(e){if(e.name)return e.name;var t=tp.call(ep.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function hr(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,a=e.length;s<a;s++)if(e[s]===t)return s;return-1}function gp(e){if(!he||!e||typeof e!="object")return!1;try{he.call(e);try{fe.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function yp(e){if(!ue||!e||typeof e!="object")return!1;try{ue.call(e,ue);try{ce.call(e,ce)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Rp(e){if(!ar||!e||typeof e!="object")return!1;try{return ar.call(e),!0}catch{}return!1}function mp(e){if(!fe||!e||typeof e!="object")return!1;try{fe.call(e);try{he.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function qp(e){if(!ce||!e||typeof e!="object")return!1;try{ce.call(e,ce);try{ue.call(e,ue)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hp(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function fr(e,t){if(e.length>t.maxStringLength){var s=e.length-t.maxStringLength,a="... "+s+" more character"+(s>1?"s":"");return fr(_e.call(e,0,t.maxStringLength),t)+a}var o=D.call(D.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fp);return mr(o,"single",t)}function fp(e){var t=e.charCodeAt(0),s={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return s?"\\"+s:"\\x"+(t<16?"0":"")+rp.call(t.toString(16))}function pe(e){return"Object("+e+")"}function Le(e){return e+" { ? }"}function gr(e,t,s,a){var o=a?He(s,a):A.call(s,", ");return e+" ("+t+") {"+o+"}"}function bp(e){for(var t=0;t<e.length;t++)if(hr(e[t],`
2
+ `)>=0)return!1;return!0}function xp(e,t){var s;if(e.indent===" ")s=" ";else if(typeof e.indent=="number"&&e.indent>0)s=A.call(Array(e.indent+1)," ");else return null;return{base:s,prev:A.call(Array(t+1),s)}}function He(e,t){if(e.length===0)return"";var s=`
3
+ `+t.prev+t.base;return s+A.call(e,","+s)+`
4
+ `+t.prev}function qe(e,t){var s=De(e),a=[];if(s){a.length=e.length;for(var o=0;o<e.length;o++)a[o]=Q(e,o)?t(e[o],e):""}var n=typeof we=="function"?we(e):[],i;if(ee){i={};for(var r=0;r<n.length;r++)i["$"+n[r]]=n[r]}for(var c in e)Q(e,c)&&(s&&String(Number(c))===c&&c<e.length||ee&&i["$"+c]instanceof Symbol||(yr.call(/[^\w$]/,c)?a.push(t(c,e)+": "+t(e[c],e)):a.push(c+": "+t(e[c],e))));if(typeof we=="function")for(var d=0;d<n.length;d++)Rr.call(e,n[d])&&a.push("["+t(n[d])+"]: "+t(e[n[d]],e));return a}});var kr=b((Eu,Ir)=>{"use strict";var Oe=Re(),te=er(),Ip=xr(),kp=Oe("%TypeError%"),be=Oe("%WeakMap%",!0),xe=Oe("%Map%",!0),vp=te("WeakMap.prototype.get",!0),Pp=te("WeakMap.prototype.set",!0),Tp=te("WeakMap.prototype.has",!0),Ap=te("Map.prototype.get",!0),Cp=te("Map.prototype.set",!0),Bp=te("Map.prototype.has",!0),Fe=function(e,t){for(var s=e,a;(a=s.next)!==null;s=a)if(a.key===t)return s.next=a.next,a.next=e.next,e.next=a,a},Up=function(e,t){var s=Fe(e,t);return s&&s.value},Gp=function(e,t,s){var a=Fe(e,t);a?a.value=s:e.next={key:t,next:e.next,value:s}},wp=function(e,t){return!!Fe(e,t)};Ir.exports=function(){var t,s,a,o={assert:function(n){if(!o.has(n))throw new kp("Side channel does not contain "+Ip(n))},get:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return vp(t,n)}else if(xe){if(s)return Ap(s,n)}else if(a)return Up(a,n)},has:function(n){if(be&&n&&(typeof n=="object"||typeof n=="function")){if(t)return Tp(t,n)}else if(xe){if(s)return Bp(s,n)}else if(a)return wp(a,n);return!1},set:function(n,i){be&&n&&(typeof n=="object"||typeof n=="function")?(t||(t=new be),Pp(t,n,i)):xe?(s||(s=new xe),Cp(s,n,i)):(a||(a={key:{},next:null}),Gp(a,n,i))}};return o}});var Ie=b((Mu,vr)=>{"use strict";var Lp=String.prototype.replace,Wp=/%20/g,Ne={RFC1738:"RFC1738",RFC3986:"RFC3986"};vr.exports={default:Ne.RFC3986,formatters:{RFC1738:function(e){return Lp.call(e,Wp,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ne.RFC1738,RFC3986:Ne.RFC3986}});var Ke=b((_u,Tr)=>{"use strict";var Sp=Ie(),$e=Object.prototype.hasOwnProperty,N=Array.isArray,C=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Qp=function(t){for(;t.length>1;){var s=t.pop(),a=s.obj[s.prop];if(N(a)){for(var o=[],n=0;n<a.length;++n)typeof a[n]<"u"&&o.push(a[n]);s.obj[s.prop]=o}}},Pr=function(t,s){for(var a=s&&s.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(a[o]=t[o]);return a},Dp=function e(t,s,a){if(!s)return t;if(typeof s!="object"){if(N(t))t.push(s);else if(t&&typeof t=="object")(a&&(a.plainObjects||a.allowPrototypes)||!$e.call(Object.prototype,s))&&(t[s]=!0);else return[t,s];return t}if(!t||typeof t!="object")return[t].concat(s);var o=t;return N(t)&&!N(s)&&(o=Pr(t,a)),N(t)&&N(s)?(s.forEach(function(n,i){if($e.call(t,i)){var r=t[i];r&&typeof r=="object"&&n&&typeof n=="object"?t[i]=e(r,n,a):t.push(n)}else t[i]=n}),t):Object.keys(s).reduce(function(n,i){var r=s[i];return $e.call(n,i)?n[i]=e(n[i],r,a):n[i]=r,n},o)},Hp=function(t,s){return Object.keys(s).reduce(function(a,o){return a[o]=s[o],a},t)},Ep=function(e,t,s){var a=e.replace(/\+/g," ");if(s==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},Mp=function(t,s,a,o,n){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),a==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var r="",c=0;c<i.length;++c){var d=i.charCodeAt(c);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||n===Sp.RFC1738&&(d===40||d===41)){r+=i.charAt(c);continue}if(d<128){r=r+C[d];continue}if(d<2048){r=r+(C[192|d>>6]+C[128|d&63]);continue}if(d<55296||d>=57344){r=r+(C[224|d>>12]+C[128|d>>6&63]+C[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|i.charCodeAt(c)&1023),r+=C[240|d>>18]+C[128|d>>12&63]+C[128|d>>6&63]+C[128|d&63]}return r},_p=function(t){for(var s=[{obj:{o:t},prop:"o"}],a=[],o=0;o<s.length;++o)for(var n=s[o],i=n.obj[n.prop],r=Object.keys(i),c=0;c<r.length;++c){var d=r[c],l=i[d];typeof l=="object"&&l!==null&&a.indexOf(l)===-1&&(s.push({obj:i,prop:d}),a.push(l))}return Qp(s),t},Op=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Fp=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Np=function(t,s){return[].concat(t,s)},$p=function(t,s){if(N(t)){for(var a=[],o=0;o<t.length;o+=1)a.push(s(t[o]));return a}return s(t)};Tr.exports={arrayToObject:Pr,assign:Hp,combine:Np,compact:_p,decode:Ep,encode:Mp,isBuffer:Fp,isRegExp:Op,maybeMap:$p,merge:Dp}});var wr=b((Ou,Gr)=>{"use strict";var Br=kr(),ze=Ke(),de=Ie(),Kp=Object.prototype.hasOwnProperty,Ar={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,s){return t+"["+s+"]"},repeat:function(t){return t}},w=Array.isArray,Vp=String.prototype.split,zp=Array.prototype.push,Ur=function(e,t){zp.apply(e,w(t)?t:[t])},jp=Date.prototype.toISOString,Cr=de.default,k={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ze.encode,encodeValuesOnly:!1,format:Cr,formatter:de.formatters[Cr],indices:!1,serializeDate:function(t){return jp.call(t)},skipNulls:!1,strictNullHandling:!1},Jp=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ve={},Xp=function e(t,s,a,o,n,i,r,c,d,l,h,y,f,m,P,B){for(var R=t,U=B,L=0,K=!1;(U=U.get(Ve))!==void 0&&!K;){var se=U.get(t);if(L+=1,typeof se<"u"){if(se===L)throw new RangeError("Cyclic object value");K=!0}typeof U.get(Ve)>"u"&&(L=0)}if(typeof c=="function"?R=c(s,R):R instanceof Date?R=h(R):a==="comma"&&w(R)&&(R=ze.maybeMap(R,function(ve){return ve instanceof Date?h(ve):ve})),R===null){if(n)return r&&!m?r(s,k.encoder,P,"key",y):s;R=""}if(Jp(R)||ze.isBuffer(R)){if(r){var ae=m?s:r(s,k.encoder,P,"key",y);if(a==="comma"&&m){for(var E=Vp.call(String(R),","),ne="",W=0;W<E.length;++W)ne+=(W===0?"":",")+f(r(E[W],k.encoder,P,"value",y));return[f(ae)+(o&&w(R)&&E.length===1?"[]":"")+"="+ne]}return[f(ae)+"="+f(r(R,k.encoder,P,"value",y))]}return[f(s)+"="+f(String(R))]}var V=[];if(typeof R>"u")return V;var M;if(a==="comma"&&w(R))M=[{value:R.length>0?R.join(",")||null:void 0}];else if(w(c))M=c;else{var z=Object.keys(R);M=d?z.sort(d):z}for(var T=o&&w(R)&&R.length===1?s+"[]":s,S=0;S<M.length;++S){var G=M[S],oe=typeof G=="object"&&typeof G.value<"u"?G.value:R[G];if(!(i&&oe===null)){var li=w(R)?typeof a=="function"?a(T,G):T:T+(l?"."+G:"["+G+"]");B.set(t,L);var xt=Br();xt.set(Ve,B),Ur(V,e(oe,li,a,o,n,i,r,c,d,l,h,y,f,m,P,xt))}}return V},Yp=function(t){if(!t)return k;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var s=t.charset||k.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=de.default;if(typeof t.format<"u"){if(!Kp.call(de.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var o=de.formatters[a],n=k.filter;return(typeof t.filter=="function"||w(t.filter))&&(n=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:k.addQueryPrefix,allowDots:typeof t.allowDots>"u"?k.allowDots:!!t.allowDots,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:k.charsetSentinel,delimiter:typeof t.delimiter>"u"?k.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:k.encode,encoder:typeof t.encoder=="function"?t.encoder:k.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:k.encodeValuesOnly,filter:n,format:a,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:k.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:k.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:k.strictNullHandling}};Gr.exports=function(e,t){var s=e,a=Yp(t),o,n;typeof a.filter=="function"?(n=a.filter,s=n("",s)):w(a.filter)&&(n=a.filter,o=n);var i=[];if(typeof s!="object"||s===null)return"";var r;t&&t.arrayFormat in Ar?r=t.arrayFormat:t&&"indices"in t?r=t.indices?"indices":"repeat":r="indices";var c=Ar[r];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(s)),a.sort&&o.sort(a.sort);for(var l=Br(),h=0;h<o.length;++h){var y=o[h];a.skipNulls&&s[y]===null||Ur(i,Xp(s[y],y,c,d,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,l))}var f=i.join(a.delimiter),m=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),f.length>0?m+f:""}});var Sr=b((Fu,Wr)=>{"use strict";var re=Ke(),je=Object.prototype.hasOwnProperty,Zp=Array.isArray,I={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:re.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},eu=function(e){return e.replace(/&#(\d+);/g,function(t,s){return String.fromCharCode(parseInt(s,10))})},Lr=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},tu="utf8=%26%2310003%3B",ru="utf8=%E2%9C%93",su=function(t,s){var a={},o=s.ignoreQueryPrefix?t.replace(/^\?/,""):t,n=s.parameterLimit===1/0?void 0:s.parameterLimit,i=o.split(s.delimiter,n),r=-1,c,d=s.charset;if(s.charsetSentinel)for(c=0;c<i.length;++c)i[c].indexOf("utf8=")===0&&(i[c]===ru?d="utf-8":i[c]===tu&&(d="iso-8859-1"),r=c,c=i.length);for(c=0;c<i.length;++c)if(c!==r){var l=i[c],h=l.indexOf("]="),y=h===-1?l.indexOf("="):h+1,f,m;y===-1?(f=s.decoder(l,I.decoder,d,"key"),m=s.strictNullHandling?null:""):(f=s.decoder(l.slice(0,y),I.decoder,d,"key"),m=re.maybeMap(Lr(l.slice(y+1),s),function(P){return s.decoder(P,I.decoder,d,"value")})),m&&s.interpretNumericEntities&&d==="iso-8859-1"&&(m=eu(m)),l.indexOf("[]=")>-1&&(m=Zp(m)?[m]:m),je.call(a,f)?a[f]=re.combine(a[f],m):a[f]=m}return a},au=function(e,t,s,a){for(var o=a?t:Lr(t,s),n=e.length-1;n>=0;--n){var i,r=e[n];if(r==="[]"&&s.parseArrays)i=[].concat(o);else{i=s.plainObjects?Object.create(null):{};var c=r.charAt(0)==="["&&r.charAt(r.length-1)==="]"?r.slice(1,-1):r,d=parseInt(c,10);!s.parseArrays&&c===""?i={0:o}:!isNaN(d)&&r!==c&&String(d)===c&&d>=0&&s.parseArrays&&d<=s.arrayLimit?(i=[],i[d]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},nu=function(t,s,a,o){if(t){var n=a.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,r=/(\[[^[\]]*])/g,c=a.depth>0&&i.exec(n),d=c?n.slice(0,c.index):n,l=[];if(d){if(!a.plainObjects&&je.call(Object.prototype,d)&&!a.allowPrototypes)return;l.push(d)}for(var h=0;a.depth>0&&(c=r.exec(n))!==null&&h<a.depth;){if(h+=1,!a.plainObjects&&je.call(Object.prototype,c[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+n.slice(c.index)+"]"),au(l,s,a,o)}},ou=function(t){if(!t)return I;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=typeof t.charset>"u"?I.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?I.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:I.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:I.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:I.arrayLimit,charset:s,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:I.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:I.comma,decoder:typeof t.decoder=="function"?t.decoder:I.decoder,delimiter:typeof t.delimiter=="string"||re.isRegExp(t.delimiter)?t.delimiter:I.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:I.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:I.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:I.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:I.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:I.strictNullHandling}};Wr.exports=function(e,t){var s=ou(t);if(e===""||e===null||typeof e>"u")return s.plainObjects?Object.create(null):{};for(var a=typeof e=="string"?su(e,s):e,o=s.plainObjects?Object.create(null):{},n=Object.keys(a),i=0;i<n.length;++i){var r=n[i],c=nu(r,a[r],s,typeof e=="string");o=re.merge(o,c,s)}return s.allowSparse===!0?o:re.compact(o)}});var Dr=b((Nu,Qr)=>{"use strict";var iu=wr(),pu=Sr(),uu=Ie();Qr.exports={formats:uu,parse:pu,stringify:iu}});var ui=Pe(kt()),ci=Pe(vt());import pi from"axios";import{isNode as oi}from"browser-or-node";import{isBrowser as Pt,isNode as fi}from"browser-or-node";var bi="https://api.botpress.cloud",xi=6e4,Ii="BP_API_URL",ki="BP_BOT_ID",vi="BP_INTEGRATION_ID",Pi="BP_WORKSPACE_ID",Ti="BP_TOKEN";function Tt(e){let t=Ai(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??bi,o=t.timeout??xi;return{apiUrl:a,timeout:o,withCredentials:Pt,headers:s}}function Ai(e){return Pt?e:fi?Ci(e):e}function Ci(e){let t={...e,apiUrl:e.apiUrl??process.env[Ii],botId:e.botId??process.env[ki],integrationId:e.integrationId??process.env[vi],workspaceId:e.workspaceId??process.env[Pi]},s=t.token??process.env[Ti];return s&&(t.token=s),t}var ni=Pe(Dr());import Ru from"axios";import cu from"crypto";var du={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Je=typeof window<"u"&&typeof window.document<"u"?window.crypto:cu;Je.getRandomValues||(Je=du);var q=class extends Error{constructor(s,a,o,n,i,r){super(n);this.code=s;this.description=a;this.type=o;this.message=n;this.error=i;this.id=r;this.id||(this.id=q.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,n=Array.from(Je.getRandomValues(new Uint8Array(o))).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${n}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},lu=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Hr=e=>e instanceof q||lu(e)&&e.isApiError===!0,$=class extends q{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},Xe=class extends q{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},Ye=class extends q{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Ze=class extends q{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},et=class extends q{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},tt=class extends q{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},rt=class extends q{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},st=class extends q{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},at=class extends q{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},nt=class extends q{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ot=class extends q{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},it=class extends q{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},pt=class extends q{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ut=class extends q{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},ct=class extends q{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},dt=class extends q{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},lt=class extends q{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},gt=class extends q{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},yt=class extends q{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},Rt=class extends q{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},mt=class extends q{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},qt=class extends q{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},ht=class extends q{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},gu={Unknown:$,Internal:Xe,Unauthorized:Ye,Forbidden:Ze,PayloadTooLarge:et,InvalidPayload:tt,UnsupportedMediaType:rt,MethodNotFound:st,ResourceNotFound:at,InvalidJsonSchema:nt,InvalidDataFormat:ot,InvalidIdentifier:it,RelationConflict:pt,ReferenceConstraint:ut,ReferenceNotFound:ct,InvalidQuery:dt,Runtime:lt,AlreadyExists:gt,RateLimited:yt,PaymentRequired:Rt,QuotaExceeded:mt,LimitExceeded:qt,BreakingChanges:ht},ft=e=>Hr(e)?e:e instanceof Error?new $(e.message,e):typeof e=="string"?new $(e):yu(e);function yu(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=gu[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new $(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new $("An invalid error occurred: "+JSON.stringify(e))}var Er=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var _r=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Fr=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var $r=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Vr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var jr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Zr=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var ts=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var ss=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var ns=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}});var is=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var us=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}});var ds=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var gs=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Rs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var fs=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var xs=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ks=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Ps=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var As=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Bs=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Gs=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}});var Ls=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ss=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var Ds=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var Es=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var _s=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}});var Fs=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var $s=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Vs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var js=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Xs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var Zs=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ta=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}});var sa=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var na=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var ia=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var ua=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var da=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var ga=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Ra=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qa=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var fa=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var xa=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var ka=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pa=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Aa=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var Ba=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Ga=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var La=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken},params:{},body:{}});var Sa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Da=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ea=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var _a=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Fa=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var $a=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Va=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ja=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Xa=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Za=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var tn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var sn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var nn=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var pn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var cn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ln=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var yn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var mn=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var hn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var bn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var In=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}});var vn=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Tn=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Cn=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Un=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var wn=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Wn=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Qn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hn=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Mn=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var On=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Nn=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Kn=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zn=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Jn=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Yn=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var eo=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ro=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var ao=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var oo=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var po=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var co=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var go=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Ro=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var qo=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var fo=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{name:e.name,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}});var xo=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ko=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var Po=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ao=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}});var Bo=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var Go=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Lo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var So=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Do=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Eo=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}});var _o=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Fo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var $o=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Vo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var jo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}});var Xo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Zo=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}});var ti=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var si=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}});var ke=class{constructor(t){this.axiosInstance=t}createConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Er(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getConversation=async t=>{let{path:s,headers:a,query:o,body:n}=_r(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listConversations=async t=>{let{path:s,headers:a,query:o,body:n}=Fr(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=$r(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateConversation=async t=>{let{path:s,headers:a,query:o,body:n}=Vr(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:o,body:n}=jr(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listParticipants=async t=>{let{path:s,headers:a,query:o,body:n}=Xr(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};addParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=Zr(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=ts(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:o,body:n}=ss(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createEvent=async t=>{let{path:s,headers:a,query:o,body:n}=ns(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getEvent=async t=>{let{path:s,headers:a,query:o,body:n}=is(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listEvents=async t=>{let{path:s,headers:a,query:o,body:n}=us(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createMessage=async t=>{let{path:s,headers:a,query:o,body:n}=ds(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=gs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getMessage=async t=>{let{path:s,headers:a,query:o,body:n}=Rs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateMessage=async t=>{let{path:s,headers:a,query:o,body:n}=qs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listMessages=async t=>{let{path:s,headers:a,query:o,body:n}=fs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:o,body:n}=xs(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createUser=async t=>{let{path:s,headers:a,query:o,body:n}=ks(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUser=async t=>{let{path:s,headers:a,query:o,body:n}=Ps(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listUsers=async t=>{let{path:s,headers:a,query:o,body:n}=As(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:o,body:n}=Bs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateUser=async t=>{let{path:s,headers:a,query:o,body:n}=Gs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteUser=async t=>{let{path:s,headers:a,query:o,body:n}=Ls(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getState=async t=>{let{path:s,headers:a,query:o,body:n}=Ss(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setState=async t=>{let{path:s,headers:a,query:o,body:n}=Ds(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:o,body:n}=Es(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};patchState=async t=>{let{path:s,headers:a,query:o,body:n}=_s(t),i=u({method:"patch",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};callAction=async t=>{let{path:s,headers:a,query:o,body:n}=Fs(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=$s(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTask=async t=>{let{path:s,headers:a,query:o,body:n}=Vs(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTask=async t=>{let{path:s,headers:a,query:o,body:n}=js(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTask=async t=>{let{path:s,headers:a,query:o,body:n}=Xs(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTask=async t=>{let{path:s,headers:a,query:o,body:n}=Zs(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listTasks=async t=>{let{path:s,headers:a,query:o,body:n}=ta(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=sa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};runVrl=async t=>{let{path:s,headers:a,query:o,body:n}=na(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAccount=async t=>{let{path:s,headers:a,query:o,body:n}=ia(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateAccount=async t=>{let{path:s,headers:a,query:o,body:n}=ua(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:o,body:n}=da(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=ga(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:o,body:n}=Ra(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=qa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:o,body:n}=fa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=xa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:o,body:n}=ka(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Pa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createBot=async t=>{let{path:s,headers:a,query:o,body:n}=Aa(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ba(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};transferBot=async t=>{let{path:s,headers:a,query:o,body:n}=Ga(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBots=async t=>{let{path:s,headers:a,query:o,body:n}=La(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBot=async t=>{let{path:s,headers:a,query:o,body:n}=Sa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteBot=async t=>{let{path:s,headers:a,query:o,body:n}=Da(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:o,body:n}=Ea(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:o,body:n}=_a(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:o,body:n}=Fa(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:o,body:n}=$a(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:o,body:n}=Va(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:o,body:n}=ja(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:o,body:n}=Xa(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=Za(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:o,body:n}=tn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:o,body:n}=sn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=nn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=pn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=cn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:o,body:n}=ln(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:o,body:n}=yn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:o,body:n}=mn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:o,body:n}=hn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:o,body:n}=bn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=In(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:o,body:n}=vn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:o,body:n}=Tn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:o,body:n}=Cn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:o,body:n}=Un(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:o,body:n}=wn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Wn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Qn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Hn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:o,body:n}=Mn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:o,body:n}=On(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=Nn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:o,body:n}=Kn(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=zn(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=Jn(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:o,body:n}=Yn(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=eo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:o,body:n}=ro(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:o,body:n}=ao(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:o,body:n}=oo(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getUsage=async t=>{let{path:s,headers:a,query:o,body:n}=po(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:o,body:n}=co(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:o,body:n}=go(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listActivities=async t=>{let{path:s,headers:a,query:o,body:n}=Ro(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};introspect=async t=>{let{path:s,headers:a,query:o,body:n}=qo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createFile=async t=>{let{path:s,headers:a,query:o,body:n}=fo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteFile=async t=>{let{path:s,headers:a,query:o,body:n}=xo(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listFiles=async t=>{let{path:s,headers:a,query:o,body:n}=ko(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getFile=async t=>{let{path:s,headers:a,query:o,body:n}=Po(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateFile=async t=>{let{path:s,headers:a,query:o,body:n}=Ao(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};searchFiles=async t=>{let{path:s,headers:a,query:o,body:n}=Bo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};listTables=async t=>{let{path:s,headers:a,query:o,body:n}=Go(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTable=async t=>{let{path:s,headers:a,query:o,body:n}=Lo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:o,body:n}=So(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTable=async t=>{let{path:s,headers:a,query:o,body:n}=Do(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:o,body:n}=Eo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTable=async t=>{let{path:s,headers:a,query:o,body:n}=_o(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:o,body:n}=Fo(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTable=async t=>{let{path:s,headers:a,query:o,body:n}=$o(t),i=u({method:"delete",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};getTableRow=async t=>{let{path:s,headers:a,query:o,body:n}=Vo(t),i=u({method:"get",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};findTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=jo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};createTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=Xo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=Zo(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=ti(t),i=u({method:"put",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:o,body:n}=si(t),i=u({method:"post",path:s,headers:{...a},query:{...o},body:n});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw p(r)})}};function p(e){return Ru.isAxiosError(e)&&e.response?.data?ft(e.response.data):ft(e)}var mu=e=>e[1]!==void 0,u=e=>{let{method:t,path:s,query:a,headers:o,body:n}=e,i=Object.entries(o).filter(mu),r=Object.fromEntries(i),c=ni.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),d=new URLSearchParams(c);return{method:t,url:s,headers:r,params:d,data:n}};import*as pc from"axios";var di=100*1024*1024,qu=di,hu=di,ii=class extends ke{config;constructor(t={}){let s=Tt(t),a=fu(s);super(a),this.config=s}createAndUploadFile=async({name:t,data:s,index:a,tags:o,contentType:n,accessPolicies:i})=>{let{file:r}=await this.createFile({name:t,tags:o,index:a,accessPolicies:i,contentType:n,size:s.byteLength});try{await pi.put(r.uploadUrl,s,{maxBodyLength:1/0})}catch(c){throw new bt(`Failed to upload file: ${c.message}`,c,r)}return await this.getFile({id:r.id})}},bt=class extends Error{constructor(s,a,o){super(s);this.error=a;this.file=o;this.name="FileUploadError"}};function fu(e){let{apiUrl:t,headers:s,withCredentials:a,timeout:o}=e;return pi.create({baseURL:t,headers:s,withCredentials:a,timeout:o,maxBodyLength:qu,maxContentLength:hu,httpAgent:oi?new ui.default.Agent({keepAlive:!0}):void 0,httpsAgent:oi?new ci.default.Agent({keepAlive:!0}):void 0})}export{gt as AlreadyExistsError,ht as BreakingChangesError,ii as Client,bt as FileUploadError,Ze as ForbiddenError,Xe as InternalError,ot as InvalidDataFormatError,it as InvalidIdentifierError,nt as InvalidJsonSchemaError,tt as InvalidPayloadError,dt as InvalidQueryError,qt as LimitExceededError,st as MethodNotFoundError,et as PayloadTooLargeError,Rt as PaymentRequiredError,mt as QuotaExceededError,yt as RateLimitedError,ut as ReferenceConstraintError,ct as ReferenceNotFoundError,pt as RelationConflictError,at as ResourceNotFoundError,lt as RuntimeError,Ye as UnauthorizedError,$ as UnknownError,rt as UnsupportedMediaTypeError,pc as axios,ft as errorFrom,Hr as isApiError};
2
5
  //# sourceMappingURL=index.mjs.map