@botpress/client 0.10.1 → 0.11.1

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.
@@ -2,7 +2,7 @@
2
2
  * Botpress API
3
3
  * API for Botpress Cloud
4
4
  *
5
- * The version of the OpenAPI document: 0.15.9
5
+ * The version of the OpenAPI document: 0.16.2
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import type { Merge, Except } from 'type-fest';
3
- import { Configuration, DefaultApiCreateConversationRequest, DefaultApiGetConversationRequest, DefaultApiListConversationsRequest, DefaultApiGetOrCreateConversationRequest, DefaultApiUpdateConversationRequest, DefaultApiDeleteConversationRequest, DefaultApiListParticipantsRequest, DefaultApiAddParticipantRequest, DefaultApiGetParticipantRequest, DefaultApiRemoveParticipantRequest, DefaultApiCreateEventRequest, DefaultApiGetEventRequest, DefaultApiListEventsRequest, DefaultApiCreateMessageRequest, DefaultApiGetOrCreateMessageRequest, DefaultApiGetMessageRequest, DefaultApiUpdateMessageRequest, DefaultApiListMessagesRequest, DefaultApiDeleteMessageRequest, DefaultApiCreateUserRequest, DefaultApiGetUserRequest, DefaultApiListUsersRequest, DefaultApiGetOrCreateUserRequest, DefaultApiUpdateUserRequest, DefaultApiDeleteUserRequest, DefaultApiGetStateRequest, DefaultApiSetStateRequest, DefaultApiPatchStateRequest, DefaultApiCallActionRequest, DefaultApiConfigureIntegrationRequest, DefaultApiRunVrlRequest, DefaultApiCreatePersonalAccessTokenRequest, DefaultApiDeletePersonalAccessTokenRequest, DefaultApiListPublicIntegrationsRequest, DefaultApiGetPublicIntegrationByIdRequest, DefaultApiGetPublicIntegrationRequest, DefaultApiCreateBotRequest, DefaultApiUpdateBotRequest, DefaultApiTransferBotRequest, DefaultApiListBotsRequest, DefaultApiGetBotRequest, DefaultApiDeleteBotRequest, DefaultApiGetBotLogsRequest, DefaultApiGetBotWebchatRequest, DefaultApiGetBotAnalyticsRequest, DefaultApiListBotIssuesRequest, DefaultApiDeleteBotIssueRequest, DefaultApiListBotIssueEventsRequest, DefaultApiGetWorkspaceBillingDetailsRequest, DefaultApiSetWorkspacePaymentMethodRequest, DefaultApiListWorkspaceInvoicesRequest, DefaultApiChargeWorkspaceUnpaidInvoicesRequest, DefaultApiCreateWorkspaceRequest, DefaultApiGetWorkspaceRequest, DefaultApiListWorkspaceUsagesRequest, DefaultApiBreakDownWorkspaceUsageByBotRequest, DefaultApiGetWorkspaceQuotaRequest, DefaultApiListWorkspaceQuotasRequest, DefaultApiUpdateWorkspaceRequest, DefaultApiListWorkspacesRequest, DefaultApiChangeWorkspacePlanRequest, DefaultApiDeleteWorkspaceRequest, DefaultApiGetAuditRecordsRequest, DefaultApiListWorkspaceMembersRequest, DefaultApiDeleteWorkspaceMemberRequest, DefaultApiCreateWorkspaceMemberRequest, DefaultApiUpdateWorkspaceMemberRequest, DefaultApiCreateIntegrationRequest, DefaultApiUpdateIntegrationRequest, DefaultApiListIntegrationsRequest, DefaultApiGetIntegrationRequest, DefaultApiGetIntegrationLogsRequest, DefaultApiGetIntegrationByNameRequest, DefaultApiDeleteIntegrationRequest, DefaultApiGetUsageRequest, DefaultApiListUsageHistoryRequest, DefaultApiChangeAISpendQuotaRequest, DefaultApiIntrospectRequest, DefaultApiCreateFileRequest, DefaultApiGetFileRequest, DefaultApiDownloadFileRequest, DefaultApiDeleteFileRequest, DefaultApiListFilesRequest } from '.';
3
+ import { Configuration, DefaultApiCreateConversationRequest, DefaultApiGetConversationRequest, DefaultApiListConversationsRequest, DefaultApiGetOrCreateConversationRequest, DefaultApiUpdateConversationRequest, DefaultApiDeleteConversationRequest, DefaultApiListParticipantsRequest, DefaultApiAddParticipantRequest, DefaultApiGetParticipantRequest, DefaultApiRemoveParticipantRequest, DefaultApiCreateEventRequest, DefaultApiGetEventRequest, DefaultApiListEventsRequest, DefaultApiCreateMessageRequest, DefaultApiGetOrCreateMessageRequest, DefaultApiGetMessageRequest, DefaultApiUpdateMessageRequest, DefaultApiListMessagesRequest, DefaultApiDeleteMessageRequest, DefaultApiCreateUserRequest, DefaultApiGetUserRequest, DefaultApiListUsersRequest, DefaultApiGetOrCreateUserRequest, DefaultApiUpdateUserRequest, DefaultApiDeleteUserRequest, DefaultApiGetStateRequest, DefaultApiSetStateRequest, DefaultApiPatchStateRequest, DefaultApiCallActionRequest, DefaultApiConfigureIntegrationRequest, DefaultApiGetTaskRequest, DefaultApiCreateTaskRequest, DefaultApiUpdateTaskRequest, DefaultApiDeleteTaskRequest, DefaultApiListTasksRequest, DefaultApiRunVrlRequest, DefaultApiCreatePersonalAccessTokenRequest, DefaultApiDeletePersonalAccessTokenRequest, DefaultApiSetAccountPreferenceRequest, DefaultApiGetAccountPreferenceRequest, DefaultApiListPublicIntegrationsRequest, DefaultApiGetPublicIntegrationByIdRequest, DefaultApiGetPublicIntegrationRequest, DefaultApiCreateBotRequest, DefaultApiUpdateBotRequest, DefaultApiTransferBotRequest, DefaultApiListBotsRequest, DefaultApiGetBotRequest, DefaultApiDeleteBotRequest, DefaultApiGetBotLogsRequest, DefaultApiGetBotWebchatRequest, DefaultApiGetBotAnalyticsRequest, DefaultApiListBotIssuesRequest, DefaultApiDeleteBotIssueRequest, DefaultApiListBotIssueEventsRequest, DefaultApiGetWorkspaceBillingDetailsRequest, DefaultApiSetWorkspacePaymentMethodRequest, DefaultApiListWorkspaceInvoicesRequest, DefaultApiChargeWorkspaceUnpaidInvoicesRequest, DefaultApiCreateWorkspaceRequest, DefaultApiGetWorkspaceRequest, DefaultApiListWorkspaceUsagesRequest, DefaultApiBreakDownWorkspaceUsageByBotRequest, DefaultApiGetWorkspaceQuotaRequest, DefaultApiListWorkspaceQuotasRequest, DefaultApiUpdateWorkspaceRequest, DefaultApiCheckHandleAvailabilityRequest, DefaultApiListWorkspacesRequest, DefaultApiChangeWorkspacePlanRequest, DefaultApiDeleteWorkspaceRequest, DefaultApiGetAuditRecordsRequest, DefaultApiListWorkspaceMembersRequest, DefaultApiDeleteWorkspaceMemberRequest, DefaultApiCreateWorkspaceMemberRequest, DefaultApiUpdateWorkspaceMemberRequest, DefaultApiCreateIntegrationRequest, DefaultApiUpdateIntegrationRequest, DefaultApiListIntegrationsRequest, DefaultApiGetIntegrationRequest, DefaultApiGetIntegrationLogsRequest, DefaultApiGetIntegrationByNameRequest, DefaultApiDeleteIntegrationRequest, DefaultApiGetUsageRequest, DefaultApiListUsageHistoryRequest, DefaultApiChangeAISpendQuotaRequest, DefaultApiIntrospectRequest, DefaultApiCreateFileRequest, DefaultApiGetFileRequest, DefaultApiDownloadFileRequest, DefaultApiDeleteFileRequest, DefaultApiListFilesRequest } from '.';
4
4
  export declare class ApiClient {
5
5
  private _innerClient;
6
6
  constructor(configuration?: Configuration, basePath?: string, axiosInstance?: AxiosInstance);
@@ -34,11 +34,18 @@ export declare class ApiClient {
34
34
  patchState: ({ type, id, name, ...patchStateBody }: PatchStateProps) => Promise<import("./api").PatchStateResponse>;
35
35
  callAction: (callActionBody: CallActionProps) => Promise<import("./api").CallActionResponse>;
36
36
  configureIntegration: (configureIntegrationBody: ConfigureIntegrationProps) => Promise<object>;
37
+ getTask: (props: GetTaskProps) => Promise<import("./api").GetTaskResponse>;
38
+ createTask: (createTaskBody: CreateTaskProps) => Promise<import("./api").CreateTaskResponse>;
39
+ updateTask: ({ id, ...updateTaskBody }: UpdateTaskProps) => Promise<import("./api").UpdateTaskResponse>;
40
+ deleteTask: (props: DeleteTaskProps) => Promise<object>;
41
+ listTasks: (props: ListTasksProps) => Promise<import("./api").ListTasksResponse>;
37
42
  runVrl: (runVrlBody: RunVrlProps) => Promise<import("./api").RunVrlResponse>;
38
43
  getAccount: () => Promise<import("./api").GetAccountResponse>;
39
44
  listPersonalAccessTokens: () => Promise<import("./api").ListPersonalAccessTokensResponse>;
40
45
  createPersonalAccessToken: (createPersonalAccessTokenBody: CreatePersonalAccessTokenProps) => Promise<import("./api").CreatePersonalAccessTokenResponse>;
41
46
  deletePersonalAccessToken: (props: DeletePersonalAccessTokenProps) => Promise<object>;
47
+ setAccountPreference: ({ key, ...setAccountPreferenceBody }: SetAccountPreferenceProps) => Promise<object>;
48
+ getAccountPreference: (props: GetAccountPreferenceProps) => Promise<import("./api").GetAccountPreferenceResponse>;
42
49
  listPublicIntegrations: (props: ListPublicIntegrationsProps) => Promise<import("./api").ListPublicIntegrationsResponse>;
43
50
  getPublicIntegrationById: (props: GetPublicIntegrationByIdProps) => Promise<import("./api").GetPublicIntegrationByIdResponse>;
44
51
  getPublicIntegration: (props: GetPublicIntegrationProps) => Promise<import("./api").GetPublicIntegrationResponse>;
@@ -68,6 +75,7 @@ export declare class ApiClient {
68
75
  getWorkspaceQuota: (props: GetWorkspaceQuotaProps) => Promise<import("./api").GetWorkspaceQuotaResponse>;
69
76
  listWorkspaceQuotas: (props: ListWorkspaceQuotasProps) => Promise<import("./api").ListWorkspaceQuotasResponse>;
70
77
  updateWorkspace: ({ id, ...updateWorkspaceBody }: UpdateWorkspaceProps) => Promise<import("./api").UpdateWorkspaceResponse1>;
78
+ checkHandleAvailability: (checkHandleAvailabilityBody: CheckHandleAvailabilityProps) => Promise<import("./api").CheckHandleAvailabilityResponse>;
71
79
  listWorkspaces: (props: ListWorkspacesProps) => Promise<import("./api").ListWorkspacesResponse>;
72
80
  changeWorkspacePlan: ({ id, ...changeWorkspacePlanBody }: ChangeWorkspacePlanProps) => Promise<import("./api").ChangeWorkspacePlanResponse>;
73
81
  deleteWorkspace: (props: DeleteWorkspaceProps) => Promise<object>;
@@ -123,9 +131,16 @@ export type SetStateProps = Merge<Except<DefaultApiSetStateRequest, 'setStateBod
123
131
  export type PatchStateProps = Merge<Except<DefaultApiPatchStateRequest, 'patchStateBody'>, NonNullable<DefaultApiPatchStateRequest['patchStateBody']>>;
124
132
  export type CallActionProps = Merge<Except<DefaultApiCallActionRequest, 'callActionBody'>, NonNullable<DefaultApiCallActionRequest['callActionBody']>>;
125
133
  export type ConfigureIntegrationProps = Merge<Except<DefaultApiConfigureIntegrationRequest, 'configureIntegrationBody'>, NonNullable<DefaultApiConfigureIntegrationRequest['configureIntegrationBody']>>;
134
+ export type GetTaskProps = Merge<DefaultApiGetTaskRequest, {}>;
135
+ export type CreateTaskProps = Merge<Except<DefaultApiCreateTaskRequest, 'createTaskBody'>, NonNullable<DefaultApiCreateTaskRequest['createTaskBody']>>;
136
+ export type UpdateTaskProps = Merge<Except<DefaultApiUpdateTaskRequest, 'updateTaskBody'>, NonNullable<DefaultApiUpdateTaskRequest['updateTaskBody']>>;
137
+ export type DeleteTaskProps = Merge<DefaultApiDeleteTaskRequest, {}>;
138
+ export type ListTasksProps = Merge<DefaultApiListTasksRequest, {}>;
126
139
  export type RunVrlProps = Merge<Except<DefaultApiRunVrlRequest, 'runVrlBody'>, NonNullable<DefaultApiRunVrlRequest['runVrlBody']>>;
127
140
  export type CreatePersonalAccessTokenProps = Merge<Except<DefaultApiCreatePersonalAccessTokenRequest, 'createPersonalAccessTokenBody'>, NonNullable<DefaultApiCreatePersonalAccessTokenRequest['createPersonalAccessTokenBody']>>;
128
141
  export type DeletePersonalAccessTokenProps = Merge<DefaultApiDeletePersonalAccessTokenRequest, {}>;
142
+ export type SetAccountPreferenceProps = Merge<Except<DefaultApiSetAccountPreferenceRequest, 'setAccountPreferenceBody'>, NonNullable<DefaultApiSetAccountPreferenceRequest['setAccountPreferenceBody']>>;
143
+ export type GetAccountPreferenceProps = Merge<DefaultApiGetAccountPreferenceRequest, {}>;
129
144
  export type ListPublicIntegrationsProps = Merge<DefaultApiListPublicIntegrationsRequest, {}>;
130
145
  export type GetPublicIntegrationByIdProps = Merge<DefaultApiGetPublicIntegrationByIdRequest, {}>;
131
146
  export type GetPublicIntegrationProps = Merge<DefaultApiGetPublicIntegrationRequest, {}>;
@@ -152,6 +167,7 @@ export type BreakDownWorkspaceUsageByBotProps = Merge<DefaultApiBreakDownWorkspa
152
167
  export type GetWorkspaceQuotaProps = Merge<DefaultApiGetWorkspaceQuotaRequest, {}>;
153
168
  export type ListWorkspaceQuotasProps = Merge<DefaultApiListWorkspaceQuotasRequest, {}>;
154
169
  export type UpdateWorkspaceProps = Merge<Except<DefaultApiUpdateWorkspaceRequest, 'updateWorkspaceBody'>, NonNullable<DefaultApiUpdateWorkspaceRequest['updateWorkspaceBody']>>;
170
+ export type CheckHandleAvailabilityProps = Merge<Except<DefaultApiCheckHandleAvailabilityRequest, 'checkHandleAvailabilityBody'>, NonNullable<DefaultApiCheckHandleAvailabilityRequest['checkHandleAvailabilityBody']>>;
155
171
  export type ListWorkspacesProps = Merge<DefaultApiListWorkspacesRequest, {}>;
156
172
  export type ChangeWorkspacePlanProps = Merge<Except<DefaultApiChangeWorkspacePlanRequest, 'changeWorkspacePlanBody'>, NonNullable<DefaultApiChangeWorkspacePlanRequest['changeWorkspacePlanBody']>>;
157
173
  export type DeleteWorkspaceProps = Merge<DefaultApiDeleteWorkspaceRequest, {}>;
@@ -3,7 +3,7 @@
3
3
  * Botpress API
4
4
  * API for Botpress Cloud
5
5
  *
6
- * The version of the OpenAPI document: 0.15.9
6
+ * The version of the OpenAPI document: 0.16.2
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Botpress API
3
3
  * API for Botpress Cloud
4
4
  *
5
- * The version of the OpenAPI document: 0.15.9
5
+ * The version of the OpenAPI document: 0.16.2
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Botpress API
3
3
  * API for Botpress Cloud
4
4
  *
5
- * The version of the OpenAPI document: 0.15.9
5
+ * The version of the OpenAPI document: 0.16.2
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var ue=Object.create;var U=Object.defineProperty;var de=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var Ae=(n,t)=>{for(var e in t)U(n,e,{get:t[e],enumerable:!0})},se=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ge(t))!he.call(n,o)&&o!==e&&U(n,o,{get:()=>t[o],enumerable:!(s=de(t,o))||s.enumerable});return n};var k=(n,t,e)=>(e=n!=null?ue(ye(n)):{},se(t||!n||!n.__esModule?U(e,"default",{value:n,enumerable:!0}):e,n)),me=n=>se(U({},"__esModule",{value:!0}),n);var Te={};Ae(Te,{AlreadyExistsError:()=>H,Client:()=>te,ForbiddenError:()=>D,InternalError:()=>W,InvalidDataFormatError:()=>G,InvalidIdentifierError:()=>_,InvalidJsonSchemaError:()=>L,InvalidPayloadError:()=>O,InvalidQueryError:()=>j,LimitExceededError:()=>z,MethodNotFoundError:()=>M,PayloadTooLargeError:()=>T,PaymentRequiredError:()=>K,QuotaExceededError:()=>J,RateLimitedError:()=>$,ReferenceNotFoundError:()=>Q,RelationConflictError:()=>F,ResourceNotFoundError:()=>S,RuntimeError:()=>N,UnauthorizedError:()=>E,UnknownError:()=>b,UnsupportedMediaTypeError:()=>w,axios:()=>Oe,errorFrom:()=>Y,isApiError:()=>re});module.exports=me(Te);var pe=k(require("axios"));var I=require("browser-or-node"),Re="https://api.botpress.cloud",fe=6e4,xe="BP_API_URL",Ce="BP_BOT_ID",Pe="BP_INTEGRATION_ID",Be="BP_WORKSPACE_ID",be="BP_TOKEN";function ae(n){let t=ke(n),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??Re,o=t.timeout??fe;return{apiUrl:s,timeout:o,withCredentials:I.isBrowser,headers:e}}function ke(n){return I.isBrowser?n:I.isNode?Ie(n):n}function Ie(n){let t={...n,apiUrl:n.apiUrl??process.env[xe],botId:n.botId??process.env[Ce],integrationId:n.integrationId??process.env[Pe],workspaceId:n.workspaceId??process.env[Be]},e=t.token??process.env[be];return e&&(t.token=e),t}var ie=k(require("axios"));var A=k(require("axios"));var oe=k(require("axios")),u="https://api.botpress.cloud".replace(/\/+$/,"");var q=class{constructor(t,e=u,s=oe.default){this.basePath=e;this.axios=s;t&&(this.configuration=t,this.basePath=t.basePath||this.basePath)}configuration},v=class extends Error{constructor(e,s){super(s);this.field=e;this.name="RequiredError"}};var d="https://example.com",f=function(n,t,e){if(e==null)throw new v(t,`Required parameter ${t} was null or undefined when calling ${n}.`)};function X(n,t,e=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>X(n,s,e)):Object.keys(t).forEach(s=>X(n,t[s],`${e}${e!==""?".":""}${s}`)):n.has(e)?n.append(e,t):n.set(e,t))}var g=function(n,...t){let e=new URLSearchParams(n.search);X(e,t),n.search=e.toString()},C=function(n,t,e){let s=typeof n!="string";return(s&&e&&e.isJsonMime?e.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(n!==void 0?n:{}):n||""},y=function(n){return n.pathname+n.search+n.hash},h=function(n,t,e,s){return(o=t,a=e)=>{let r={...n.options,url:(s?.basePath||a)+n.url};return o.request(r)}};var Ue=function(n){return{addParticipant:async(t,e,s={})=>{f("addParticipant","id",t);let o="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"POST",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},breakDownWorkspaceUsageByBot:async(t,e,s,o={})=>{f("breakDownWorkspaceUsageByBot","id",t),f("breakDownWorkspaceUsageByBot","type",e);let a="/v1/admin/workspaces/{id}/usages/by-bot".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},callAction:async(t,e={})=>{let s="/v1/chat/actions",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},changeAISpendQuota:async(t,e={})=>{let s="/v1/admin/quotas/ai-spend",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"PUT",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},changeWorkspacePlan:async(t,e,s={})=>{f("changeWorkspacePlan","id",t);let o="/v1/admin/workspaces/{id}/change-plan".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},chargeWorkspaceUnpaidInvoices:async(t,e,s={})=>{f("chargeWorkspaceUnpaidInvoices","id",t);let o="/v1/admin/workspaces/{id}/billing/invoices/charge-unpaid".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"POST",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},configureIntegration:async(t,e={})=>{let s="/v1/chat/integrations/configure",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createBot:async(t,e={})=>{let s="/v1/admin/bots",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createConversation:async(t,e={})=>{let s="/v1/chat/conversations",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createEvent:async(t,e={})=>{let s="/v1/chat/events",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createFile:async(t,e={})=>{let s="/v1/storage/files",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createIntegration:async(t,e={})=>{let s="/v1/admin/integrations",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createMessage:async(t,e={})=>{let s="/v1/chat/messages",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createPersonalAccessToken:async(t,e={})=>{let s="/v1/admin/account/pats",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createUser:async(t,e={})=>{let s="/v1/chat/users",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createWorkspace:async(t,e={})=>{let s="/v1/admin/workspaces",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},createWorkspaceMember:async(t,e={})=>{let s="/v1/admin/workspace-members",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},deleteBot:async(t,e={})=>{f("deleteBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteBotIssue:async(t,e,s={})=>{f("deleteBotIssue","id",t),f("deleteBotIssue","issueId",e);let o="/v1/admin/bots/{id}/issues/{issueId}".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"DELETE",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},deleteConversation:async(t,e={})=>{f("deleteConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteFile:async(t,e={})=>{f("deleteFile","id",t);let s="/v1/storage/files/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteIntegration:async(t,e={})=>{f("deleteIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteMessage:async(t,e={})=>{f("deleteMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deletePersonalAccessToken:async(t,e={})=>{f("deletePersonalAccessToken","id",t);let s="/v1/admin/account/pats/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteUser:async(t,e={})=>{f("deleteUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteWorkspace:async(t,e={})=>{f("deleteWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},deleteWorkspaceMember:async(t,e={})=>{f("deleteWorkspaceMember","id",t);let s="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"DELETE",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},downloadFile:async(t,e={})=>{f("downloadFile","id",t);let s="/v1/storage/files/{id}/download".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getAccount:async(t={})=>{let e="/v1/admin/account/me",s=new URL(e,d),o;n&&(o=n.baseOptions);let a={method:"GET",...o,...t},r={};g(s,{});let p=o&&o.headers?o.headers:{};return a.headers={...r,...p,...t.headers},{url:y(s),options:a}},getAllWorkspaceQuotaCompletion:async(t={})=>{let e="/v1/admin/workspaces/usages/quota-completion",s=new URL(e,d),o;n&&(o=n.baseOptions);let a={method:"GET",...o,...t},r={};g(s,{});let p=o&&o.headers?o.headers:{};return a.headers={...r,...p,...t.headers},{url:y(s),options:a}},getAuditRecords:async(t,e,s={})=>{f("getAuditRecords","id",t);let o="/v1/admin/workspaces/{id}/audit-records".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},getBot:async(t,e={})=>{f("getBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getBotAnalytics:async(t,e,s,o={})=>{f("getBotAnalytics","id",t),f("getBotAnalytics","startDate",e),f("getBotAnalytics","endDate",s);let a="/v1/admin/bots/{id}/analytics".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};e!==void 0&&(l.startDate=e),s!==void 0&&(l.endDate=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},getBotLogs:async(t,e,s,o,a={})=>{f("getBotLogs","id",t),f("getBotLogs","timeStart",e),f("getBotLogs","timeEnd",s);let r="/v1/admin/bots/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,d),p;n&&(p=n.baseOptions);let c={method:"GET",...p,...a},l={},x={};e!==void 0&&(x.timeStart=e),s!==void 0&&(x.timeEnd=s),o!==void 0&&(x.nextToken=o),g(i,x);let B=p&&p.headers?p.headers:{};return c.headers={...l,...B,...a.headers},{url:y(i),options:c}},getBotWebchat:async(t,e,s={})=>{f("getBotWebchat","id",t),f("getBotWebchat","type",e);let o="/v1/admin/bots/{id}/webchat".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.type=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},getConversation:async(t,e={})=>{f("getConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getEvent:async(t,e={})=>{f("getEvent","id",t);let s="/v1/chat/events/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getFile:async(t,e={})=>{f("getFile","id",t);let s="/v1/storage/files/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getIntegration:async(t,e={})=>{f("getIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getIntegrationByName:async(t,e,s={})=>{f("getIntegrationByName","name",t),f("getIntegrationByName","version",e);let o="/v1/admin/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},getIntegrationLogs:async(t,e,s,o,a={})=>{f("getIntegrationLogs","id",t),f("getIntegrationLogs","timeStart",e),f("getIntegrationLogs","timeEnd",s);let r="/v1/admin/integrations/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(r,d),p;n&&(p=n.baseOptions);let c={method:"GET",...p,...a},l={},x={};e!==void 0&&(x.timeStart=e),s!==void 0&&(x.timeEnd=s),o!==void 0&&(x.nextToken=o),g(i,x);let B=p&&p.headers?p.headers:{};return c.headers={...l,...B,...a.headers},{url:y(i),options:c}},getMessage:async(t,e={})=>{f("getMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getOrCreateConversation:async(t,e={})=>{let s="/v1/chat/conversations/get-or-create",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},getOrCreateMessage:async(t,e={})=>{let s="/v1/chat/messages/get-or-create",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},getOrCreateUser:async(t,e={})=>{let s="/v1/chat/users/get-or-create",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},getParticipant:async(t,e,s={})=>{f("getParticipant","id",t),f("getParticipant","userId",e);let o="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},getPublicIntegration:async(t,e,s={})=>{f("getPublicIntegration","name",t),f("getPublicIntegration","version",e);let o="/v1/admin/hub/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},getPublicIntegrationById:async(t,e={})=>{f("getPublicIntegrationById","id",t);let s="/v1/admin/hub/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getState:async(t,e,s,o={})=>{f("getState","type",t),f("getState","id",e),f("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))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={};g(r,{});let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},getUsage:async(t,e,s,o={})=>{f("getUsage","type",t),f("getUsage","id",e);let a="/v1/admin/usages/{id}".replace("{id}",encodeURIComponent(String(e))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};t!==void 0&&(l.type=t),s!==void 0&&(l.period=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},getUser:async(t,e={})=>{f("getUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getWorkspace:async(t,e={})=>{f("getWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getWorkspaceBillingDetails:async(t,e={})=>{f("getWorkspaceBillingDetails","id",t);let s="/v1/admin/workspaces/{id}/billing/details".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},getWorkspaceQuota:async(t,e,s,o={})=>{f("getWorkspaceQuota","id",t),f("getWorkspaceQuota","type",e);let a="/v1/admin/workspaces/{id}/quota".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},introspect:async(t,e={})=>{let s="/v1/admin/introspect",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},listBotIssueEvents:async(t,e,s={})=>{f("listBotIssueEvents","id",t),f("listBotIssueEvents","issueId",e);let o="/v1/admin/bots/{id}/issues/{issueId}/events".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listBotIssues:async(t,e,s={})=>{f("listBotIssues","id",t);let o="/v1/admin/bots/{id}/issues".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listBots:async(t,e,s={})=>{let o="/v1/admin/bots",a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};t!==void 0&&(c.dev=t),e!==void 0&&(c.nextToken=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listConversations:async(t,e,s,o={})=>{let a="/v1/chat/conversations",r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.tags=e),s&&(l.participantIds=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},listEvents:async(t,e,s,o,a,r={})=>{let i="/v1/chat/events",p=new URL(i,d),c;n&&(c=n.baseOptions);let l={method:"GET",...c,...r},x={},B={};t!==void 0&&(B.nextToken=t),e!==void 0&&(B.type=e),s!==void 0&&(B.conversationId=s),o!==void 0&&(B.userId=o),a!==void 0&&(B.messageId=a),g(p,B);let le=c&&c.headers?c.headers:{};return l.headers={...x,...le,...r.headers},{url:y(p),options:l}},listFiles:async(t,e,s={})=>{f("listFiles","botId",t);let o="/v1/storage/files",a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.nextToken=e),t!==void 0&&(c.botId=t),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listIntegrations:async(t,e,s,o,a={})=>{let r="/v1/admin/integrations",i=new URL(r,d),p;n&&(p=n.baseOptions);let c={method:"GET",...p,...a},l={},x={};t!==void 0&&(x.nextToken=t),e!==void 0&&(x.name=e),s!==void 0&&(x.version=s),o!==void 0&&(x.dev=o),g(i,x);let B=p&&p.headers?p.headers:{};return c.headers={...l,...B,...a.headers},{url:y(i),options:c}},listMessages:async(t,e,s,o={})=>{let a="/v1/chat/messages",r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.conversationId=e),s!==void 0&&(l.tags=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},listParticipants:async(t,e,s={})=>{f("listParticipants","id",t);let o="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.nextToken=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listPersonalAccessTokens:async(t={})=>{let e="/v1/admin/account/pats",s=new URL(e,d),o;n&&(o=n.baseOptions);let a={method:"GET",...o,...t},r={};g(s,{});let p=o&&o.headers?o.headers:{};return a.headers={...r,...p,...t.headers},{url:y(s),options:a}},listPublicIntegrations:async(t,e,s,o={})=>{let a="/v1/admin/hub/integrations",r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.name=e),s!==void 0&&(l.version=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},listUsageHistory:async(t,e,s={})=>{f("listUsageHistory","type",t),f("listUsageHistory","id",e);let o="/v1/admin/usages/{id}/history".replace("{id}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};t!==void 0&&(c.type=t),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listUsers:async(t,e,s,o={})=>{let a="/v1/chat/users",r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.conversationId=e),s!==void 0&&(l.tags=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},listWorkspaceInvoices:async(t,e={})=>{f("listWorkspaceInvoices","id",t);let s="/v1/admin/workspaces/{id}/billing/invoices".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={};g(o,{});let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},listWorkspaceMembers:async(t,e={})=>{let s="/v1/admin/workspace-members",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={},p={};t!==void 0&&(p.nextToken=t),g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},listWorkspaceQuotas:async(t,e,s={})=>{f("listWorkspaceQuotas","id",t);let o="/v1/admin/workspaces/{id}/quotas".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"GET",...r,...s},p={},c={};e!==void 0&&(c.period=e),g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},listWorkspaceUsages:async(t,e,s,o={})=>{f("listWorkspaceUsages","id",t),f("listWorkspaceUsages","type",e);let a="/v1/admin/workspaces/{id}/usages".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,d),i;n&&(i=n.baseOptions);let p={method:"GET",...i,...o},c={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(r,l);let x=i&&i.headers?i.headers:{};return p.headers={...c,...x,...o.headers},{url:y(r),options:p}},listWorkspaces:async(t,e={})=>{let s="/v1/admin/workspaces",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"GET",...a,...e},i={},p={};t!==void 0&&(p.nextToken=t),g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},{url:y(o),options:r}},patchState:async(t,e,s,o,a={})=>{f("patchState","type",t),f("patchState","id",e),f("patchState","name",s);let r="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(r,d),p;n&&(p=n.baseOptions);let c={method:"PATCH",...p,...a},l={},x={};l["Content-Type"]="application/json",g(i,x);let B=p&&p.headers?p.headers:{};return c.headers={...l,...B,...a.headers},c.data=C(o,c,n),{url:y(i),options:c}},removeParticipant:async(t,e,s={})=>{f("removeParticipant","id",t),f("removeParticipant","userId",e);let o="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"DELETE",...r,...s},p={};g(a,{});let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},{url:y(a),options:i}},runVrl:async(t,e={})=>{let s="/v1/admin/helper/vrl",o=new URL(s,d),a;n&&(a=n.baseOptions);let r={method:"POST",...a,...e},i={},p={};i["Content-Type"]="application/json",g(o,p);let c=a&&a.headers?a.headers:{};return r.headers={...i,...c,...e.headers},r.data=C(t,r,n),{url:y(o),options:r}},setState:async(t,e,s,o,a={})=>{f("setState","type",t),f("setState","id",e),f("setState","name",s);let r="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(r,d),p;n&&(p=n.baseOptions);let c={method:"POST",...p,...a},l={},x={};l["Content-Type"]="application/json",g(i,x);let B=p&&p.headers?p.headers:{};return c.headers={...l,...B,...a.headers},c.data=C(o,c,n),{url:y(i),options:c}},setWorkspacePaymentMethod:async(t,e,s={})=>{f("setWorkspacePaymentMethod","id",t);let o="/v1/admin/workspaces/{id}/billing/payment-method".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},transferBot:async(t,e,s={})=>{f("transferBot","id",t);let o="/v1/admin/bots/{id}/transfer".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"POST",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateBot:async(t,e,s={})=>{f("updateBot","id",t);let o="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateConversation:async(t,e,s={})=>{f("updateConversation","id",t);let o="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateIntegration:async(t,e,s={})=>{f("updateIntegration","id",t);let o="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateMessage:async(t,e,s={})=>{f("updateMessage","id",t);let o="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateUser:async(t,e,s={})=>{f("updateUser","id",t);let o="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateWorkspace:async(t,e,s={})=>{f("updateWorkspace","id",t);let o="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}},updateWorkspaceMember:async(t,e,s={})=>{f("updateWorkspaceMember","id",t);let o="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),r;n&&(r=n.baseOptions);let i={method:"PUT",...r,...s},p={},c={};p["Content-Type"]="application/json",g(a,c);let l=r&&r.headers?r.headers:{};return i.headers={...p,...l,...s.headers},i.data=C(e,i,n),{url:y(a),options:i}}}},m=function(n){let t=Ue(n);return{async addParticipant(e,s,o){let a=await t.addParticipant(e,s,o);return h(a,A.default,u,n)},async breakDownWorkspaceUsageByBot(e,s,o,a){let r=await t.breakDownWorkspaceUsageByBot(e,s,o,a);return h(r,A.default,u,n)},async callAction(e,s){let o=await t.callAction(e,s);return h(o,A.default,u,n)},async changeAISpendQuota(e,s){let o=await t.changeAISpendQuota(e,s);return h(o,A.default,u,n)},async changeWorkspacePlan(e,s,o){let a=await t.changeWorkspacePlan(e,s,o);return h(a,A.default,u,n)},async chargeWorkspaceUnpaidInvoices(e,s,o){let a=await t.chargeWorkspaceUnpaidInvoices(e,s,o);return h(a,A.default,u,n)},async configureIntegration(e,s){let o=await t.configureIntegration(e,s);return h(o,A.default,u,n)},async createBot(e,s){let o=await t.createBot(e,s);return h(o,A.default,u,n)},async createConversation(e,s){let o=await t.createConversation(e,s);return h(o,A.default,u,n)},async createEvent(e,s){let o=await t.createEvent(e,s);return h(o,A.default,u,n)},async createFile(e,s){let o=await t.createFile(e,s);return h(o,A.default,u,n)},async createIntegration(e,s){let o=await t.createIntegration(e,s);return h(o,A.default,u,n)},async createMessage(e,s){let o=await t.createMessage(e,s);return h(o,A.default,u,n)},async createPersonalAccessToken(e,s){let o=await t.createPersonalAccessToken(e,s);return h(o,A.default,u,n)},async createUser(e,s){let o=await t.createUser(e,s);return h(o,A.default,u,n)},async createWorkspace(e,s){let o=await t.createWorkspace(e,s);return h(o,A.default,u,n)},async createWorkspaceMember(e,s){let o=await t.createWorkspaceMember(e,s);return h(o,A.default,u,n)},async deleteBot(e,s){let o=await t.deleteBot(e,s);return h(o,A.default,u,n)},async deleteBotIssue(e,s,o){let a=await t.deleteBotIssue(e,s,o);return h(a,A.default,u,n)},async deleteConversation(e,s){let o=await t.deleteConversation(e,s);return h(o,A.default,u,n)},async deleteFile(e,s){let o=await t.deleteFile(e,s);return h(o,A.default,u,n)},async deleteIntegration(e,s){let o=await t.deleteIntegration(e,s);return h(o,A.default,u,n)},async deleteMessage(e,s){let o=await t.deleteMessage(e,s);return h(o,A.default,u,n)},async deletePersonalAccessToken(e,s){let o=await t.deletePersonalAccessToken(e,s);return h(o,A.default,u,n)},async deleteUser(e,s){let o=await t.deleteUser(e,s);return h(o,A.default,u,n)},async deleteWorkspace(e,s){let o=await t.deleteWorkspace(e,s);return h(o,A.default,u,n)},async deleteWorkspaceMember(e,s){let o=await t.deleteWorkspaceMember(e,s);return h(o,A.default,u,n)},async downloadFile(e,s){let o=await t.downloadFile(e,s);return h(o,A.default,u,n)},async getAccount(e){let s=await t.getAccount(e);return h(s,A.default,u,n)},async getAllWorkspaceQuotaCompletion(e){let s=await t.getAllWorkspaceQuotaCompletion(e);return h(s,A.default,u,n)},async getAuditRecords(e,s,o){let a=await t.getAuditRecords(e,s,o);return h(a,A.default,u,n)},async getBot(e,s){let o=await t.getBot(e,s);return h(o,A.default,u,n)},async getBotAnalytics(e,s,o,a){let r=await t.getBotAnalytics(e,s,o,a);return h(r,A.default,u,n)},async getBotLogs(e,s,o,a,r){let i=await t.getBotLogs(e,s,o,a,r);return h(i,A.default,u,n)},async getBotWebchat(e,s,o){let a=await t.getBotWebchat(e,s,o);return h(a,A.default,u,n)},async getConversation(e,s){let o=await t.getConversation(e,s);return h(o,A.default,u,n)},async getEvent(e,s){let o=await t.getEvent(e,s);return h(o,A.default,u,n)},async getFile(e,s){let o=await t.getFile(e,s);return h(o,A.default,u,n)},async getIntegration(e,s){let o=await t.getIntegration(e,s);return h(o,A.default,u,n)},async getIntegrationByName(e,s,o){let a=await t.getIntegrationByName(e,s,o);return h(a,A.default,u,n)},async getIntegrationLogs(e,s,o,a,r){let i=await t.getIntegrationLogs(e,s,o,a,r);return h(i,A.default,u,n)},async getMessage(e,s){let o=await t.getMessage(e,s);return h(o,A.default,u,n)},async getOrCreateConversation(e,s){let o=await t.getOrCreateConversation(e,s);return h(o,A.default,u,n)},async getOrCreateMessage(e,s){let o=await t.getOrCreateMessage(e,s);return h(o,A.default,u,n)},async getOrCreateUser(e,s){let o=await t.getOrCreateUser(e,s);return h(o,A.default,u,n)},async getParticipant(e,s,o){let a=await t.getParticipant(e,s,o);return h(a,A.default,u,n)},async getPublicIntegration(e,s,o){let a=await t.getPublicIntegration(e,s,o);return h(a,A.default,u,n)},async getPublicIntegrationById(e,s){let o=await t.getPublicIntegrationById(e,s);return h(o,A.default,u,n)},async getState(e,s,o,a){let r=await t.getState(e,s,o,a);return h(r,A.default,u,n)},async getUsage(e,s,o,a){let r=await t.getUsage(e,s,o,a);return h(r,A.default,u,n)},async getUser(e,s){let o=await t.getUser(e,s);return h(o,A.default,u,n)},async getWorkspace(e,s){let o=await t.getWorkspace(e,s);return h(o,A.default,u,n)},async getWorkspaceBillingDetails(e,s){let o=await t.getWorkspaceBillingDetails(e,s);return h(o,A.default,u,n)},async getWorkspaceQuota(e,s,o,a){let r=await t.getWorkspaceQuota(e,s,o,a);return h(r,A.default,u,n)},async introspect(e,s){let o=await t.introspect(e,s);return h(o,A.default,u,n)},async listBotIssueEvents(e,s,o){let a=await t.listBotIssueEvents(e,s,o);return h(a,A.default,u,n)},async listBotIssues(e,s,o){let a=await t.listBotIssues(e,s,o);return h(a,A.default,u,n)},async listBots(e,s,o){let a=await t.listBots(e,s,o);return h(a,A.default,u,n)},async listConversations(e,s,o,a){let r=await t.listConversations(e,s,o,a);return h(r,A.default,u,n)},async listEvents(e,s,o,a,r,i){let p=await t.listEvents(e,s,o,a,r,i);return h(p,A.default,u,n)},async listFiles(e,s,o){let a=await t.listFiles(e,s,o);return h(a,A.default,u,n)},async listIntegrations(e,s,o,a,r){let i=await t.listIntegrations(e,s,o,a,r);return h(i,A.default,u,n)},async listMessages(e,s,o,a){let r=await t.listMessages(e,s,o,a);return h(r,A.default,u,n)},async listParticipants(e,s,o){let a=await t.listParticipants(e,s,o);return h(a,A.default,u,n)},async listPersonalAccessTokens(e){let s=await t.listPersonalAccessTokens(e);return h(s,A.default,u,n)},async listPublicIntegrations(e,s,o,a){let r=await t.listPublicIntegrations(e,s,o,a);return h(r,A.default,u,n)},async listUsageHistory(e,s,o){let a=await t.listUsageHistory(e,s,o);return h(a,A.default,u,n)},async listUsers(e,s,o,a){let r=await t.listUsers(e,s,o,a);return h(r,A.default,u,n)},async listWorkspaceInvoices(e,s){let o=await t.listWorkspaceInvoices(e,s);return h(o,A.default,u,n)},async listWorkspaceMembers(e,s){let o=await t.listWorkspaceMembers(e,s);return h(o,A.default,u,n)},async listWorkspaceQuotas(e,s,o){let a=await t.listWorkspaceQuotas(e,s,o);return h(a,A.default,u,n)},async listWorkspaceUsages(e,s,o,a){let r=await t.listWorkspaceUsages(e,s,o,a);return h(r,A.default,u,n)},async listWorkspaces(e,s){let o=await t.listWorkspaces(e,s);return h(o,A.default,u,n)},async patchState(e,s,o,a,r){let i=await t.patchState(e,s,o,a,r);return h(i,A.default,u,n)},async removeParticipant(e,s,o){let a=await t.removeParticipant(e,s,o);return h(a,A.default,u,n)},async runVrl(e,s){let o=await t.runVrl(e,s);return h(o,A.default,u,n)},async setState(e,s,o,a,r){let i=await t.setState(e,s,o,a,r);return h(i,A.default,u,n)},async setWorkspacePaymentMethod(e,s,o){let a=await t.setWorkspacePaymentMethod(e,s,o);return h(a,A.default,u,n)},async transferBot(e,s,o){let a=await t.transferBot(e,s,o);return h(a,A.default,u,n)},async updateBot(e,s,o){let a=await t.updateBot(e,s,o);return h(a,A.default,u,n)},async updateConversation(e,s,o){let a=await t.updateConversation(e,s,o);return h(a,A.default,u,n)},async updateIntegration(e,s,o){let a=await t.updateIntegration(e,s,o);return h(a,A.default,u,n)},async updateMessage(e,s,o){let a=await t.updateMessage(e,s,o);return h(a,A.default,u,n)},async updateUser(e,s,o){let a=await t.updateUser(e,s,o);return h(a,A.default,u,n)},async updateWorkspace(e,s,o){let a=await t.updateWorkspace(e,s,o);return h(a,A.default,u,n)},async updateWorkspaceMember(e,s,o){let a=await t.updateWorkspaceMember(e,s,o);return h(a,A.default,u,n)}}};var V=class extends q{addParticipant(t,e){return m(this.configuration).addParticipant(t.id,t.addParticipantBody,e).then(s=>s(this.axios,this.basePath))}breakDownWorkspaceUsageByBot(t,e){return m(this.configuration).breakDownWorkspaceUsageByBot(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}callAction(t={},e){return m(this.configuration).callAction(t.callActionBody,e).then(s=>s(this.axios,this.basePath))}changeAISpendQuota(t={},e){return m(this.configuration).changeAISpendQuota(t.changeAISpendQuotaBody,e).then(s=>s(this.axios,this.basePath))}changeWorkspacePlan(t,e){return m(this.configuration).changeWorkspacePlan(t.id,t.changeWorkspacePlanBody,e).then(s=>s(this.axios,this.basePath))}chargeWorkspaceUnpaidInvoices(t,e){return m(this.configuration).chargeWorkspaceUnpaidInvoices(t.id,t.chargeWorkspaceUnpaidInvoicesBody,e).then(s=>s(this.axios,this.basePath))}configureIntegration(t={},e){return m(this.configuration).configureIntegration(t.configureIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createBot(t={},e){return m(this.configuration).createBot(t.createBotBody,e).then(s=>s(this.axios,this.basePath))}createConversation(t={},e){return m(this.configuration).createConversation(t.createConversationBody,e).then(s=>s(this.axios,this.basePath))}createEvent(t={},e){return m(this.configuration).createEvent(t.createEventBody,e).then(s=>s(this.axios,this.basePath))}createFile(t={},e){return m(this.configuration).createFile(t.createFileBody,e).then(s=>s(this.axios,this.basePath))}createIntegration(t={},e){return m(this.configuration).createIntegration(t.createIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createMessage(t={},e){return m(this.configuration).createMessage(t.createMessageBody,e).then(s=>s(this.axios,this.basePath))}createPersonalAccessToken(t={},e){return m(this.configuration).createPersonalAccessToken(t.createPersonalAccessTokenBody,e).then(s=>s(this.axios,this.basePath))}createUser(t={},e){return m(this.configuration).createUser(t.createUserBody,e).then(s=>s(this.axios,this.basePath))}createWorkspace(t={},e){return m(this.configuration).createWorkspace(t.createWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}createWorkspaceMember(t={},e){return m(this.configuration).createWorkspaceMember(t.createWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}deleteBot(t,e){return m(this.configuration).deleteBot(t.id,e).then(s=>s(this.axios,this.basePath))}deleteBotIssue(t,e){return m(this.configuration).deleteBotIssue(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}deleteConversation(t,e){return m(this.configuration).deleteConversation(t.id,e).then(s=>s(this.axios,this.basePath))}deleteFile(t,e){return m(this.configuration).deleteFile(t.id,e).then(s=>s(this.axios,this.basePath))}deleteIntegration(t,e){return m(this.configuration).deleteIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}deleteMessage(t,e){return m(this.configuration).deleteMessage(t.id,e).then(s=>s(this.axios,this.basePath))}deletePersonalAccessToken(t,e){return m(this.configuration).deletePersonalAccessToken(t.id,e).then(s=>s(this.axios,this.basePath))}deleteUser(t,e){return m(this.configuration).deleteUser(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspace(t,e){return m(this.configuration).deleteWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspaceMember(t,e){return m(this.configuration).deleteWorkspaceMember(t.id,e).then(s=>s(this.axios,this.basePath))}downloadFile(t,e){return m(this.configuration).downloadFile(t.id,e).then(s=>s(this.axios,this.basePath))}getAccount(t){return m(this.configuration).getAccount(t).then(e=>e(this.axios,this.basePath))}getAllWorkspaceQuotaCompletion(t){return m(this.configuration).getAllWorkspaceQuotaCompletion(t).then(e=>e(this.axios,this.basePath))}getAuditRecords(t,e){return m(this.configuration).getAuditRecords(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBot(t,e){return m(this.configuration).getBot(t.id,e).then(s=>s(this.axios,this.basePath))}getBotAnalytics(t,e){return m(this.configuration).getBotAnalytics(t.id,t.startDate,t.endDate,e).then(s=>s(this.axios,this.basePath))}getBotLogs(t,e){return m(this.configuration).getBotLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBotWebchat(t,e){return m(this.configuration).getBotWebchat(t.id,t.type,e).then(s=>s(this.axios,this.basePath))}getConversation(t,e){return m(this.configuration).getConversation(t.id,e).then(s=>s(this.axios,this.basePath))}getEvent(t,e){return m(this.configuration).getEvent(t.id,e).then(s=>s(this.axios,this.basePath))}getFile(t,e){return m(this.configuration).getFile(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegration(t,e){return m(this.configuration).getIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegrationByName(t,e){return m(this.configuration).getIntegrationByName(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getIntegrationLogs(t,e){return m(this.configuration).getIntegrationLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getMessage(t,e){return m(this.configuration).getMessage(t.id,e).then(s=>s(this.axios,this.basePath))}getOrCreateConversation(t={},e){return m(this.configuration).getOrCreateConversation(t.getOrCreateConversationBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateMessage(t={},e){return m(this.configuration).getOrCreateMessage(t.getOrCreateMessageBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateUser(t={},e){return m(this.configuration).getOrCreateUser(t.getOrCreateUserBody,e).then(s=>s(this.axios,this.basePath))}getParticipant(t,e){return m(this.configuration).getParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}getPublicIntegration(t,e){return m(this.configuration).getPublicIntegration(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getPublicIntegrationById(t,e){return m(this.configuration).getPublicIntegrationById(t.id,e).then(s=>s(this.axios,this.basePath))}getState(t,e){return m(this.configuration).getState(t.type,t.id,t.name,e).then(s=>s(this.axios,this.basePath))}getUsage(t,e){return m(this.configuration).getUsage(t.type,t.id,t.period,e).then(s=>s(this.axios,this.basePath))}getUser(t,e){return m(this.configuration).getUser(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspace(t,e){return m(this.configuration).getWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspaceBillingDetails(t,e){return m(this.configuration).getWorkspaceBillingDetails(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspaceQuota(t,e){return m(this.configuration).getWorkspaceQuota(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}introspect(t={},e){return m(this.configuration).introspect(t.introspectBody,e).then(s=>s(this.axios,this.basePath))}listBotIssueEvents(t,e){return m(this.configuration).listBotIssueEvents(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}listBotIssues(t,e){return m(this.configuration).listBotIssues(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listBots(t={},e){return m(this.configuration).listBots(t.dev,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listConversations(t={},e){return m(this.configuration).listConversations(t.nextToken,t.tags,t.participantIds,e).then(s=>s(this.axios,this.basePath))}listEvents(t={},e){return m(this.configuration).listEvents(t.nextToken,t.type,t.conversationId,t.userId,t.messageId,e).then(s=>s(this.axios,this.basePath))}listFiles(t,e){return m(this.configuration).listFiles(t.botId,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listIntegrations(t={},e){return m(this.configuration).listIntegrations(t.nextToken,t.name,t.version,t.dev,e).then(s=>s(this.axios,this.basePath))}listMessages(t={},e){return m(this.configuration).listMessages(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listParticipants(t,e){return m(this.configuration).listParticipants(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listPersonalAccessTokens(t){return m(this.configuration).listPersonalAccessTokens(t).then(e=>e(this.axios,this.basePath))}listPublicIntegrations(t={},e){return m(this.configuration).listPublicIntegrations(t.nextToken,t.name,t.version,e).then(s=>s(this.axios,this.basePath))}listUsageHistory(t,e){return m(this.configuration).listUsageHistory(t.type,t.id,e).then(s=>s(this.axios,this.basePath))}listUsers(t={},e){return m(this.configuration).listUsers(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listWorkspaceInvoices(t,e){return m(this.configuration).listWorkspaceInvoices(t.id,e).then(s=>s(this.axios,this.basePath))}listWorkspaceMembers(t={},e){return m(this.configuration).listWorkspaceMembers(t.nextToken,e).then(s=>s(this.axios,this.basePath))}listWorkspaceQuotas(t,e){return m(this.configuration).listWorkspaceQuotas(t.id,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaceUsages(t,e){return m(this.configuration).listWorkspaceUsages(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaces(t={},e){return m(this.configuration).listWorkspaces(t.nextToken,e).then(s=>s(this.axios,this.basePath))}patchState(t,e){return m(this.configuration).patchState(t.type,t.id,t.name,t.patchStateBody,e).then(s=>s(this.axios,this.basePath))}removeParticipant(t,e){return m(this.configuration).removeParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}runVrl(t={},e){return m(this.configuration).runVrl(t.runVrlBody,e).then(s=>s(this.axios,this.basePath))}setState(t,e){return m(this.configuration).setState(t.type,t.id,t.name,t.setStateBody,e).then(s=>s(this.axios,this.basePath))}setWorkspacePaymentMethod(t,e){return m(this.configuration).setWorkspacePaymentMethod(t.id,t.setWorkspacePaymentMethodBody,e).then(s=>s(this.axios,this.basePath))}transferBot(t,e){return m(this.configuration).transferBot(t.id,t.transferBotBody,e).then(s=>s(this.axios,this.basePath))}updateBot(t,e){return m(this.configuration).updateBot(t.id,t.updateBotBody,e).then(s=>s(this.axios,this.basePath))}updateConversation(t,e){return m(this.configuration).updateConversation(t.id,t.updateConversationBody,e).then(s=>s(this.axios,this.basePath))}updateIntegration(t,e){return m(this.configuration).updateIntegration(t.id,t.updateIntegrationBody,e).then(s=>s(this.axios,this.basePath))}updateMessage(t,e){return m(this.configuration).updateMessage(t.id,t.updateMessageBody,e).then(s=>s(this.axios,this.basePath))}updateUser(t,e){return m(this.configuration).updateUser(t.id,t.updateUserBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspace(t,e){return m(this.configuration).updateWorkspace(t.id,t.updateWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspaceMember(t,e){return m(this.configuration).updateWorkspaceMember(t.id,t.updateWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}};var ne=k(require("crypto"));var qe={getRandomValues:n=>new Uint8Array(n.map(()=>Math.floor(Math.random()*256)))},ee=typeof window<"u"&&typeof window.document<"u"?window.crypto:ne.default;ee.getRandomValues||(ee=qe);var P=class extends Error{constructor(e,s,o,a,r,i){super(a);this.code=e;this.description=s;this.type=o;this.message=a;this.error=r;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],o=4,a=Array.from(ee.getRandomValues(new Uint8Array(o))).map(r=>r.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"}},ve=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,re=n=>n instanceof P||ve(n)&&n.isApiError===!0,b=class extends P{constructor(t,e,s){super(500,"An unknown error occurred","Unknown",t,e,s)}},W=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)}},D=class extends P{constructor(t,e,s){super(403,"The requested action can't be peform by this resource.","Forbidden",t,e,s)}},T=class extends P{constructor(t,e,s){super(413,"The request payload is too large.","PayloadTooLarge",t,e,s)}},O=class extends P{constructor(t,e,s){super(400,"The request payload is invalid.","InvalidPayload",t,e,s)}},w=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)}},S=class extends P{constructor(t,e,s){super(404,"The requested resource does not exist.","ResourceNotFound",t,e,s)}},L=class extends P{constructor(t,e,s){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,e,s)}},G=class extends P{constructor(t,e,s){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,e,s)}},_=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)}},F=class extends P{constructor(t,e,s){super(409,"The resource is not related with another resource. This is usually caused when providing two resources that aren't linked together.","RelationConflict",t,e,s)}},Q=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)}},j=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)}},N=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)}},H=class extends P{constructor(t,e,s){super(409,"The record attempted to be created already exists.","AlreadyExists",t,e,s)}},$=class extends P{constructor(t,e,s){super(429,"The request has been rate limited.","RateLimited",t,e,s)}},K=class extends P{constructor(t,e,s){super(402,"A payment is required to perform this request.","PaymentRequired",t,e,s)}},J=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)}},Ve={Unknown:b,Internal:W,Unauthorized:E,Forbidden:D,PayloadTooLarge:T,InvalidPayload:O,UnsupportedMediaType:w,MethodNotFound:M,ResourceNotFound:S,InvalidJsonSchema:L,InvalidDataFormat:G,InvalidIdentifier:_,RelationConflict:F,ReferenceNotFound:Q,InvalidQuery:j,Runtime:N,AlreadyExists:H,RateLimited:$,PaymentRequired:K,QuotaExceeded:J,LimitExceeded:z},Y=n=>re(n)?n:n instanceof Error?new b(n.message,n):typeof n=="string"?new b(n):We(n);function We(n){if(typeof n=="object"&&"code"in n&&"type"in n&&"id"in n&&"message"in n&&typeof n.type=="string"&&typeof n.message=="string"){let t=Ve[n.type];return t?new t(n.message,void 0,n.id||"UNKNOWN"):new b(`An unclassified API error occurred: ${n.message} (Type: ${n.type}, Code: ${n.code})`)}return new b("An invalid error occurred: "+JSON.stringify(n))}var Z=class{_innerClient;constructor(t,e,s){this._innerClient=new V(t,e,s)}createConversation=t=>this._innerClient.createConversation({createConversationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getConversation=t=>this._innerClient.getConversation(t).then(e=>e.data).catch(e=>{throw R(e)});listConversations=t=>this._innerClient.listConversations(t).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateConversation=t=>this._innerClient.getOrCreateConversation({getOrCreateConversationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateConversation=({id:t,...e})=>this._innerClient.updateConversation({id:t,updateConversationBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteConversation=t=>this._innerClient.deleteConversation(t).then(e=>e.data).catch(e=>{throw R(e)});listParticipants=t=>this._innerClient.listParticipants(t).then(e=>e.data).catch(e=>{throw R(e)});addParticipant=({id:t,...e})=>this._innerClient.addParticipant({id:t,addParticipantBody:e}).then(s=>s.data).catch(s=>{throw R(s)});getParticipant=t=>this._innerClient.getParticipant(t).then(e=>e.data).catch(e=>{throw R(e)});removeParticipant=t=>this._innerClient.removeParticipant(t).then(e=>e.data).catch(e=>{throw R(e)});createEvent=t=>this._innerClient.createEvent({createEventBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getEvent=t=>this._innerClient.getEvent(t).then(e=>e.data).catch(e=>{throw R(e)});listEvents=t=>this._innerClient.listEvents(t).then(e=>e.data).catch(e=>{throw R(e)});createMessage=t=>this._innerClient.createMessage({createMessageBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateMessage=t=>this._innerClient.getOrCreateMessage({getOrCreateMessageBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getMessage=t=>this._innerClient.getMessage(t).then(e=>e.data).catch(e=>{throw R(e)});updateMessage=({id:t,...e})=>this._innerClient.updateMessage({id:t,updateMessageBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listMessages=t=>this._innerClient.listMessages(t).then(e=>e.data).catch(e=>{throw R(e)});deleteMessage=t=>this._innerClient.deleteMessage(t).then(e=>e.data).catch(e=>{throw R(e)});createUser=t=>this._innerClient.createUser({createUserBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getUser=t=>this._innerClient.getUser(t).then(e=>e.data).catch(e=>{throw R(e)});listUsers=t=>this._innerClient.listUsers(t).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateUser=t=>this._innerClient.getOrCreateUser({getOrCreateUserBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateUser=({id:t,...e})=>this._innerClient.updateUser({id:t,updateUserBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteUser=t=>this._innerClient.deleteUser(t).then(e=>e.data).catch(e=>{throw R(e)});getState=t=>this._innerClient.getState(t).then(e=>e.data).catch(e=>{throw R(e)});setState=({type:t,id:e,name:s,...o})=>this._innerClient.setState({type:t,id:e,name:s,setStateBody:o}).then(a=>a.data).catch(a=>{throw R(a)});patchState=({type:t,id:e,name:s,...o})=>this._innerClient.patchState({type:t,id:e,name:s,patchStateBody:o}).then(a=>a.data).catch(a=>{throw R(a)});callAction=t=>this._innerClient.callAction({callActionBody:t}).then(e=>e.data).catch(e=>{throw R(e)});configureIntegration=t=>this._innerClient.configureIntegration({configureIntegrationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});runVrl=t=>this._innerClient.runVrl({runVrlBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getAccount=()=>this._innerClient.getAccount().then(t=>t.data).catch(t=>{throw R(t)});listPersonalAccessTokens=()=>this._innerClient.listPersonalAccessTokens().then(t=>t.data).catch(t=>{throw R(t)});createPersonalAccessToken=t=>this._innerClient.createPersonalAccessToken({createPersonalAccessTokenBody:t}).then(e=>e.data).catch(e=>{throw R(e)});deletePersonalAccessToken=t=>this._innerClient.deletePersonalAccessToken(t).then(e=>e.data).catch(e=>{throw R(e)});listPublicIntegrations=t=>this._innerClient.listPublicIntegrations(t).then(e=>e.data).catch(e=>{throw R(e)});getPublicIntegrationById=t=>this._innerClient.getPublicIntegrationById(t).then(e=>e.data).catch(e=>{throw R(e)});getPublicIntegration=t=>this._innerClient.getPublicIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});createBot=t=>this._innerClient.createBot({createBotBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateBot=({id:t,...e})=>this._innerClient.updateBot({id:t,updateBotBody:e}).then(s=>s.data).catch(s=>{throw R(s)});transferBot=({id:t,...e})=>this._innerClient.transferBot({id:t,transferBotBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listBots=t=>this._innerClient.listBots(t).then(e=>e.data).catch(e=>{throw R(e)});getBot=t=>this._innerClient.getBot(t).then(e=>e.data).catch(e=>{throw R(e)});deleteBot=t=>this._innerClient.deleteBot(t).then(e=>e.data).catch(e=>{throw R(e)});getBotLogs=t=>this._innerClient.getBotLogs(t).then(e=>e.data).catch(e=>{throw R(e)});getBotWebchat=t=>this._innerClient.getBotWebchat(t).then(e=>e.data).catch(e=>{throw R(e)});getBotAnalytics=t=>this._innerClient.getBotAnalytics(t).then(e=>e.data).catch(e=>{throw R(e)});listBotIssues=t=>this._innerClient.listBotIssues(t).then(e=>e.data).catch(e=>{throw R(e)});deleteBotIssue=t=>this._innerClient.deleteBotIssue(t).then(e=>e.data).catch(e=>{throw R(e)});listBotIssueEvents=t=>this._innerClient.listBotIssueEvents(t).then(e=>e.data).catch(e=>{throw R(e)});getWorkspaceBillingDetails=t=>this._innerClient.getWorkspaceBillingDetails(t).then(e=>e.data).catch(e=>{throw R(e)});setWorkspacePaymentMethod=({id:t,...e})=>this._innerClient.setWorkspacePaymentMethod({id:t,setWorkspacePaymentMethodBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listWorkspaceInvoices=t=>this._innerClient.listWorkspaceInvoices(t).then(e=>e.data).catch(e=>{throw R(e)});chargeWorkspaceUnpaidInvoices=({id:t,...e})=>this._innerClient.chargeWorkspaceUnpaidInvoices({id:t,chargeWorkspaceUnpaidInvoicesBody:e}).then(s=>s.data).catch(s=>{throw R(s)});createWorkspace=t=>this._innerClient.createWorkspace({createWorkspaceBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getWorkspace=t=>this._innerClient.getWorkspace(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceUsages=t=>this._innerClient.listWorkspaceUsages(t).then(e=>e.data).catch(e=>{throw R(e)});breakDownWorkspaceUsageByBot=t=>this._innerClient.breakDownWorkspaceUsageByBot(t).then(e=>e.data).catch(e=>{throw R(e)});getAllWorkspaceQuotaCompletion=()=>this._innerClient.getAllWorkspaceQuotaCompletion().then(t=>t.data).catch(t=>{throw R(t)});getWorkspaceQuota=t=>this._innerClient.getWorkspaceQuota(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceQuotas=t=>this._innerClient.listWorkspaceQuotas(t).then(e=>e.data).catch(e=>{throw R(e)});updateWorkspace=({id:t,...e})=>this._innerClient.updateWorkspace({id:t,updateWorkspaceBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listWorkspaces=t=>this._innerClient.listWorkspaces(t).then(e=>e.data).catch(e=>{throw R(e)});changeWorkspacePlan=({id:t,...e})=>this._innerClient.changeWorkspacePlan({id:t,changeWorkspacePlanBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteWorkspace=t=>this._innerClient.deleteWorkspace(t).then(e=>e.data).catch(e=>{throw R(e)});getAuditRecords=t=>this._innerClient.getAuditRecords(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceMembers=t=>this._innerClient.listWorkspaceMembers(t).then(e=>e.data).catch(e=>{throw R(e)});deleteWorkspaceMember=t=>this._innerClient.deleteWorkspaceMember(t).then(e=>e.data).catch(e=>{throw R(e)});createWorkspaceMember=t=>this._innerClient.createWorkspaceMember({createWorkspaceMemberBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateWorkspaceMember=({id:t,...e})=>this._innerClient.updateWorkspaceMember({id:t,updateWorkspaceMemberBody:e}).then(s=>s.data).catch(s=>{throw R(s)});createIntegration=t=>this._innerClient.createIntegration({createIntegrationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateIntegration=({id:t,...e})=>this._innerClient.updateIntegration({id:t,updateIntegrationBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listIntegrations=t=>this._innerClient.listIntegrations(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegration=t=>this._innerClient.getIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegrationLogs=t=>this._innerClient.getIntegrationLogs(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegrationByName=t=>this._innerClient.getIntegrationByName(t).then(e=>e.data).catch(e=>{throw R(e)});deleteIntegration=t=>this._innerClient.deleteIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});getUsage=t=>this._innerClient.getUsage(t).then(e=>e.data).catch(e=>{throw R(e)});listUsageHistory=t=>this._innerClient.listUsageHistory(t).then(e=>e.data).catch(e=>{throw R(e)});changeAISpendQuota=t=>this._innerClient.changeAISpendQuota({changeAISpendQuotaBody:t}).then(e=>e.data).catch(e=>{throw R(e)});introspect=t=>this._innerClient.introspect({introspectBody:t}).then(e=>e.data).catch(e=>{throw R(e)});createFile=t=>this._innerClient.createFile({createFileBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getFile=t=>this._innerClient.getFile(t).then(e=>e.data).catch(e=>{throw R(e)});downloadFile=t=>this._innerClient.downloadFile(t).then(e=>e.data).catch(e=>{throw R(e)});deleteFile=t=>this._innerClient.deleteFile(t).then(e=>e.data).catch(e=>{throw R(e)});listFiles=t=>this._innerClient.listFiles(t).then(e=>e.data).catch(e=>{throw R(e)})};function R(n){return ie.default.isAxiosError(n)&&n.response?.data?Y(n.response.data):Y(n)}var Oe=k(require("axios")),ce=100*1024*1024,Ee=ce,De=ce,te=class extends Z{config;constructor(t={}){let e=ae(t),{apiUrl:s,headers:o,withCredentials:a,timeout:r}=e,i=pe.default.create({headers:o,withCredentials:a,timeout:r,maxBodyLength:Ee,maxContentLength:De});super(void 0,s,i),this.config=e}};0&&(module.exports={AlreadyExistsError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceNotFoundError,RelationConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,axios,errorFrom,isApiError});
1
+ "use strict";var ge=Object.create;var U=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var Ae=Object.getPrototypeOf,me=Object.prototype.hasOwnProperty;var Re=(r,t)=>{for(var e in t)U(r,e,{get:t[e],enumerable:!0})},oe=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of he(t))!me.call(r,o)&&o!==e&&U(r,o,{get:()=>t[o],enumerable:!(s=ye(t,o))||s.enumerable});return r};var I=(r,t,e)=>(e=r!=null?ge(Ae(r)):{},oe(t||!r||!r.__esModule?U(e,"default",{value:r,enumerable:!0}):e,r)),fe=r=>oe(U({},"__esModule",{value:!0}),r);var we={};Re(we,{AlreadyExistsError:()=>$,Client:()=>ae,ForbiddenError:()=>W,InternalError:()=>E,InvalidDataFormatError:()=>_,InvalidIdentifierError:()=>F,InvalidJsonSchemaError:()=>G,InvalidPayloadError:()=>w,InvalidQueryError:()=>H,LimitExceededError:()=>Y,MethodNotFoundError:()=>M,PayloadTooLargeError:()=>O,PaymentRequiredError:()=>J,QuotaExceededError:()=>z,RateLimitedError:()=>K,ReferenceNotFoundError:()=>j,RelationConflictError:()=>Q,ResourceNotFoundError:()=>L,RuntimeError:()=>N,UnauthorizedError:()=>D,UnknownError:()=>B,UnsupportedMediaTypeError:()=>S,axios:()=>Se,errorFrom:()=>Z,isApiError:()=>ce});module.exports=fe(we);var le=I(require("axios"));var q=require("browser-or-node"),xe="https://api.botpress.cloud",Ce=6e4,Pe="BP_API_URL",be="BP_BOT_ID",ke="BP_INTEGRATION_ID",Be="BP_WORKSPACE_ID",Ie="BP_TOKEN";function ne(r){let t=qe(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??xe,o=t.timeout??Ce;return{apiUrl:s,timeout:o,withCredentials:q.isBrowser,headers:e}}function qe(r){return q.isBrowser?r:q.isNode?Ue(r):r}function Ue(r){let t={...r,apiUrl:r.apiUrl??process.env[Pe],botId:r.botId??process.env[be],integrationId:r.integrationId??process.env[ke],workspaceId:r.workspaceId??process.env[Be]},e=t.token??process.env[Ie];return e&&(t.token=e),t}var pe=I(require("axios"));var A=I(require("axios"));var re=I(require("axios")),u="https://api.botpress.cloud".replace(/\/+$/,"");var T=class{constructor(t,e=u,s=re.default){this.basePath=e;this.axios=s;t&&(this.configuration=t,this.basePath=t.basePath||this.basePath)}configuration},V=class extends Error{constructor(e,s){super(s);this.field=e;this.name="RequiredError"}};var d="https://example.com",f=function(r,t,e){if(e==null)throw new V(t,`Required parameter ${t} was null or undefined when calling ${r}.`)};function te(r,t,e=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>te(r,s,e)):Object.keys(t).forEach(s=>te(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);te(e,t),r.search=e.toString()},C=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},h=function(r,t,e,s){return(o=t,a=e)=>{let n={...r.options,url:(s?.basePath||a)+r.url};return o.request(n)}};var Te=function(r){return{addParticipant:async(t,e,s={})=>{f("addParticipant","id",t);let o="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"POST",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},breakDownWorkspaceUsageByBot:async(t,e,s,o={})=>{f("breakDownWorkspaceUsageByBot","id",t),f("breakDownWorkspaceUsageByBot","type",e);let a="/v1/admin/workspaces/{id}/usages/by-bot".replace("{id}",encodeURIComponent(String(t))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},callAction:async(t,e={})=>{let s="/v1/chat/actions",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},changeAISpendQuota:async(t,e={})=>{let s="/v1/admin/quotas/ai-spend",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"PUT",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},changeWorkspacePlan:async(t,e,s={})=>{f("changeWorkspacePlan","id",t);let o="/v1/admin/workspaces/{id}/change-plan".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},chargeWorkspaceUnpaidInvoices:async(t,e,s={})=>{f("chargeWorkspaceUnpaidInvoices","id",t);let o="/v1/admin/workspaces/{id}/billing/invoices/charge-unpaid".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"POST",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},checkHandleAvailability:async(t,e={})=>{let s="/v1/admin/workspaces/handle-availability",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"PUT",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},configureIntegration:async(t,e={})=>{let s="/v1/chat/integrations/configure",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createBot:async(t,e={})=>{let s="/v1/admin/bots",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createConversation:async(t,e={})=>{let s="/v1/chat/conversations",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createEvent:async(t,e={})=>{let s="/v1/chat/events",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createFile:async(t,e={})=>{let s="/v1/storage/files",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createIntegration:async(t,e={})=>{let s="/v1/admin/integrations",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createMessage:async(t,e={})=>{let s="/v1/chat/messages",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createPersonalAccessToken:async(t,e={})=>{let s="/v1/admin/account/pats",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createTask:async(t,e={})=>{let s="/v1/chat/tasks",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createUser:async(t,e={})=>{let s="/v1/chat/users",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createWorkspace:async(t,e={})=>{let s="/v1/admin/workspaces",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},createWorkspaceMember:async(t,e={})=>{let s="/v1/admin/workspace-members",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},deleteBot:async(t,e={})=>{f("deleteBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteBotIssue:async(t,e,s={})=>{f("deleteBotIssue","id",t),f("deleteBotIssue","issueId",e);let o="/v1/admin/bots/{id}/issues/{issueId}".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"DELETE",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},deleteConversation:async(t,e={})=>{f("deleteConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteFile:async(t,e={})=>{f("deleteFile","id",t);let s="/v1/storage/files/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteIntegration:async(t,e={})=>{f("deleteIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteMessage:async(t,e={})=>{f("deleteMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deletePersonalAccessToken:async(t,e={})=>{f("deletePersonalAccessToken","id",t);let s="/v1/admin/account/pats/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteTask:async(t,e={})=>{f("deleteTask","id",t);let s="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteUser:async(t,e={})=>{f("deleteUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteWorkspace:async(t,e={})=>{f("deleteWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},deleteWorkspaceMember:async(t,e={})=>{f("deleteWorkspaceMember","id",t);let s="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"DELETE",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},downloadFile:async(t,e={})=>{f("downloadFile","id",t);let s="/v1/storage/files/{id}/download".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getAccount:async(t={})=>{let e="/v1/admin/account/me",s=new URL(e,d),o;r&&(o=r.baseOptions);let a={method:"GET",...o,...t},n={};g(s,{});let c=o&&o.headers?o.headers:{};return a.headers={...n,...c,...t.headers},{url:y(s),options:a}},getAccountPreference:async(t,e={})=>{f("getAccountPreference","key",t);let s="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getAllWorkspaceQuotaCompletion:async(t={})=>{let e="/v1/admin/workspaces/usages/quota-completion",s=new URL(e,d),o;r&&(o=r.baseOptions);let a={method:"GET",...o,...t},n={};g(s,{});let c=o&&o.headers?o.headers:{};return a.headers={...n,...c,...t.headers},{url:y(s),options:a}},getAuditRecords:async(t,e,s={})=>{f("getAuditRecords","id",t);let o="/v1/admin/workspaces/{id}/audit-records".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.nextToken=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},getBot:async(t,e={})=>{f("getBot","id",t);let s="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getBotAnalytics:async(t,e,s,o={})=>{f("getBotAnalytics","id",t),f("getBotAnalytics","startDate",e),f("getBotAnalytics","endDate",s);let a="/v1/admin/bots/{id}/analytics".replace("{id}",encodeURIComponent(String(t))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};e!==void 0&&(l.startDate=e),s!==void 0&&(l.endDate=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},getBotLogs:async(t,e,s,o,a={})=>{f("getBotLogs","id",t),f("getBotLogs","timeStart",e),f("getBotLogs","timeEnd",s);let n="/v1/admin/bots/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,d),c;r&&(c=r.baseOptions);let p={method:"GET",...c,...a},l={},x={};e!==void 0&&(x.timeStart=e),s!==void 0&&(x.timeEnd=s),o!==void 0&&(x.nextToken=o),g(i,x);let b=c&&c.headers?c.headers:{};return p.headers={...l,...b,...a.headers},{url:y(i),options:p}},getBotWebchat:async(t,e,s={})=>{f("getBotWebchat","id",t),f("getBotWebchat","type",e);let o="/v1/admin/bots/{id}/webchat".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.type=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},getConversation:async(t,e={})=>{f("getConversation","id",t);let s="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getEvent:async(t,e={})=>{f("getEvent","id",t);let s="/v1/chat/events/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getFile:async(t,e={})=>{f("getFile","id",t);let s="/v1/storage/files/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getIntegration:async(t,e={})=>{f("getIntegration","id",t);let s="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getIntegrationByName:async(t,e,s={})=>{f("getIntegrationByName","name",t),f("getIntegrationByName","version",e);let o="/v1/admin/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},getIntegrationLogs:async(t,e,s,o,a={})=>{f("getIntegrationLogs","id",t),f("getIntegrationLogs","timeStart",e),f("getIntegrationLogs","timeEnd",s);let n="/v1/admin/integrations/{id}/logs".replace("{id}",encodeURIComponent(String(t))),i=new URL(n,d),c;r&&(c=r.baseOptions);let p={method:"GET",...c,...a},l={},x={};e!==void 0&&(x.timeStart=e),s!==void 0&&(x.timeEnd=s),o!==void 0&&(x.nextToken=o),g(i,x);let b=c&&c.headers?c.headers:{};return p.headers={...l,...b,...a.headers},{url:y(i),options:p}},getMessage:async(t,e={})=>{f("getMessage","id",t);let s="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getOrCreateConversation:async(t,e={})=>{let s="/v1/chat/conversations/get-or-create",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},getOrCreateMessage:async(t,e={})=>{let s="/v1/chat/messages/get-or-create",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},getOrCreateUser:async(t,e={})=>{let s="/v1/chat/users/get-or-create",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},getParticipant:async(t,e,s={})=>{f("getParticipant","id",t),f("getParticipant","userId",e);let o="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},getPublicIntegration:async(t,e,s={})=>{f("getPublicIntegration","name",t),f("getPublicIntegration","version",e);let o="/v1/admin/hub/integrations/{name}/{version}".replace("{name}",encodeURIComponent(String(t))).replace("{version}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},getPublicIntegrationById:async(t,e={})=>{f("getPublicIntegrationById","id",t);let s="/v1/admin/hub/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getState:async(t,e,s,o={})=>{f("getState","type",t),f("getState","id",e),f("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))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={};g(n,{});let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},getTask:async(t,e={})=>{f("getTask","id",t);let s="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getUsage:async(t,e,s,o={})=>{f("getUsage","type",t),f("getUsage","id",e);let a="/v1/admin/usages/{id}".replace("{id}",encodeURIComponent(String(e))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};t!==void 0&&(l.type=t),s!==void 0&&(l.period=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},getUser:async(t,e={})=>{f("getUser","id",t);let s="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getWorkspace:async(t,e={})=>{f("getWorkspace","id",t);let s="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getWorkspaceBillingDetails:async(t,e={})=>{f("getWorkspaceBillingDetails","id",t);let s="/v1/admin/workspaces/{id}/billing/details".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},getWorkspaceQuota:async(t,e,s,o={})=>{f("getWorkspaceQuota","id",t),f("getWorkspaceQuota","type",e);let a="/v1/admin/workspaces/{id}/quota".replace("{id}",encodeURIComponent(String(t))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},introspect:async(t,e={})=>{let s="/v1/admin/introspect",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},listBotIssueEvents:async(t,e,s={})=>{f("listBotIssueEvents","id",t),f("listBotIssueEvents","issueId",e);let o="/v1/admin/bots/{id}/issues/{issueId}/events".replace("{id}",encodeURIComponent(String(t))).replace("{issueId}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listBotIssues:async(t,e,s={})=>{f("listBotIssues","id",t);let o="/v1/admin/bots/{id}/issues".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.nextToken=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listBots:async(t,e,s={})=>{let o="/v1/admin/bots",a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};t!==void 0&&(p.dev=t),e!==void 0&&(p.nextToken=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listConversations:async(t,e,s,o={})=>{let a="/v1/chat/conversations",n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.tags=e),s&&(l.participantIds=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},listEvents:async(t,e,s,o,a,n={})=>{let i="/v1/chat/events",c=new URL(i,d),p;r&&(p=r.baseOptions);let l={method:"GET",...p,...n},x={},b={};t!==void 0&&(b.nextToken=t),e!==void 0&&(b.type=e),s!==void 0&&(b.conversationId=s),o!==void 0&&(b.userId=o),a!==void 0&&(b.messageId=a),g(c,b);let ee=p&&p.headers?p.headers:{};return l.headers={...x,...ee,...n.headers},{url:y(c),options:l}},listFiles:async(t,e,s={})=>{f("listFiles","botId",t);let o="/v1/storage/files",a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.nextToken=e),t!==void 0&&(p.botId=t),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listIntegrations:async(t,e,s,o,a={})=>{let n="/v1/admin/integrations",i=new URL(n,d),c;r&&(c=r.baseOptions);let p={method:"GET",...c,...a},l={},x={};t!==void 0&&(x.nextToken=t),e!==void 0&&(x.name=e),s!==void 0&&(x.version=s),o!==void 0&&(x.dev=o),g(i,x);let b=c&&c.headers?c.headers:{};return p.headers={...l,...b,...a.headers},{url:y(i),options:p}},listMessages:async(t,e,s,o={})=>{let a="/v1/chat/messages",n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.conversationId=e),s!==void 0&&(l.tags=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},listParticipants:async(t,e,s={})=>{f("listParticipants","id",t);let o="/v1/chat/conversations/{id}/participants".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.nextToken=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listPersonalAccessTokens:async(t={})=>{let e="/v1/admin/account/pats",s=new URL(e,d),o;r&&(o=r.baseOptions);let a={method:"GET",...o,...t},n={};g(s,{});let c=o&&o.headers?o.headers:{};return a.headers={...n,...c,...t.headers},{url:y(s),options:a}},listPublicIntegrations:async(t,e,s,o={})=>{let a="/v1/admin/hub/integrations",n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.name=e),s!==void 0&&(l.version=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},listTasks:async(t,e,s,o,a,n,i,c={})=>{let p="/v1/chat/tasks",l=new URL(p,d),x;r&&(x=r.baseOptions);let b={method:"GET",...x,...c},ee={},k={};t!==void 0&&(k.nextToken=t),e!==void 0&&(k.tags=e),s!==void 0&&(k.conversationId=s),o!==void 0&&(k.userId=o),a!==void 0&&(k.parentTaskId=a),n!==void 0&&(k.status=n),i!==void 0&&(k.type=i),g(l,k);let de=x&&x.headers?x.headers:{};return b.headers={...ee,...de,...c.headers},{url:y(l),options:b}},listUsageHistory:async(t,e,s={})=>{f("listUsageHistory","type",t),f("listUsageHistory","id",e);let o="/v1/admin/usages/{id}/history".replace("{id}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};t!==void 0&&(p.type=t),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listUsers:async(t,e,s,o={})=>{let a="/v1/chat/users",n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};t!==void 0&&(l.nextToken=t),e!==void 0&&(l.conversationId=e),s!==void 0&&(l.tags=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},listWorkspaceInvoices:async(t,e={})=>{f("listWorkspaceInvoices","id",t);let s="/v1/admin/workspaces/{id}/billing/invoices".replace("{id}",encodeURIComponent(String(t))),o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={};g(o,{});let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},listWorkspaceMembers:async(t,e={})=>{let s="/v1/admin/workspace-members",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={},c={};t!==void 0&&(c.nextToken=t),g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},listWorkspaceQuotas:async(t,e,s={})=>{f("listWorkspaceQuotas","id",t);let o="/v1/admin/workspaces/{id}/quotas".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"GET",...n,...s},c={},p={};e!==void 0&&(p.period=e),g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},listWorkspaceUsages:async(t,e,s,o={})=>{f("listWorkspaceUsages","id",t),f("listWorkspaceUsages","type",e);let a="/v1/admin/workspaces/{id}/usages".replace("{id}",encodeURIComponent(String(t))),n=new URL(a,d),i;r&&(i=r.baseOptions);let c={method:"GET",...i,...o},p={},l={};e!==void 0&&(l.type=e),s!==void 0&&(l.period=s),g(n,l);let x=i&&i.headers?i.headers:{};return c.headers={...p,...x,...o.headers},{url:y(n),options:c}},listWorkspaces:async(t,e={})=>{let s="/v1/admin/workspaces",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"GET",...a,...e},i={},c={};t!==void 0&&(c.nextToken=t),g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},{url:y(o),options:n}},patchState:async(t,e,s,o,a={})=>{f("patchState","type",t),f("patchState","id",e),f("patchState","name",s);let n="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(n,d),c;r&&(c=r.baseOptions);let p={method:"PATCH",...c,...a},l={},x={};l["Content-Type"]="application/json",g(i,x);let b=c&&c.headers?c.headers:{};return p.headers={...l,...b,...a.headers},p.data=C(o,p,r),{url:y(i),options:p}},removeParticipant:async(t,e,s={})=>{f("removeParticipant","id",t),f("removeParticipant","userId",e);let o="/v1/chat/conversations/{id}/participants/{userId}".replace("{id}",encodeURIComponent(String(t))).replace("{userId}",encodeURIComponent(String(e))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"DELETE",...n,...s},c={};g(a,{});let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},{url:y(a),options:i}},runVrl:async(t,e={})=>{let s="/v1/admin/helper/vrl",o=new URL(s,d),a;r&&(a=r.baseOptions);let n={method:"POST",...a,...e},i={},c={};i["Content-Type"]="application/json",g(o,c);let p=a&&a.headers?a.headers:{};return n.headers={...i,...p,...e.headers},n.data=C(t,n,r),{url:y(o),options:n}},setAccountPreference:async(t,e,s={})=>{f("setAccountPreference","key",t);let o="/v1/admin/account/preferences/{key}".replace("{key}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"POST",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},setState:async(t,e,s,o,a={})=>{f("setState","type",t),f("setState","id",e),f("setState","name",s);let n="/v1/chat/states/{type}/{id}/{name}".replace("{type}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))).replace("{name}",encodeURIComponent(String(s))),i=new URL(n,d),c;r&&(c=r.baseOptions);let p={method:"POST",...c,...a},l={},x={};l["Content-Type"]="application/json",g(i,x);let b=c&&c.headers?c.headers:{};return p.headers={...l,...b,...a.headers},p.data=C(o,p,r),{url:y(i),options:p}},setWorkspacePaymentMethod:async(t,e,s={})=>{f("setWorkspacePaymentMethod","id",t);let o="/v1/admin/workspaces/{id}/billing/payment-method".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},transferBot:async(t,e,s={})=>{f("transferBot","id",t);let o="/v1/admin/bots/{id}/transfer".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"POST",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateBot:async(t,e,s={})=>{f("updateBot","id",t);let o="/v1/admin/bots/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateConversation:async(t,e,s={})=>{f("updateConversation","id",t);let o="/v1/chat/conversations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateIntegration:async(t,e,s={})=>{f("updateIntegration","id",t);let o="/v1/admin/integrations/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateMessage:async(t,e,s={})=>{f("updateMessage","id",t);let o="/v1/chat/messages/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateTask:async(t,e,s={})=>{f("updateTask","id",t);let o="/v1/chat/tasks/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateUser:async(t,e,s={})=>{f("updateUser","id",t);let o="/v1/chat/users/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateWorkspace:async(t,e,s={})=>{f("updateWorkspace","id",t);let o="/v1/admin/workspaces/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}},updateWorkspaceMember:async(t,e,s={})=>{f("updateWorkspaceMember","id",t);let o="/v1/admin/workspace-members/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(o,d),n;r&&(n=r.baseOptions);let i={method:"PUT",...n,...s},c={},p={};c["Content-Type"]="application/json",g(a,p);let l=n&&n.headers?n.headers:{};return i.headers={...c,...l,...s.headers},i.data=C(e,i,r),{url:y(a),options:i}}}},m=function(r){let t=Te(r);return{async addParticipant(e,s,o){let a=await t.addParticipant(e,s,o);return h(a,A.default,u,r)},async breakDownWorkspaceUsageByBot(e,s,o,a){let n=await t.breakDownWorkspaceUsageByBot(e,s,o,a);return h(n,A.default,u,r)},async callAction(e,s){let o=await t.callAction(e,s);return h(o,A.default,u,r)},async changeAISpendQuota(e,s){let o=await t.changeAISpendQuota(e,s);return h(o,A.default,u,r)},async changeWorkspacePlan(e,s,o){let a=await t.changeWorkspacePlan(e,s,o);return h(a,A.default,u,r)},async chargeWorkspaceUnpaidInvoices(e,s,o){let a=await t.chargeWorkspaceUnpaidInvoices(e,s,o);return h(a,A.default,u,r)},async checkHandleAvailability(e,s){let o=await t.checkHandleAvailability(e,s);return h(o,A.default,u,r)},async configureIntegration(e,s){let o=await t.configureIntegration(e,s);return h(o,A.default,u,r)},async createBot(e,s){let o=await t.createBot(e,s);return h(o,A.default,u,r)},async createConversation(e,s){let o=await t.createConversation(e,s);return h(o,A.default,u,r)},async createEvent(e,s){let o=await t.createEvent(e,s);return h(o,A.default,u,r)},async createFile(e,s){let o=await t.createFile(e,s);return h(o,A.default,u,r)},async createIntegration(e,s){let o=await t.createIntegration(e,s);return h(o,A.default,u,r)},async createMessage(e,s){let o=await t.createMessage(e,s);return h(o,A.default,u,r)},async createPersonalAccessToken(e,s){let o=await t.createPersonalAccessToken(e,s);return h(o,A.default,u,r)},async createTask(e,s){let o=await t.createTask(e,s);return h(o,A.default,u,r)},async createUser(e,s){let o=await t.createUser(e,s);return h(o,A.default,u,r)},async createWorkspace(e,s){let o=await t.createWorkspace(e,s);return h(o,A.default,u,r)},async createWorkspaceMember(e,s){let o=await t.createWorkspaceMember(e,s);return h(o,A.default,u,r)},async deleteBot(e,s){let o=await t.deleteBot(e,s);return h(o,A.default,u,r)},async deleteBotIssue(e,s,o){let a=await t.deleteBotIssue(e,s,o);return h(a,A.default,u,r)},async deleteConversation(e,s){let o=await t.deleteConversation(e,s);return h(o,A.default,u,r)},async deleteFile(e,s){let o=await t.deleteFile(e,s);return h(o,A.default,u,r)},async deleteIntegration(e,s){let o=await t.deleteIntegration(e,s);return h(o,A.default,u,r)},async deleteMessage(e,s){let o=await t.deleteMessage(e,s);return h(o,A.default,u,r)},async deletePersonalAccessToken(e,s){let o=await t.deletePersonalAccessToken(e,s);return h(o,A.default,u,r)},async deleteTask(e,s){let o=await t.deleteTask(e,s);return h(o,A.default,u,r)},async deleteUser(e,s){let o=await t.deleteUser(e,s);return h(o,A.default,u,r)},async deleteWorkspace(e,s){let o=await t.deleteWorkspace(e,s);return h(o,A.default,u,r)},async deleteWorkspaceMember(e,s){let o=await t.deleteWorkspaceMember(e,s);return h(o,A.default,u,r)},async downloadFile(e,s){let o=await t.downloadFile(e,s);return h(o,A.default,u,r)},async getAccount(e){let s=await t.getAccount(e);return h(s,A.default,u,r)},async getAccountPreference(e,s){let o=await t.getAccountPreference(e,s);return h(o,A.default,u,r)},async getAllWorkspaceQuotaCompletion(e){let s=await t.getAllWorkspaceQuotaCompletion(e);return h(s,A.default,u,r)},async getAuditRecords(e,s,o){let a=await t.getAuditRecords(e,s,o);return h(a,A.default,u,r)},async getBot(e,s){let o=await t.getBot(e,s);return h(o,A.default,u,r)},async getBotAnalytics(e,s,o,a){let n=await t.getBotAnalytics(e,s,o,a);return h(n,A.default,u,r)},async getBotLogs(e,s,o,a,n){let i=await t.getBotLogs(e,s,o,a,n);return h(i,A.default,u,r)},async getBotWebchat(e,s,o){let a=await t.getBotWebchat(e,s,o);return h(a,A.default,u,r)},async getConversation(e,s){let o=await t.getConversation(e,s);return h(o,A.default,u,r)},async getEvent(e,s){let o=await t.getEvent(e,s);return h(o,A.default,u,r)},async getFile(e,s){let o=await t.getFile(e,s);return h(o,A.default,u,r)},async getIntegration(e,s){let o=await t.getIntegration(e,s);return h(o,A.default,u,r)},async getIntegrationByName(e,s,o){let a=await t.getIntegrationByName(e,s,o);return h(a,A.default,u,r)},async getIntegrationLogs(e,s,o,a,n){let i=await t.getIntegrationLogs(e,s,o,a,n);return h(i,A.default,u,r)},async getMessage(e,s){let o=await t.getMessage(e,s);return h(o,A.default,u,r)},async getOrCreateConversation(e,s){let o=await t.getOrCreateConversation(e,s);return h(o,A.default,u,r)},async getOrCreateMessage(e,s){let o=await t.getOrCreateMessage(e,s);return h(o,A.default,u,r)},async getOrCreateUser(e,s){let o=await t.getOrCreateUser(e,s);return h(o,A.default,u,r)},async getParticipant(e,s,o){let a=await t.getParticipant(e,s,o);return h(a,A.default,u,r)},async getPublicIntegration(e,s,o){let a=await t.getPublicIntegration(e,s,o);return h(a,A.default,u,r)},async getPublicIntegrationById(e,s){let o=await t.getPublicIntegrationById(e,s);return h(o,A.default,u,r)},async getState(e,s,o,a){let n=await t.getState(e,s,o,a);return h(n,A.default,u,r)},async getTask(e,s){let o=await t.getTask(e,s);return h(o,A.default,u,r)},async getUsage(e,s,o,a){let n=await t.getUsage(e,s,o,a);return h(n,A.default,u,r)},async getUser(e,s){let o=await t.getUser(e,s);return h(o,A.default,u,r)},async getWorkspace(e,s){let o=await t.getWorkspace(e,s);return h(o,A.default,u,r)},async getWorkspaceBillingDetails(e,s){let o=await t.getWorkspaceBillingDetails(e,s);return h(o,A.default,u,r)},async getWorkspaceQuota(e,s,o,a){let n=await t.getWorkspaceQuota(e,s,o,a);return h(n,A.default,u,r)},async introspect(e,s){let o=await t.introspect(e,s);return h(o,A.default,u,r)},async listBotIssueEvents(e,s,o){let a=await t.listBotIssueEvents(e,s,o);return h(a,A.default,u,r)},async listBotIssues(e,s,o){let a=await t.listBotIssues(e,s,o);return h(a,A.default,u,r)},async listBots(e,s,o){let a=await t.listBots(e,s,o);return h(a,A.default,u,r)},async listConversations(e,s,o,a){let n=await t.listConversations(e,s,o,a);return h(n,A.default,u,r)},async listEvents(e,s,o,a,n,i){let c=await t.listEvents(e,s,o,a,n,i);return h(c,A.default,u,r)},async listFiles(e,s,o){let a=await t.listFiles(e,s,o);return h(a,A.default,u,r)},async listIntegrations(e,s,o,a,n){let i=await t.listIntegrations(e,s,o,a,n);return h(i,A.default,u,r)},async listMessages(e,s,o,a){let n=await t.listMessages(e,s,o,a);return h(n,A.default,u,r)},async listParticipants(e,s,o){let a=await t.listParticipants(e,s,o);return h(a,A.default,u,r)},async listPersonalAccessTokens(e){let s=await t.listPersonalAccessTokens(e);return h(s,A.default,u,r)},async listPublicIntegrations(e,s,o,a){let n=await t.listPublicIntegrations(e,s,o,a);return h(n,A.default,u,r)},async listTasks(e,s,o,a,n,i,c,p){let l=await t.listTasks(e,s,o,a,n,i,c,p);return h(l,A.default,u,r)},async listUsageHistory(e,s,o){let a=await t.listUsageHistory(e,s,o);return h(a,A.default,u,r)},async listUsers(e,s,o,a){let n=await t.listUsers(e,s,o,a);return h(n,A.default,u,r)},async listWorkspaceInvoices(e,s){let o=await t.listWorkspaceInvoices(e,s);return h(o,A.default,u,r)},async listWorkspaceMembers(e,s){let o=await t.listWorkspaceMembers(e,s);return h(o,A.default,u,r)},async listWorkspaceQuotas(e,s,o){let a=await t.listWorkspaceQuotas(e,s,o);return h(a,A.default,u,r)},async listWorkspaceUsages(e,s,o,a){let n=await t.listWorkspaceUsages(e,s,o,a);return h(n,A.default,u,r)},async listWorkspaces(e,s){let o=await t.listWorkspaces(e,s);return h(o,A.default,u,r)},async patchState(e,s,o,a,n){let i=await t.patchState(e,s,o,a,n);return h(i,A.default,u,r)},async removeParticipant(e,s,o){let a=await t.removeParticipant(e,s,o);return h(a,A.default,u,r)},async runVrl(e,s){let o=await t.runVrl(e,s);return h(o,A.default,u,r)},async setAccountPreference(e,s,o){let a=await t.setAccountPreference(e,s,o);return h(a,A.default,u,r)},async setState(e,s,o,a,n){let i=await t.setState(e,s,o,a,n);return h(i,A.default,u,r)},async setWorkspacePaymentMethod(e,s,o){let a=await t.setWorkspacePaymentMethod(e,s,o);return h(a,A.default,u,r)},async transferBot(e,s,o){let a=await t.transferBot(e,s,o);return h(a,A.default,u,r)},async updateBot(e,s,o){let a=await t.updateBot(e,s,o);return h(a,A.default,u,r)},async updateConversation(e,s,o){let a=await t.updateConversation(e,s,o);return h(a,A.default,u,r)},async updateIntegration(e,s,o){let a=await t.updateIntegration(e,s,o);return h(a,A.default,u,r)},async updateMessage(e,s,o){let a=await t.updateMessage(e,s,o);return h(a,A.default,u,r)},async updateTask(e,s,o){let a=await t.updateTask(e,s,o);return h(a,A.default,u,r)},async updateUser(e,s,o){let a=await t.updateUser(e,s,o);return h(a,A.default,u,r)},async updateWorkspace(e,s,o){let a=await t.updateWorkspace(e,s,o);return h(a,A.default,u,r)},async updateWorkspaceMember(e,s,o){let a=await t.updateWorkspaceMember(e,s,o);return h(a,A.default,u,r)}}};var v=class extends T{addParticipant(t,e){return m(this.configuration).addParticipant(t.id,t.addParticipantBody,e).then(s=>s(this.axios,this.basePath))}breakDownWorkspaceUsageByBot(t,e){return m(this.configuration).breakDownWorkspaceUsageByBot(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}callAction(t={},e){return m(this.configuration).callAction(t.callActionBody,e).then(s=>s(this.axios,this.basePath))}changeAISpendQuota(t={},e){return m(this.configuration).changeAISpendQuota(t.changeAISpendQuotaBody,e).then(s=>s(this.axios,this.basePath))}changeWorkspacePlan(t,e){return m(this.configuration).changeWorkspacePlan(t.id,t.changeWorkspacePlanBody,e).then(s=>s(this.axios,this.basePath))}chargeWorkspaceUnpaidInvoices(t,e){return m(this.configuration).chargeWorkspaceUnpaidInvoices(t.id,t.chargeWorkspaceUnpaidInvoicesBody,e).then(s=>s(this.axios,this.basePath))}checkHandleAvailability(t={},e){return m(this.configuration).checkHandleAvailability(t.checkHandleAvailabilityBody,e).then(s=>s(this.axios,this.basePath))}configureIntegration(t={},e){return m(this.configuration).configureIntegration(t.configureIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createBot(t={},e){return m(this.configuration).createBot(t.createBotBody,e).then(s=>s(this.axios,this.basePath))}createConversation(t={},e){return m(this.configuration).createConversation(t.createConversationBody,e).then(s=>s(this.axios,this.basePath))}createEvent(t={},e){return m(this.configuration).createEvent(t.createEventBody,e).then(s=>s(this.axios,this.basePath))}createFile(t={},e){return m(this.configuration).createFile(t.createFileBody,e).then(s=>s(this.axios,this.basePath))}createIntegration(t={},e){return m(this.configuration).createIntegration(t.createIntegrationBody,e).then(s=>s(this.axios,this.basePath))}createMessage(t={},e){return m(this.configuration).createMessage(t.createMessageBody,e).then(s=>s(this.axios,this.basePath))}createPersonalAccessToken(t={},e){return m(this.configuration).createPersonalAccessToken(t.createPersonalAccessTokenBody,e).then(s=>s(this.axios,this.basePath))}createTask(t={},e){return m(this.configuration).createTask(t.createTaskBody,e).then(s=>s(this.axios,this.basePath))}createUser(t={},e){return m(this.configuration).createUser(t.createUserBody,e).then(s=>s(this.axios,this.basePath))}createWorkspace(t={},e){return m(this.configuration).createWorkspace(t.createWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}createWorkspaceMember(t={},e){return m(this.configuration).createWorkspaceMember(t.createWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}deleteBot(t,e){return m(this.configuration).deleteBot(t.id,e).then(s=>s(this.axios,this.basePath))}deleteBotIssue(t,e){return m(this.configuration).deleteBotIssue(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}deleteConversation(t,e){return m(this.configuration).deleteConversation(t.id,e).then(s=>s(this.axios,this.basePath))}deleteFile(t,e){return m(this.configuration).deleteFile(t.id,e).then(s=>s(this.axios,this.basePath))}deleteIntegration(t,e){return m(this.configuration).deleteIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}deleteMessage(t,e){return m(this.configuration).deleteMessage(t.id,e).then(s=>s(this.axios,this.basePath))}deletePersonalAccessToken(t,e){return m(this.configuration).deletePersonalAccessToken(t.id,e).then(s=>s(this.axios,this.basePath))}deleteTask(t,e){return m(this.configuration).deleteTask(t.id,e).then(s=>s(this.axios,this.basePath))}deleteUser(t,e){return m(this.configuration).deleteUser(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspace(t,e){return m(this.configuration).deleteWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}deleteWorkspaceMember(t,e){return m(this.configuration).deleteWorkspaceMember(t.id,e).then(s=>s(this.axios,this.basePath))}downloadFile(t,e){return m(this.configuration).downloadFile(t.id,e).then(s=>s(this.axios,this.basePath))}getAccount(t){return m(this.configuration).getAccount(t).then(e=>e(this.axios,this.basePath))}getAccountPreference(t,e){return m(this.configuration).getAccountPreference(t.key,e).then(s=>s(this.axios,this.basePath))}getAllWorkspaceQuotaCompletion(t){return m(this.configuration).getAllWorkspaceQuotaCompletion(t).then(e=>e(this.axios,this.basePath))}getAuditRecords(t,e){return m(this.configuration).getAuditRecords(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBot(t,e){return m(this.configuration).getBot(t.id,e).then(s=>s(this.axios,this.basePath))}getBotAnalytics(t,e){return m(this.configuration).getBotAnalytics(t.id,t.startDate,t.endDate,e).then(s=>s(this.axios,this.basePath))}getBotLogs(t,e){return m(this.configuration).getBotLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getBotWebchat(t,e){return m(this.configuration).getBotWebchat(t.id,t.type,e).then(s=>s(this.axios,this.basePath))}getConversation(t,e){return m(this.configuration).getConversation(t.id,e).then(s=>s(this.axios,this.basePath))}getEvent(t,e){return m(this.configuration).getEvent(t.id,e).then(s=>s(this.axios,this.basePath))}getFile(t,e){return m(this.configuration).getFile(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegration(t,e){return m(this.configuration).getIntegration(t.id,e).then(s=>s(this.axios,this.basePath))}getIntegrationByName(t,e){return m(this.configuration).getIntegrationByName(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getIntegrationLogs(t,e){return m(this.configuration).getIntegrationLogs(t.id,t.timeStart,t.timeEnd,t.nextToken,e).then(s=>s(this.axios,this.basePath))}getMessage(t,e){return m(this.configuration).getMessage(t.id,e).then(s=>s(this.axios,this.basePath))}getOrCreateConversation(t={},e){return m(this.configuration).getOrCreateConversation(t.getOrCreateConversationBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateMessage(t={},e){return m(this.configuration).getOrCreateMessage(t.getOrCreateMessageBody,e).then(s=>s(this.axios,this.basePath))}getOrCreateUser(t={},e){return m(this.configuration).getOrCreateUser(t.getOrCreateUserBody,e).then(s=>s(this.axios,this.basePath))}getParticipant(t,e){return m(this.configuration).getParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}getPublicIntegration(t,e){return m(this.configuration).getPublicIntegration(t.name,t.version,e).then(s=>s(this.axios,this.basePath))}getPublicIntegrationById(t,e){return m(this.configuration).getPublicIntegrationById(t.id,e).then(s=>s(this.axios,this.basePath))}getState(t,e){return m(this.configuration).getState(t.type,t.id,t.name,e).then(s=>s(this.axios,this.basePath))}getTask(t,e){return m(this.configuration).getTask(t.id,e).then(s=>s(this.axios,this.basePath))}getUsage(t,e){return m(this.configuration).getUsage(t.type,t.id,t.period,e).then(s=>s(this.axios,this.basePath))}getUser(t,e){return m(this.configuration).getUser(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspace(t,e){return m(this.configuration).getWorkspace(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspaceBillingDetails(t,e){return m(this.configuration).getWorkspaceBillingDetails(t.id,e).then(s=>s(this.axios,this.basePath))}getWorkspaceQuota(t,e){return m(this.configuration).getWorkspaceQuota(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}introspect(t={},e){return m(this.configuration).introspect(t.introspectBody,e).then(s=>s(this.axios,this.basePath))}listBotIssueEvents(t,e){return m(this.configuration).listBotIssueEvents(t.id,t.issueId,e).then(s=>s(this.axios,this.basePath))}listBotIssues(t,e){return m(this.configuration).listBotIssues(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listBots(t={},e){return m(this.configuration).listBots(t.dev,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listConversations(t={},e){return m(this.configuration).listConversations(t.nextToken,t.tags,t.participantIds,e).then(s=>s(this.axios,this.basePath))}listEvents(t={},e){return m(this.configuration).listEvents(t.nextToken,t.type,t.conversationId,t.userId,t.messageId,e).then(s=>s(this.axios,this.basePath))}listFiles(t,e){return m(this.configuration).listFiles(t.botId,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listIntegrations(t={},e){return m(this.configuration).listIntegrations(t.nextToken,t.name,t.version,t.dev,e).then(s=>s(this.axios,this.basePath))}listMessages(t={},e){return m(this.configuration).listMessages(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listParticipants(t,e){return m(this.configuration).listParticipants(t.id,t.nextToken,e).then(s=>s(this.axios,this.basePath))}listPersonalAccessTokens(t){return m(this.configuration).listPersonalAccessTokens(t).then(e=>e(this.axios,this.basePath))}listPublicIntegrations(t={},e){return m(this.configuration).listPublicIntegrations(t.nextToken,t.name,t.version,e).then(s=>s(this.axios,this.basePath))}listTasks(t={},e){return m(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 m(this.configuration).listUsageHistory(t.type,t.id,e).then(s=>s(this.axios,this.basePath))}listUsers(t={},e){return m(this.configuration).listUsers(t.nextToken,t.conversationId,t.tags,e).then(s=>s(this.axios,this.basePath))}listWorkspaceInvoices(t,e){return m(this.configuration).listWorkspaceInvoices(t.id,e).then(s=>s(this.axios,this.basePath))}listWorkspaceMembers(t={},e){return m(this.configuration).listWorkspaceMembers(t.nextToken,e).then(s=>s(this.axios,this.basePath))}listWorkspaceQuotas(t,e){return m(this.configuration).listWorkspaceQuotas(t.id,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaceUsages(t,e){return m(this.configuration).listWorkspaceUsages(t.id,t.type,t.period,e).then(s=>s(this.axios,this.basePath))}listWorkspaces(t={},e){return m(this.configuration).listWorkspaces(t.nextToken,e).then(s=>s(this.axios,this.basePath))}patchState(t,e){return m(this.configuration).patchState(t.type,t.id,t.name,t.patchStateBody,e).then(s=>s(this.axios,this.basePath))}removeParticipant(t,e){return m(this.configuration).removeParticipant(t.id,t.userId,e).then(s=>s(this.axios,this.basePath))}runVrl(t={},e){return m(this.configuration).runVrl(t.runVrlBody,e).then(s=>s(this.axios,this.basePath))}setAccountPreference(t,e){return m(this.configuration).setAccountPreference(t.key,t.setAccountPreferenceBody,e).then(s=>s(this.axios,this.basePath))}setState(t,e){return m(this.configuration).setState(t.type,t.id,t.name,t.setStateBody,e).then(s=>s(this.axios,this.basePath))}setWorkspacePaymentMethod(t,e){return m(this.configuration).setWorkspacePaymentMethod(t.id,t.setWorkspacePaymentMethodBody,e).then(s=>s(this.axios,this.basePath))}transferBot(t,e){return m(this.configuration).transferBot(t.id,t.transferBotBody,e).then(s=>s(this.axios,this.basePath))}updateBot(t,e){return m(this.configuration).updateBot(t.id,t.updateBotBody,e).then(s=>s(this.axios,this.basePath))}updateConversation(t,e){return m(this.configuration).updateConversation(t.id,t.updateConversationBody,e).then(s=>s(this.axios,this.basePath))}updateIntegration(t,e){return m(this.configuration).updateIntegration(t.id,t.updateIntegrationBody,e).then(s=>s(this.axios,this.basePath))}updateMessage(t,e){return m(this.configuration).updateMessage(t.id,t.updateMessageBody,e).then(s=>s(this.axios,this.basePath))}updateTask(t,e){return m(this.configuration).updateTask(t.id,t.updateTaskBody,e).then(s=>s(this.axios,this.basePath))}updateUser(t,e){return m(this.configuration).updateUser(t.id,t.updateUserBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspace(t,e){return m(this.configuration).updateWorkspace(t.id,t.updateWorkspaceBody,e).then(s=>s(this.axios,this.basePath))}updateWorkspaceMember(t,e){return m(this.configuration).updateWorkspaceMember(t.id,t.updateWorkspaceMemberBody,e).then(s=>s(this.axios,this.basePath))}};var ie=I(require("crypto"));var Ve={getRandomValues:r=>new Uint8Array(r.map(()=>Math.floor(Math.random()*256)))},se=typeof window<"u"&&typeof window.document<"u"?window.crypto:ie.default;se.getRandomValues||(se=Ve);var P=class extends Error{constructor(e,s,o,a,n,i){super(a);this.code=e;this.description=s;this.type=o;this.message=a;this.error=n;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],o=4,a=Array.from(se.getRandomValues(new Uint8Array(o))).map(n=>n.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"}},ve=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,ce=r=>r instanceof P||ve(r)&&r.isApiError===!0,B=class extends P{constructor(t,e,s){super(500,"An unknown error occurred","Unknown",t,e,s)}},E=class extends P{constructor(t,e,s){super(500,"An internal error occurred","Internal",t,e,s)}},D=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)}},O=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)}},S=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)}},G=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)}},F=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)}},Q=class extends P{constructor(t,e,s){super(409,"The resource is not related with another resource. This is usually caused when providing two resources that aren't linked together.","RelationConflict",t,e,s)}},j=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)}},H=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)}},N=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)}},$=class extends P{constructor(t,e,s){super(409,"The record attempted to be created already exists.","AlreadyExists",t,e,s)}},K=class extends P{constructor(t,e,s){super(429,"The request has been rate limited.","RateLimited",t,e,s)}},J=class extends P{constructor(t,e,s){super(402,"A payment is required to perform this request.","PaymentRequired",t,e,s)}},z=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)}},Y=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={Unknown:B,Internal:E,Unauthorized:D,Forbidden:W,PayloadTooLarge:O,InvalidPayload:w,UnsupportedMediaType:S,MethodNotFound:M,ResourceNotFound:L,InvalidJsonSchema:G,InvalidDataFormat:_,InvalidIdentifier:F,RelationConflict:Q,ReferenceNotFound:j,InvalidQuery:H,Runtime:N,AlreadyExists:$,RateLimited:K,PaymentRequired:J,QuotaExceeded:z,LimitExceeded:Y},Z=r=>ce(r)?r:r instanceof Error?new B(r.message,r):typeof r=="string"?new B(r):De(r);function De(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=Ee[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 X=class{_innerClient;constructor(t,e,s){this._innerClient=new v(t,e,s)}createConversation=t=>this._innerClient.createConversation({createConversationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getConversation=t=>this._innerClient.getConversation(t).then(e=>e.data).catch(e=>{throw R(e)});listConversations=t=>this._innerClient.listConversations(t).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateConversation=t=>this._innerClient.getOrCreateConversation({getOrCreateConversationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateConversation=({id:t,...e})=>this._innerClient.updateConversation({id:t,updateConversationBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteConversation=t=>this._innerClient.deleteConversation(t).then(e=>e.data).catch(e=>{throw R(e)});listParticipants=t=>this._innerClient.listParticipants(t).then(e=>e.data).catch(e=>{throw R(e)});addParticipant=({id:t,...e})=>this._innerClient.addParticipant({id:t,addParticipantBody:e}).then(s=>s.data).catch(s=>{throw R(s)});getParticipant=t=>this._innerClient.getParticipant(t).then(e=>e.data).catch(e=>{throw R(e)});removeParticipant=t=>this._innerClient.removeParticipant(t).then(e=>e.data).catch(e=>{throw R(e)});createEvent=t=>this._innerClient.createEvent({createEventBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getEvent=t=>this._innerClient.getEvent(t).then(e=>e.data).catch(e=>{throw R(e)});listEvents=t=>this._innerClient.listEvents(t).then(e=>e.data).catch(e=>{throw R(e)});createMessage=t=>this._innerClient.createMessage({createMessageBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateMessage=t=>this._innerClient.getOrCreateMessage({getOrCreateMessageBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getMessage=t=>this._innerClient.getMessage(t).then(e=>e.data).catch(e=>{throw R(e)});updateMessage=({id:t,...e})=>this._innerClient.updateMessage({id:t,updateMessageBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listMessages=t=>this._innerClient.listMessages(t).then(e=>e.data).catch(e=>{throw R(e)});deleteMessage=t=>this._innerClient.deleteMessage(t).then(e=>e.data).catch(e=>{throw R(e)});createUser=t=>this._innerClient.createUser({createUserBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getUser=t=>this._innerClient.getUser(t).then(e=>e.data).catch(e=>{throw R(e)});listUsers=t=>this._innerClient.listUsers(t).then(e=>e.data).catch(e=>{throw R(e)});getOrCreateUser=t=>this._innerClient.getOrCreateUser({getOrCreateUserBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateUser=({id:t,...e})=>this._innerClient.updateUser({id:t,updateUserBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteUser=t=>this._innerClient.deleteUser(t).then(e=>e.data).catch(e=>{throw R(e)});getState=t=>this._innerClient.getState(t).then(e=>e.data).catch(e=>{throw R(e)});setState=({type:t,id:e,name:s,...o})=>this._innerClient.setState({type:t,id:e,name:s,setStateBody:o}).then(a=>a.data).catch(a=>{throw R(a)});patchState=({type:t,id:e,name:s,...o})=>this._innerClient.patchState({type:t,id:e,name:s,patchStateBody:o}).then(a=>a.data).catch(a=>{throw R(a)});callAction=t=>this._innerClient.callAction({callActionBody:t}).then(e=>e.data).catch(e=>{throw R(e)});configureIntegration=t=>this._innerClient.configureIntegration({configureIntegrationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getTask=t=>this._innerClient.getTask(t).then(e=>e.data).catch(e=>{throw R(e)});createTask=t=>this._innerClient.createTask({createTaskBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateTask=({id:t,...e})=>this._innerClient.updateTask({id:t,updateTaskBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteTask=t=>this._innerClient.deleteTask(t).then(e=>e.data).catch(e=>{throw R(e)});listTasks=t=>this._innerClient.listTasks(t).then(e=>e.data).catch(e=>{throw R(e)});runVrl=t=>this._innerClient.runVrl({runVrlBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getAccount=()=>this._innerClient.getAccount().then(t=>t.data).catch(t=>{throw R(t)});listPersonalAccessTokens=()=>this._innerClient.listPersonalAccessTokens().then(t=>t.data).catch(t=>{throw R(t)});createPersonalAccessToken=t=>this._innerClient.createPersonalAccessToken({createPersonalAccessTokenBody:t}).then(e=>e.data).catch(e=>{throw R(e)});deletePersonalAccessToken=t=>this._innerClient.deletePersonalAccessToken(t).then(e=>e.data).catch(e=>{throw R(e)});setAccountPreference=({key:t,...e})=>this._innerClient.setAccountPreference({key:t,setAccountPreferenceBody:e}).then(s=>s.data).catch(s=>{throw R(s)});getAccountPreference=t=>this._innerClient.getAccountPreference(t).then(e=>e.data).catch(e=>{throw R(e)});listPublicIntegrations=t=>this._innerClient.listPublicIntegrations(t).then(e=>e.data).catch(e=>{throw R(e)});getPublicIntegrationById=t=>this._innerClient.getPublicIntegrationById(t).then(e=>e.data).catch(e=>{throw R(e)});getPublicIntegration=t=>this._innerClient.getPublicIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});createBot=t=>this._innerClient.createBot({createBotBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateBot=({id:t,...e})=>this._innerClient.updateBot({id:t,updateBotBody:e}).then(s=>s.data).catch(s=>{throw R(s)});transferBot=({id:t,...e})=>this._innerClient.transferBot({id:t,transferBotBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listBots=t=>this._innerClient.listBots(t).then(e=>e.data).catch(e=>{throw R(e)});getBot=t=>this._innerClient.getBot(t).then(e=>e.data).catch(e=>{throw R(e)});deleteBot=t=>this._innerClient.deleteBot(t).then(e=>e.data).catch(e=>{throw R(e)});getBotLogs=t=>this._innerClient.getBotLogs(t).then(e=>e.data).catch(e=>{throw R(e)});getBotWebchat=t=>this._innerClient.getBotWebchat(t).then(e=>e.data).catch(e=>{throw R(e)});getBotAnalytics=t=>this._innerClient.getBotAnalytics(t).then(e=>e.data).catch(e=>{throw R(e)});listBotIssues=t=>this._innerClient.listBotIssues(t).then(e=>e.data).catch(e=>{throw R(e)});deleteBotIssue=t=>this._innerClient.deleteBotIssue(t).then(e=>e.data).catch(e=>{throw R(e)});listBotIssueEvents=t=>this._innerClient.listBotIssueEvents(t).then(e=>e.data).catch(e=>{throw R(e)});getWorkspaceBillingDetails=t=>this._innerClient.getWorkspaceBillingDetails(t).then(e=>e.data).catch(e=>{throw R(e)});setWorkspacePaymentMethod=({id:t,...e})=>this._innerClient.setWorkspacePaymentMethod({id:t,setWorkspacePaymentMethodBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listWorkspaceInvoices=t=>this._innerClient.listWorkspaceInvoices(t).then(e=>e.data).catch(e=>{throw R(e)});chargeWorkspaceUnpaidInvoices=({id:t,...e})=>this._innerClient.chargeWorkspaceUnpaidInvoices({id:t,chargeWorkspaceUnpaidInvoicesBody:e}).then(s=>s.data).catch(s=>{throw R(s)});createWorkspace=t=>this._innerClient.createWorkspace({createWorkspaceBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getWorkspace=t=>this._innerClient.getWorkspace(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceUsages=t=>this._innerClient.listWorkspaceUsages(t).then(e=>e.data).catch(e=>{throw R(e)});breakDownWorkspaceUsageByBot=t=>this._innerClient.breakDownWorkspaceUsageByBot(t).then(e=>e.data).catch(e=>{throw R(e)});getAllWorkspaceQuotaCompletion=()=>this._innerClient.getAllWorkspaceQuotaCompletion().then(t=>t.data).catch(t=>{throw R(t)});getWorkspaceQuota=t=>this._innerClient.getWorkspaceQuota(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceQuotas=t=>this._innerClient.listWorkspaceQuotas(t).then(e=>e.data).catch(e=>{throw R(e)});updateWorkspace=({id:t,...e})=>this._innerClient.updateWorkspace({id:t,updateWorkspaceBody:e}).then(s=>s.data).catch(s=>{throw R(s)});checkHandleAvailability=t=>this._innerClient.checkHandleAvailability({checkHandleAvailabilityBody:t}).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaces=t=>this._innerClient.listWorkspaces(t).then(e=>e.data).catch(e=>{throw R(e)});changeWorkspacePlan=({id:t,...e})=>this._innerClient.changeWorkspacePlan({id:t,changeWorkspacePlanBody:e}).then(s=>s.data).catch(s=>{throw R(s)});deleteWorkspace=t=>this._innerClient.deleteWorkspace(t).then(e=>e.data).catch(e=>{throw R(e)});getAuditRecords=t=>this._innerClient.getAuditRecords(t).then(e=>e.data).catch(e=>{throw R(e)});listWorkspaceMembers=t=>this._innerClient.listWorkspaceMembers(t).then(e=>e.data).catch(e=>{throw R(e)});deleteWorkspaceMember=t=>this._innerClient.deleteWorkspaceMember(t).then(e=>e.data).catch(e=>{throw R(e)});createWorkspaceMember=t=>this._innerClient.createWorkspaceMember({createWorkspaceMemberBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateWorkspaceMember=({id:t,...e})=>this._innerClient.updateWorkspaceMember({id:t,updateWorkspaceMemberBody:e}).then(s=>s.data).catch(s=>{throw R(s)});createIntegration=t=>this._innerClient.createIntegration({createIntegrationBody:t}).then(e=>e.data).catch(e=>{throw R(e)});updateIntegration=({id:t,...e})=>this._innerClient.updateIntegration({id:t,updateIntegrationBody:e}).then(s=>s.data).catch(s=>{throw R(s)});listIntegrations=t=>this._innerClient.listIntegrations(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegration=t=>this._innerClient.getIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegrationLogs=t=>this._innerClient.getIntegrationLogs(t).then(e=>e.data).catch(e=>{throw R(e)});getIntegrationByName=t=>this._innerClient.getIntegrationByName(t).then(e=>e.data).catch(e=>{throw R(e)});deleteIntegration=t=>this._innerClient.deleteIntegration(t).then(e=>e.data).catch(e=>{throw R(e)});getUsage=t=>this._innerClient.getUsage(t).then(e=>e.data).catch(e=>{throw R(e)});listUsageHistory=t=>this._innerClient.listUsageHistory(t).then(e=>e.data).catch(e=>{throw R(e)});changeAISpendQuota=t=>this._innerClient.changeAISpendQuota({changeAISpendQuotaBody:t}).then(e=>e.data).catch(e=>{throw R(e)});introspect=t=>this._innerClient.introspect({introspectBody:t}).then(e=>e.data).catch(e=>{throw R(e)});createFile=t=>this._innerClient.createFile({createFileBody:t}).then(e=>e.data).catch(e=>{throw R(e)});getFile=t=>this._innerClient.getFile(t).then(e=>e.data).catch(e=>{throw R(e)});downloadFile=t=>this._innerClient.downloadFile(t).then(e=>e.data).catch(e=>{throw R(e)});deleteFile=t=>this._innerClient.deleteFile(t).then(e=>e.data).catch(e=>{throw R(e)});listFiles=t=>this._innerClient.listFiles(t).then(e=>e.data).catch(e=>{throw R(e)})};function R(r){return pe.default.isAxiosError(r)&&r.response?.data?Z(r.response.data):Z(r)}var Se=I(require("axios")),ue=100*1024*1024,We=ue,Oe=ue,ae=class extends X{config;constructor(t={}){let e=ne(t),{apiUrl:s,headers:o,withCredentials:a,timeout:n}=e,i=le.default.create({headers:o,withCredentials:a,timeout:n,maxBodyLength:We,maxContentLength:Oe});super(void 0,s,i),this.config=e}};0&&(module.exports={AlreadyExistsError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceNotFoundError,RelationConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,axios,errorFrom,isApiError});
2
2
  //# sourceMappingURL=index.cjs.map