Comparing version 0.8.20-alpha.9 to 0.8.22-alpha.50
@@ -1,1 +0,1 @@ | ||
import u from"axios";var r=class{_axios;_token;constructor(t,e){this._axios=u.create({baseURL:t}),this._token=e}async post(t,e){return(await this._axios.post(t,e,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this._token}`}})).data}async patch(t,e){return(await this._axios.patch(t,e,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this._token}`}})).data}async delete(t){return(await this._axios.delete(t)).data}async get(t){return(await this._axios.get(t)).data}};var n=class{_vo;_httpClient;constructor(t,e){this._httpClient=e,this._vo=t}get vo(){return this._vo}};var i=class{_vo;_httpClient;_databaseVO;constructor(t,e,h){this._httpClient=h,this._vo=t,this._databaseVO=e}records={list:async()=>{let t=this._vo.id;return(await this._httpClient.get(`/v1/spaces/${this._databaseVO.spaceId}/resources/databases/${this._vo.id}/records/${t}`)).data}}};var p=class{_vo;_httpClient;constructor(t,e){this._httpClient=e,this._vo=t}get id(){return this._vo.id}views={get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/views/${t}`);return new i(e.data,this._vo,this._httpClient)},list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/views`)).data.map(e=>new i(e,this._vo,this._httpClient))};fields={list:async()=>[]};records={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/records`)).data};attachments={upload:async()=>"post"}};var o=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}get resourceType(){return this._vo.type}async asDatabase(){let t=await this._httpClient.get(`/v1/spaces/${this._vo.id}/resources/databases/${this._vo.id}`);return new p(t.data,this._httpClient)}async asAutomation(){let t=await this._httpClient.get(`/v1/spaces/${this._vo.id}/resources/automations/${this._vo.id}`);return new n(t.data,this._httpClient)}embeddedLink={create:async()=>{},get:async()=>{},list:async()=>{},delete:async()=>{}}};var c=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}members={};teams={};roles={}};var a=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}intelligence={search:()=>{},chat:()=>{}};outgoingWebhooks={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/outgoing-webhooks`)).data,register:async t=>{let e=await this._httpClient.post(`/v1/spaces/${this._vo.id}/outgoing-webhooks`,t);return e.error&&(console.log("ERROR2222",e.error.issues,t),console.log("333",e)),e.data},delete:async t=>(await this._httpClient.delete(`/v1/spaces/${this._vo.id}/outgoing-webhooks/${t.id}`)).data};units={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes`)).data.map(e=>new c(e,this._httpClient))};nodes={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes`)).data.map(e=>new o(e,this._httpClient)),get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes/${t}`);return new o(e.data,this._httpClient)}}};var l=class{_options;_httpClient;constructor(t){this._options=t,this._httpClient=t.customHttpClient||new r(t.baseURL||"https://bika.ai/api/openapi/bika",t.token)}space={list:async()=>(await this._httpClient.get("/v1/spaces")).data.map(e=>new a(e,this._httpClient)),get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${t}`);return new a(e.data,this._httpClient)}};siteAdmin={appEnv:async()=>(await this._httpClient.get("/v1/site-admin/app-env")).data,outgoingWebhooks:{list:async()=>(await this._httpClient.get("/v1/site-admin/outgoing-webhooks")).data,register:async t=>(await this._httpClient.post("/v1/site-admin/outgoing-webhooks",t)).data,delete:async()=>(await this._httpClient.delete("/v1/site-admin/outgoing-webhooks")).data}};system={meta:async()=>(await this._httpClient.get("/v1/system/meta")).data}};export{l as Bika}; | ||
import m from"axios";var n=class{_axios;_token;constructor(t,e){this._axios=m.create({baseURL:t}),this._token=e}async post(t,e){return(await this._axios.post(t,e,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this._token}`}})).data}async patch(t,e){return(await this._axios.patch(t,e,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this._token}`}})).data}async delete(t){return(await this._axios.delete(t)).data}async get(t){return(await this._axios.get(t)).data}};var p=class{_vo;_httpClient;constructor(t,e){this._httpClient=e,this._vo=t}get vo(){return this._vo}};function c(s){let t=new URLSearchParams;for(let e in s)s[e]!==void 0&&t.append(e,String(s[e]));return t.toString()}var o=class{_vo;_httpClient;_databaseVO;constructor(t,e,i){this._httpClient=i,this._vo=t,this._databaseVO=e}get vo(){return this._vo}records={list:async t=>{let i=c(t||{startRow:0,endRow:100});return(await this._httpClient.get(`/v1/spaces/${this._databaseVO.spaceId}/resources/databases/${this._databaseVO.id}/views/${this._vo.id}/records?${i}`)).data}}};var d=class{_vo;_httpClient;constructor(t,e){this._httpClient=e,this._vo=t}get id(){return this._vo.id}views={get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/views/${t}`);return new o(e.data,this._vo,this._httpClient)},list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/views`)).data.map(e=>new o(e,this._vo,this._httpClient))};fields={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/fields`)).data};records={list:async t=>{let i=c(t||{startRow:0,endRow:100});return(await this._httpClient.get(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/records?${i}`)).data},create:async t=>(await this._httpClient.post(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/records`,t)).data,update:async t=>(await this._httpClient.patch(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/records`,t)).data,delete:async t=>(await this._httpClient.delete(`/v1/spaces/${this._vo.spaceId}/resources/databases/${this._vo.id}/records/${t}`)).data};attachments={upload:async()=>"post"}};var a=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}get resourceType(){return this._vo.type}async asDatabase(){let t=await this._httpClient.get(`/v1/spaces/${this._vo.id}/resources/databases/${this._vo.id}`);return new d(t.data,this._httpClient)}async asAutomation(){let t=await this._httpClient.get(`/v1/spaces/${this._vo.id}/resources/automations/${this._vo.id}`);return new p(t.data,this._httpClient)}};var h=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}members={};teams={};roles={}};var r=class{_vo;_httpClient;constructor(t,e){this._vo=t,this._httpClient=e}get id(){return this._vo.id}intelligence={search:()=>{},chat:()=>{}};embedLinks={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/embed-links`)).data,create:async t=>(await this._httpClient.post(`/v1/spaces/${this._vo.id}/embed-links`,t)).data,delete:async t=>(await this._httpClient.delete(`/v1/spaces/${this._vo.id}/embed-links/${t.id}`)).data};outgoingWebhooks={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/outgoing-webhooks`)).data,register:async t=>{let e=await this._httpClient.post(`/v1/spaces/${this._vo.id}/outgoing-webhooks`,t);return e.error&&(console.log("ERROR2222",e.error.issues,t),console.log("333",e)),e.data},delete:async t=>(await this._httpClient.delete(`/v1/spaces/${this._vo.id}/outgoing-webhooks/${t.id}`)).data};units={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes`)).data.map(e=>new h(e,this._httpClient))};nodes={list:async()=>(await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes`)).data.map(e=>new a(e,this._httpClient)),get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${this._vo.id}/nodes/${t}`);return new a(e.data,this._httpClient)}}};var l=class{_options;_httpClient;constructor(t){this._options=t,this._httpClient=t.customHttpClient||new n(t.baseURL||"https://bika.ai/api/openapi/bika",t.token)}space={list:async()=>(await this._httpClient.get("/v1/spaces")).data.map(e=>new r(e,this._httpClient)),get:async t=>{let e=await this._httpClient.get(`/v1/spaces/${t}`);return new r(e.data,this._httpClient)}};siteAdmin={appEnv:async()=>(await this._httpClient.get("/v1/site-admin/app-env")).data,outgoingWebhooks:{list:async()=>(await this._httpClient.get("/v1/site-admin/outgoing-webhooks")).data,register:async t=>(await this._httpClient.post("/v1/site-admin/outgoing-webhooks",t)).data,delete:async()=>(await this._httpClient.delete("/v1/site-admin/outgoing-webhooks")).data}};system={meta:async()=>(await this._httpClient.get("/v1/system/meta")).data}};export{l as Bika}; |
@@ -10,11 +10,5 @@ import { NodeTreeVO } from '@bika/types/node/vo'; | ||
get id(): string; | ||
get resourceType(): "TEMPLATE" | "AI" | "FORM" | "DATABASE" | "AUTOMATION" | "DASHBOARD" | "VIEW" | "REPORT_TEMPLATE" | "CAMPAIGN" | "FOLDER" | "MIRROR" | "ROOT" | "DATAPAGE" | "CANVAS" | "ALIAS" | "DOCUMENT" | "FILE" | "WEB_PAGE" | "CODE_PAGE"; | ||
get resourceType(): "AI" | "FORM" | "DATABASE" | "TEMPLATE" | "AUTOMATION" | "DASHBOARD" | "VIEW" | "REPORT_TEMPLATE" | "CAMPAIGN" | "FOLDER" | "MIRROR" | "ROOT" | "DATAPAGE" | "CANVAS" | "ALIAS" | "DOCUMENT" | "FILE" | "WEB_PAGE" | "CODE_PAGE"; | ||
asDatabase(): Promise<DatabaseAO>; | ||
asAutomation(): Promise<AutomationAO>; | ||
embeddedLink: { | ||
create: () => Promise<void>; | ||
get: () => Promise<void>; | ||
list: () => Promise<void>; | ||
delete: () => Promise<void>; | ||
}; | ||
} |
{ | ||
"name": "bika.ai", | ||
"version": "0.8.20-alpha.9", | ||
"version": "0.8.22-alpha.50", | ||
"description": "Bika.ai Official JavaScript API Client", | ||
"main": "dist/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"exports": { | ||
@@ -42,6 +43,4 @@ ".": "./dist/index.js", | ||
"dependencies": { | ||
"@bika/types": "workspace:*", | ||
"axios": "^1.6.7", | ||
"zod": "^3.23.8" | ||
"axios": "^1.6.7" | ||
} | ||
} |
@@ -5,2 +5,5 @@ | ||
Simple and powerful client for [Bika.ai](https://bika.ai)'s widely Open APIs. | ||
Simple and powerful client for [Bika.ai](https://bika.ai)'s widely Open APIs. | ||
Check more detail on documentation: https://bika.ai/help/guide/developer/openapi |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
784190
1
15
14103
8
1
- Removed@bika/types@workspace:*
- Removedzod@^3.23.8
- Removedzod@3.24.1(transitive)