@agentica/chat 0.43.2 → 0.43.3
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.
- package/dist/assets/{VendorConfigurationMovie-BTLQOiA2.js → VendorConfigurationMovie-Cpx1jhtO.js} +1 -1
- package/dist/assets/bbs/{index-CZ_ISwun.js → index-DxVHwWX6.js} +1 -1
- package/dist/assets/shopping/{index.html-BlB8QnQT.js → index.html-B8CDZvK4.js} +1 -1
- package/dist/assets/uploader/{index.html-EUGT-F1U.js → index.html-taNoaQTw.js} +1 -1
- package/dist/bbs/index.html +2 -2
- package/dist/shopping/index.html +2 -2
- package/dist/uploader/index.html +2 -2
- package/package.json +2 -2
package/dist/assets/{VendorConfigurationMovie-BTLQOiA2.js → VendorConfigurationMovie-Cpx1jhtO.js}
RENAMED
|
@@ -395,7 +395,7 @@ You have been provided with \`IValidation.IError[][]\` containing **previous his
|
|
|
395
395
|
`,r:"\r",t:" "};function YBn(o){let s=0,d="";q(["```","[```","{```"]),N()||si(),q(["```","```]","```}"]);const C=K(",");for(C&&B(),_Ce(o[s])&&WBn(d)?(C||(d=X_(d,",")),Mt()):C&&(d=aQ(d,","));o[s]==="}"||o[s]==="]";)s++,B();if(s>=o.length)return d;ni();function N(){B();const fr=Lt()||Pt()||ne()||he()||un()||Ve(!1)||ir();return B(),fr}function B(){let fr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const yr=s;let Oe=j(fr);do Oe=et(),Oe&&(Oe=j(fr));while(Oe);return s>yr}function j(fr){const yr=fr?YN:zBn;let Oe="";for(;;)if(yr(o,s))Oe+=o[s],s++;else if(UBn(o,s))Oe+=" ",s++;else break;return Oe.length>0?(d+=Oe,!0):!1}function et(){if(o[s]==="/"&&o[s+1]==="*"){for(;s<o.length&&!VBn(o,s);)s++;return s+=2,!0}if(o[s]==="/"&&o[s+1]==="/"){for(;s<o.length&&o[s]!==`
|
|
396
396
|
`;)s++;return!0}return!1}function q(fr){if(nt(fr)){if(bCe(o[s]))for(;s<o.length&&mCe(o[s]);)s++;return B(),!0}return!1}function nt(fr){j(!0);for(const yr of fr){const Oe=s+yr.length;if(o.slice(s,Oe)===yr)return s=Oe,!0}return!1}function K(fr){return o[s]===fr?(d+=o[s],s++,!0):!1}function Q(fr){return o[s]===fr?(s++,!0):!1}function at(){return Q("\\")}function bt(){return B(),o[s]==="."&&o[s+1]==="."&&o[s+2]==="."?(s+=3,B(),Q(","),!0):!1}function Lt(){if(o[s]==="{"){d+="{",s++,B(),Q(",")&&B();let fr=!0;for(;s<o.length&&o[s]!=="}";){let yr;if(fr?(yr=!0,fr=!1):(yr=K(","),yr||(d=X_(d,",")),B()),bt(),!(ne()||Ve(!0))){o[s]==="}"||o[s]==="{"||o[s]==="]"||o[s]==="["||o[s]===void 0?d=aQ(d,","):Ar();break}B();const Ta=K(":"),rs=s>=o.length;Ta||(_Ce(o[s])||rs?d=X_(d,":"):di()),N()||(Ta||rs?d+="null":di())}return o[s]==="}"?(d+="}",s++):d=X_(d,"}"),!0}return!1}function Pt(){if(o[s]==="["){d+="[",s++,B(),Q(",")&&B();let fr=!0;for(;s<o.length&&o[s]!=="]";)if(fr?fr=!1:K(",")||(d=X_(d,",")),bt(),!N()){d=aQ(d,",");break}return o[s]==="]"?(d+="]",s++):d=X_(d,"]"),!0}return!1}function Mt(){let fr=!0,yr=!0;for(;yr;)fr?fr=!1:K(",")||(d=X_(d,",")),yr=N();yr||(d=aQ(d,",")),d=`[
|
|
397
397
|
${d}
|
|
398
|
-
]`}function ne(){let fr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Oe=o[s]==="\\";if(Oe&&(s++,Oe=!0),zbt(o[s])){const Ta=xCe(o[s])?xCe:ECe(o[s])?ECe:g$t(o[s])?g$t:DOe,rs=s,We=d.length;let za='"';for(s++;;){if(s>=o.length){const $a=On(s-1);return!fr&&Sbt(o.charAt($a))?(s=rs,d=d.substring(0,We),ne(!0)):(za=X_(za,'"'),d+=za,!0)}if(s===yr)return za=X_(za,'"'),d+=za,!0;if(Ta(o[s])){const $a=s,Ca=za.length;if(za+='"',s++,d+=za,B(!1),fr||s>=o.length||Sbt(o[s])||zbt(o[s])||qN(o[s]))return se(),!0;const Fs=On($a-1),su=o.charAt(Fs);if(su===",")return s=rs,d=d.substring(0,We),ne(!1,Fs);if(Sbt(su))return s=rs,d=d.substring(0,We),ne(!0);d=d.substring(0,We),s=$a+1,za=`${za.substring(0,Ca)}\\${za.substring(Ca)}`}else if(fr&&vCe(o[s])){if(o[s-1]===":"&&yCe.test(o.substring(rs+1,s+2)))for(;s<o.length&&wCe.test(o[s]);)za+=o[s],s++;return za=X_(za,'"'),d+=za,se(),!0}else if(o[s]==="\\"){const $a=o.charAt(s+1);if(GBn[$a]!==void 0)za+=o.slice(s,s+2),s+=2;else if($a==="u"){let Fs=2;for(;Fs<6&&$Bn(o[s+Fs]);)Fs++;Fs===6?(za+=o.slice(s,s+6),s+=6):s+Fs>=o.length?s=o.length:_a()}else za+=$a,s+=2}else{const $a=o.charAt(s);$a==='"'&&o[s-1]!=="\\"?(za+=`\\${$a}`,s++):HBn($a)?(za+=KBn[$a],s++):(FBn($a)||er($a),za+=$a,s++)}Oe&&at()}}return!1}function se(){let fr=!1;for(B();o[s]==="+";){fr=!0,s++,B(),d=aQ(d,'"',!0);const yr=d.length;ne()?d=qBn(d,yr,1):d=X_(d,'"')}return fr}function he(){const fr=s;if(o[s]==="-"){if(s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1}for(;qN(o[s]);)s++;if(o[s]==="."){if(s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1;for(;qN(o[s]);)s++}if(o[s]==="e"||o[s]==="E"){if(s++,(o[s]==="-"||o[s]==="+")&&s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1;for(;qN(o[s]);)s++}if(!Xn())return s=fr,!1;if(s>fr){const yr=o.slice(fr,s),Oe=/^0\d/.test(yr);return d+=Oe?`"${yr}"`:yr,!0}return!1}function un(){return ue("true","true")||ue("false","false")||ue("null","null")||ue("True","true")||ue("False","false")||ue("None","null")}function ue(fr,yr){return o.slice(s,s+fr.length)===fr?(d+=yr,s+=fr.length,!0):!1}function Ve(fr){const yr=s;if(bCe(o[s])){for(;s<o.length&&mCe(o[s]);)s++;let Oe=s;for(;YN(o,Oe);)Oe++;if(o[Oe]==="(")return s=Oe+1,N(),o[s]===")"&&(s++,o[s]===";"&&s++),!0}for(;s<o.length&&!vCe(o[s])&&!zbt(o[s])&&(!fr||o[s]!==":");)s++;if(o[s-1]===":"&&yCe.test(o.substring(yr,s+2)))for(;s<o.length&&wCe.test(o[s]);)s++;if(s>yr){for(;YN(o,s-1)&&s>0;)s--;const Oe=o.slice(yr,s);return d+=Oe==="undefined"?"null":JSON.stringify(Oe),o[s]==='"'&&s++,!0}}function ir(){if(o[s]==="/"){const fr=s;for(s++;s<o.length&&(o[s]!=="/"||o[s-1]==="\\");)s++;return s++,d+=`"${o.substring(fr,s)}"`,!0}}function On(fr){let yr=fr;for(;yr>0&&YN(o,yr);)yr--;return yr}function Xn(){return s>=o.length||Sbt(o[s])||YN(o,s)}function ur(fr){d+=`${o.slice(fr,s)}0`}function er(fr){throw new v$(`Invalid character ${JSON.stringify(fr)}`,s)}function ni(){throw new v$(`Unexpected character ${JSON.stringify(o[s])}`,s)}function si(){throw new v$("Unexpected end of json string",o.length)}function Ar(){throw new v$("Object key expected",s)}function di(){throw new v$("Colon expected",s)}function _a(){const fr=o.slice(s,s+6);throw new v$(`Invalid unicode character "${fr}"`,s)}}function VBn(o,s){return o[s]==="*"&&o[s+1]==="/"}var Smt;(function(o){o.variable=s=>o.reserved(s)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(s),o.reserved=s=>XBn.has(s)})(Smt||(Smt={}));const XBn=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","module","new","null","package","public","private","protected","return","super","switch","this","throw","true","try","typeof","var","void","while","with"]),G$={parse:bFt,stringifyValidationFailure:ZBn},QBn=(...o)=>s=>o.reduce((d,y)=>y(d),s);function bFt(o,s){o=QBn(Hbt.removeEmptyObjectPrefix,Hbt.addMissingBraces,Hbt.removeTrailingCommas,YBn)(o);const d=(()=>{const y=JSON.parse(o);if(typeof y=="string"&&s!==void 0)try{return bFt(y)}catch{}return y})();return s!==void 0&&JBn(s,d),d}function JBn(o,s){if(Object.keys(o.properties).length
|
|
398
|
+
]`}function ne(){let fr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Oe=o[s]==="\\";if(Oe&&(s++,Oe=!0),zbt(o[s])){const Ta=xCe(o[s])?xCe:ECe(o[s])?ECe:g$t(o[s])?g$t:DOe,rs=s,We=d.length;let za='"';for(s++;;){if(s>=o.length){const $a=On(s-1);return!fr&&Sbt(o.charAt($a))?(s=rs,d=d.substring(0,We),ne(!0)):(za=X_(za,'"'),d+=za,!0)}if(s===yr)return za=X_(za,'"'),d+=za,!0;if(Ta(o[s])){const $a=s,Ca=za.length;if(za+='"',s++,d+=za,B(!1),fr||s>=o.length||Sbt(o[s])||zbt(o[s])||qN(o[s]))return se(),!0;const Fs=On($a-1),su=o.charAt(Fs);if(su===",")return s=rs,d=d.substring(0,We),ne(!1,Fs);if(Sbt(su))return s=rs,d=d.substring(0,We),ne(!0);d=d.substring(0,We),s=$a+1,za=`${za.substring(0,Ca)}\\${za.substring(Ca)}`}else if(fr&&vCe(o[s])){if(o[s-1]===":"&&yCe.test(o.substring(rs+1,s+2)))for(;s<o.length&&wCe.test(o[s]);)za+=o[s],s++;return za=X_(za,'"'),d+=za,se(),!0}else if(o[s]==="\\"){const $a=o.charAt(s+1);if(GBn[$a]!==void 0)za+=o.slice(s,s+2),s+=2;else if($a==="u"){let Fs=2;for(;Fs<6&&$Bn(o[s+Fs]);)Fs++;Fs===6?(za+=o.slice(s,s+6),s+=6):s+Fs>=o.length?s=o.length:_a()}else za+=$a,s+=2}else{const $a=o.charAt(s);$a==='"'&&o[s-1]!=="\\"?(za+=`\\${$a}`,s++):HBn($a)?(za+=KBn[$a],s++):(FBn($a)||er($a),za+=$a,s++)}Oe&&at()}}return!1}function se(){let fr=!1;for(B();o[s]==="+";){fr=!0,s++,B(),d=aQ(d,'"',!0);const yr=d.length;ne()?d=qBn(d,yr,1):d=X_(d,'"')}return fr}function he(){const fr=s;if(o[s]==="-"){if(s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1}for(;qN(o[s]);)s++;if(o[s]==="."){if(s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1;for(;qN(o[s]);)s++}if(o[s]==="e"||o[s]==="E"){if(s++,(o[s]==="-"||o[s]==="+")&&s++,Xn())return ur(fr),!0;if(!qN(o[s]))return s=fr,!1;for(;qN(o[s]);)s++}if(!Xn())return s=fr,!1;if(s>fr){const yr=o.slice(fr,s),Oe=/^0\d/.test(yr);return d+=Oe?`"${yr}"`:yr,!0}return!1}function un(){return ue("true","true")||ue("false","false")||ue("null","null")||ue("True","true")||ue("False","false")||ue("None","null")}function ue(fr,yr){return o.slice(s,s+fr.length)===fr?(d+=yr,s+=fr.length,!0):!1}function Ve(fr){const yr=s;if(bCe(o[s])){for(;s<o.length&&mCe(o[s]);)s++;let Oe=s;for(;YN(o,Oe);)Oe++;if(o[Oe]==="(")return s=Oe+1,N(),o[s]===")"&&(s++,o[s]===";"&&s++),!0}for(;s<o.length&&!vCe(o[s])&&!zbt(o[s])&&(!fr||o[s]!==":");)s++;if(o[s-1]===":"&&yCe.test(o.substring(yr,s+2)))for(;s<o.length&&wCe.test(o[s]);)s++;if(s>yr){for(;YN(o,s-1)&&s>0;)s--;const Oe=o.slice(yr,s);return d+=Oe==="undefined"?"null":JSON.stringify(Oe),o[s]==='"'&&s++,!0}}function ir(){if(o[s]==="/"){const fr=s;for(s++;s<o.length&&(o[s]!=="/"||o[s-1]==="\\");)s++;return s++,d+=`"${o.substring(fr,s)}"`,!0}}function On(fr){let yr=fr;for(;yr>0&&YN(o,yr);)yr--;return yr}function Xn(){return s>=o.length||Sbt(o[s])||YN(o,s)}function ur(fr){d+=`${o.slice(fr,s)}0`}function er(fr){throw new v$(`Invalid character ${JSON.stringify(fr)}`,s)}function ni(){throw new v$(`Unexpected character ${JSON.stringify(o[s])}`,s)}function si(){throw new v$("Unexpected end of json string",o.length)}function Ar(){throw new v$("Object key expected",s)}function di(){throw new v$("Colon expected",s)}function _a(){const fr=o.slice(s,s+6);throw new v$(`Invalid unicode character "${fr}"`,s)}}function VBn(o,s){return o[s]==="*"&&o[s+1]==="/"}var Smt;(function(o){o.variable=s=>o.reserved(s)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(s),o.reserved=s=>XBn.has(s)})(Smt||(Smt={}));const XBn=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","module","new","null","package","public","private","protected","return","super","switch","this","throw","true","try","typeof","var","void","while","with"]),G$={parse:bFt,stringifyValidationFailure:ZBn},QBn=(...o)=>s=>o.reduce((d,y)=>y(d),s);function bFt(o,s){o=QBn(Hbt.removeEmptyObjectPrefix,Hbt.addMissingBraces,Hbt.removeTrailingCommas,YBn)(o);const d=(()=>{const y=JSON.parse(o);if(typeof y=="string"&&s!==void 0)try{return bFt(y)}catch{}return y})();return s!==void 0&&JBn(s,d),d}function JBn(o,s){if(!(Object.keys(o.properties).length===0||typeof s!="object"||s===null))for(const[d,y]of Object.entries(o.properties)){const C=s[d];if(typeof C=="string"&&b$t({$defs:o.$defs,schema:y})===!0)try{s[d]=bFt(C)}catch{}}}function b$t(o){return _f.isReference(o.schema)?b$t({$defs:o.$defs,schema:o.$defs[o.schema.$ref.split("/").pop()]??{}}):_f.isNull(o.schema)||_f.isObject(o.schema)||_f.isArray(o.schema)||_f.isAnyOf(o.schema)&&o.schema.anyOf.every(s=>b$t({$defs:o.$defs,schema:s}))}function ZBn(o){const s=new Set,d=Ubt({value:o.data,errors:o.errors,path:"$input",tab:0,inArray:!1,inToJson:!1,usedErrors:s}),y=o.errors.filter(C=>!s.has(C));return y.length>0?`\`\`\`json
|
|
399
399
|
${d}
|
|
400
400
|
\`\`\`
|
|
401
401
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c,o as A,r as g,T as b}from"../client-B3aq8qpT.js";import{n as B,t as U,o as v,p as T,q as $,r as S,s as F,v as R,w as k,x as M,_,d as P,V as j,c as z,F as O,T as E,B as q}from"../VendorConfigurationMovie-
|
|
1
|
+
import{j as c,o as A,r as g,T as b}from"../client-B3aq8qpT.js";import{n as B,t as U,o as v,p as T,q as $,r as S,s as F,v as R,w as k,x as M,_,d as P,V as j,c as z,F as O,T as E,B as q}from"../VendorConfigurationMovie-Cpx1jhtO.js";import{D}from"../Divider-DX1xhf0M.js";function L(s){if(s.success!==!0){{if(s.value instanceof Error)throw s.value;if(typeof s.value=="object"&&s.value!==null){const t=new Error("Error from execute failure");throw Object.assign(t,s.value),t}}throw s.value}}class w{constructor(t){this.props=t,this.operations_=B.compose({controllers:t.controllers,config:t.config}),this.histories_=(t.histories??[]).map(a=>U({operations:this.operations_.group,history:a})),this.token_usage_=this.props.tokenUsage!==void 0?this.props.tokenUsage instanceof v?this.props.tokenUsage:new v(this.props.tokenUsage):v.zero(),this.listeners_=new Map,this.semaphore_=t.vendor.semaphore!=null?typeof t.vendor.semaphore=="object"?t.vendor.semaphore:new T(t.vendor.semaphore):null}clone(){var t;return new w({...this.props,histories:(t=this.props.histories)==null?void 0:t.slice()})}async conversate(t,a={}){var n,e,r;const l=[],u=async i=>{try{await this.dispatch(i),"toHistory"in i&&("join"in i?l.push(async()=>(await i.join(),i.toHistory())):l.push(async()=>i.toHistory()))}catch{}},p=$({contents:Array.isArray(t)?t:typeof t=="string"?[{type:"text",text:t}]:[t]});u(p).catch(()=>{});const h=this.getContext({prompt:p,dispatch:u,usage:this.token_usage_,abortSignal:a.abortSignal}),f=await S(h,this.operations_.array);f.length&&((e=(n=this.props.config)==null?void 0:n.executor)!=null&&e.describe)&&await(typeof this.props.config.executor.describe=="function"?this.props.config.executor.describe:F)(h,f);const o=await Promise.all(l.map(async i=>i()));if(this.histories_.push(...o),((r=this.props.config)==null?void 0:r.throw)!==!1)for(const i of f)L(i);return o}getConfig(){return this.props.config}getVendor(){return this.props.vendor}getOperations(){return this.operations_.array}getControllers(){return this.props.controllers}getHistories(){return this.histories_}getTokenUsage(){return this.token_usage_}getContext(t){const a=R({vendor:this.props.vendor,config:this.props.config,dispatch:t.dispatch,abortSignal:t.abortSignal,usage:this.token_usage_});return{operations:this.operations_,config:this.props.config,histories:this.histories_,prompt:t.prompt,dispatch:t.dispatch,request:this.semaphore_===null?a:async(l,u)=>{await this.semaphore_.acquire();try{return await a(l,u)}finally{this.semaphore_.release().catch(()=>{})}}}}on(t,a){return k(this.listeners_,t,()=>new Set).add(a),this}off(t,a){const l=this.listeners_.get(t);return l!==void 0&&(l.delete(a),l.size===0&&this.listeners_.delete(t)),this}async dispatch(t){const a=this.listeners_.get(t.type);a!==void 0&&await Promise.all(Array.from(a).map(async l=>{try{await l(t)}catch{}}))}}var x={};Object.defineProperty(x,"__esModule",{value:!0});var m=x._isFormatUri=void 0;const H=s=>K.test(s)&&V.test(s);m=x._isFormatUri=H;const K=/\/|:/,V=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var I={};Object.defineProperty(I,"__esModule",{value:!0});var y=I._isFormatUuid=void 0;const N=s=>G.test(s);y=I._isFormatUuid=N;const G=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;class W{constructor(){this.articles=[]}index(){return this.articles}create(t){const a={id:M(),title:t.input.title,body:t.input.body,thumbnail:t.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(a),a}update(t){const a=this.articles.find(l=>l.id===t.id);if(a===void 0)throw new Error("Unable to find the matched article.");t.input.title!==void 0&&(a.title=t.input.title),t.input.body!==void 0&&(a.body=t.input.body),t.input.thumbnail!==void 0&&(a.thumbnail=t.input.thumbnail),a.updated_at=new Date().toISOString()}erase(t){const a=this.articles.findIndex(l=>l.id===t.id);if(a===-1)throw new Error("Unable to find the matched article.");this.articles.splice(a,1)}}function J(s){const t=new W,a=new w({vendor:{api:s.api,model:s.vendorModel},controllers:[{protocol:"class",name:"bbs",application:{config:{reference:!0,strict:!1,separate:null,validate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{IBbsArticle:{description:"Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).",type:"object",properties:{id:{description:"Primary Key.",type:"string",format:"uuid"},created_at:{description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{description:"Last updated time of the article.",type:"string",format:"date-time"},title:{description:`Title of the article.
|
|
2
2
|
|
|
3
3
|
Representative title of the article.`,type:"string"},body:{description:`Content body.
|
|
4
4
|
|