@forjacms/client 1.8.3 → 2.0.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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../client-D-4q1qfr.cjs`);let t=require(`@angular/core`);const n=new t.InjectionToken(`ForjaClient`);function r(r){return(0,t.makeEnvironmentProviders)([{provide:n,useFactory:()=>new e.t(r)}])}function i(){return(0,t.inject)(n)}function a(e){let n=(0,t.signal)(void 0),r=(0,t.signal)(!0),i=(0,t.signal)(null),a=()=>{r.set(!0),i.set(null),e().then(e=>n.set(e)).catch(e=>i.set(e instanceof Error?e:Error(String(e)))).finally(()=>r.set(!1))};return a(),{value:n.asReadonly(),isLoading:r.asReadonly(),error:i.asReadonly(),reload:a}}exports.FORJA_CLIENT=n,exports.forjaResource=a,exports.injectForja=i,exports.provideForja=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../client-BSWR_os4.cjs");let t=require("@angular/core");const n=new t.InjectionToken(`ForjaClient`);function r(r){return(0,t.makeEnvironmentProviders)([{provide:n,useFactory:()=>new e.t(r)}])}function i(){return(0,t.inject)(n)}function a(e){let n=(0,t.signal)(void 0),r=(0,t.signal)(!0),i=(0,t.signal)(null),a=()=>{r.set(!0),i.set(null),e().then(e=>n.set(e)).catch(e=>i.set(e instanceof Error?e:Error(String(e)))).finally(()=>r.set(!1))};return a(),{value:n.asReadonly(),isLoading:r.asReadonly(),error:i.asReadonly(),reload:a}}exports.FORJA_CLIENT=n,exports.forjaResource=a,exports.injectForja=i,exports.provideForja=r;
@@ -1,4 +1,4 @@
1
- import { R as ForjaClientConfig, t as ForjaClient } from "../client-Bvy1FhEg.cjs";
1
+ import { R as ForjaClientConfig, t as ForjaClient } from "../client-BoEyJL6_.cjs";
2
2
  import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
3
3
 
4
4
  //#region src/angular/provider.d.ts
@@ -1,4 +1,4 @@
1
- import { R as ForjaClientConfig, t as ForjaClient } from "../client-DAhZzkp0.mjs";
1
+ import { R as ForjaClientConfig, t as ForjaClient } from "../client-BoEyJL6_.mjs";
2
2
  import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
3
3
 
4
4
  //#region src/angular/provider.d.ts
@@ -1 +1 @@
1
- import{t as e}from"../client-BT9X5cfs.mjs";import{InjectionToken as t,inject as n,makeEnvironmentProviders as r,signal as i}from"@angular/core";const a=new t(`ForjaClient`);function o(t){return r([{provide:a,useFactory:()=>new e(t)}])}function s(){return n(a)}function c(e){let t=i(void 0),n=i(!0),r=i(null),a=()=>{n.set(!0),r.set(null),e().then(e=>t.set(e)).catch(e=>r.set(e instanceof Error?e:Error(String(e)))).finally(()=>n.set(!1))};return a(),{value:t.asReadonly(),isLoading:n.asReadonly(),error:r.asReadonly(),reload:a}}export{a as FORJA_CLIENT,c as forjaResource,s as injectForja,o as provideForja};
1
+ import{t as e}from"../client-D9WF4wKY.mjs";import{InjectionToken as t,inject as n,makeEnvironmentProviders as r,signal as i}from"@angular/core";const a=new t(`ForjaClient`);function o(t){return r([{provide:a,useFactory:()=>new e(t)}])}function s(){return n(a)}function c(e){let t=i(void 0),n=i(!0),r=i(null),a=()=>{n.set(!0),r.set(null),e().then(e=>t.set(e)).catch(e=>r.set(e instanceof Error?e:Error(String(e)))).finally(()=>n.set(!1))};return a(),{value:t.asReadonly(),isLoading:n.asReadonly(),error:r.asReadonly(),reload:a}}export{a as FORJA_CLIENT,c as forjaResource,s as injectForja,o as provideForja};
@@ -1 +1 @@
1
- var e=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`ForjaError`}},t=class extends e{constructor(e=`Invalid or missing API key`){super(e,`AUTH_ERROR`),this.name=`ForjaAuthError`}},n=class extends e{constructor(e=`Insufficient permissions`){super(e,`PERMISSION_ERROR`),this.name=`ForjaPermissionError`}},r=class extends e{constructor(e=`Resource not found`){super(e,`NOT_FOUND`),this.name=`ForjaNotFoundError`}},i=class extends e{constructor(e=`Rate limit exceeded`,t){super(e,`RATE_LIMIT`),this.retryAfter=t,this.name=`ForjaRateLimitError`}},a=class extends e{constructor(e=`Validation error`,t){super(e,`VALIDATION_ERROR`),this.details=t,this.name=`ForjaValidationError`}},o=class extends e{constructor(e=`Internal server error`,t=500){super(e,`SERVER_ERROR`),this.status=t,this.name=`ForjaServerError`}},s=class extends e{constructor(e=`Network error`,t){super(e,`NETWORK_ERROR`),this.cause=t,this.name=`ForjaNetworkError`}};function c(e,t,n){let r=e.replace(/\/+$/,``),i=t.startsWith(`/`)?t:`/${t}`,a=new URL(`${r}${i}`);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&a.searchParams.set(e,t);return a.toString()}function l(e){let t={};for(let[n,r]of Object.entries(e))r!=null&&(t[u(n)]=String(r));return t}function u(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}async function d(e){let s;try{let t=await e.json();s=t.detail||t.message||t.title||e.statusText}catch{s=e.statusText}switch(e.status){case 401:throw new t(s);case 403:throw new n(s);case 404:throw new r(s);case 422:throw new a(s);case 429:{let t=e.headers.get(`retry-after`);throw new i(s,t?parseInt(t,10):void 0)}default:throw e.status,new o(s,e.status)}}function f(e){let t=e.fetch??globalThis.fetch,n=e.baseUrl.replace(/\/+$/,``),i={"X-API-Key":e.apiKey,"Content-Type":`application/json`};e.siteDomain&&(i[`X-Site-Domain`]=e.siteDomain);async function a(e,r,a,o){let l=c(n,r,a),u;try{u=await t(l,{method:e,headers:i,body:o===void 0?void 0:JSON.stringify(o)})}catch(e){throw new s(`Failed to connect to the Forja API`,e instanceof Error?e:void 0)}return u.ok?u:d(u)}function o(e,t){return a(`GET`,e,t).then(e=>e.json())}async function l(e,t){try{return await o(e,t)}catch(e){if(e instanceof r)return null;throw e}}return{get:o,getOrNull:l,getText:(e,t)=>a(`GET`,e,t).then(e=>e.text()),post:(e,t)=>a(`POST`,e,void 0,t).then(e=>e.json()),delete:e=>a(`DELETE`,e).then(()=>void 0)}}function p(e,t,n){return{data:e,meta:t,async fetchNext(){if(t.page>=t.total_pages)return null;let e=await n(t.page+1);return p(e.data,e.meta,n)},async fetchAll(){let r=[...e],i=t.page;for(;i<t.total_pages;){i++;let e=await n(i);r.push(...e.data)}return r},async*[Symbol.asyncIterator](){yield{data:e,meta:t};let r=t.page;for(;r<t.total_pages;)r++,yield await n(r)}}}var m=class{constructor(e,t){this.http=e,this.siteId=t}async trackPageview(e){return this.http.post(`/sites/${this.siteId}/analytics/pageview`,e)}async getReport(e){let t=e?l({days:e.days,top_n:e.topN,start_date:e.startDate,end_date:e.endDate}):void 0;return this.http.get(`/sites/${this.siteId}/analytics/report`,t)}async getPageAnalytics(e){let t=l({path:e.path,days:e.days,start_date:e.startDate,end_date:e.endDate});return this.http.get(`/sites/${this.siteId}/analytics/report/page`,t)}},h=class{constructor(e,t,n){this.http=e,this.siteId=t,this.config=n}async paginate(e,t,n){let r=t?l(t):void 0,i=t=>this.http.get(e,{...r,...n,page:String(t)}),a=await i(t?.page??1);return p(a.data,a.meta,i)}async list(e){return this.paginate(this.config.listPath,e)}async getDetail(e,t){return this.http.getOrNull(`/${this.config.detailBase}/${encodeURIComponent(e)}/detail`,{locale:t?.locale})}},g=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/blogs/published`,detailBase:`blogs`})}async listPublished(e){return this.paginate(`/sites/${this.siteId}/blogs/published`,e,e?.localeId?{locale_id:e.localeId}:void 0)}async listByCategory(e,t){return this.paginate(`/sites/${this.siteId}/blogs/published/category/${encodeURIComponent(e)}`,t,t?.localeId?{locale_id:t.localeId}:void 0)}async listFeatured(e){return this.http.get(`/sites/${this.siteId}/blogs/featured`,e?.limit===void 0?void 0:{limit:String(e.limit)})}async listSimilar(e,t){return this.http.get(`/sites/${this.siteId}/blogs/${encodeURIComponent(e)}/similar`,t?.limit===void 0?void 0:{limit:String(t.limit)})}async getBySlug(e,t){let n=await this.http.getOrNull(`/sites/${this.siteId}/blogs/by-slug/${encodeURIComponent(e)}`);return n?this.http.getOrNull(`/blogs/${n.id}/detail`,{locale:t?.locale}):null}async get(e,t){return super.getDetail(e,t)}async rss(){return this.http.getText(`/sites/${this.siteId}/feed.rss`)}},_=class{constructor(e,t,n){this.http=e,this.siteId=t,this.typeKey=n}base(){return`/sites/${this.siteId}/collections/${encodeURIComponent(this.typeKey)}`}async published(e){let t=async t=>this.http.get(`${this.base()}/published`,{...e?.locale?{locale:e.locale}:{},...e?.pageSize?{page_size:String(e.pageSize)}:{},page:String(t)}),n=await t(e?.page??1);return p(n.data,n.meta,t)}async bySlug(e,t){return this.http.getOrNull(`${this.base()}/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async schema(){return this.http.getOrNull(`${this.base()}/schema`)}},v=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/cv`,detailBase:`cv`})}async listSkills(e){return this.paginate(`/sites/${this.siteId}/skills`,e)}async getSkill(e,t){return this.http.getOrNull(`/skills/${encodeURIComponent(e)}`,{locale:t?.locale})}async getSkillBySlug(e,t){return this.http.getOrNull(`/skills/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async listEntries(e){return this.paginate(`/sites/${this.siteId}/cv`,e)}async getEntry(e,t){return this.http.getOrNull(`/cv/${encodeURIComponent(e)}`,{locale:t?.locale})}async getEntryDetail(e,t){return super.getDetail(e,t)}},y=class{constructor(e){this.http=e}async getForm(e,t){let n=t?.locale?{locale:t.locale}:void 0;return this.http.get(`/public/forms/${encodeURIComponent(e)}`,n)}async getAltchaChallenge(e){return this.http.get(`/public/forms/${encodeURIComponent(e)}/altcha-challenge`)}async submitForm(e,t,n={}){return this.http.post(`/public/forms/${encodeURIComponent(e)}/submit`,{data:t,consent_given:n.consentGiven??!1,bot_protection_token:n.botProtectionToken})}async lookupSubmission(e){return this.http.post(`/public/submissions/lookup`,{reference_code:e})}async getSubmission(e){return this.http.get(`/public/submissions/${encodeURIComponent(e)}`)}async deleteSubmission(e){return this.http.delete(`/public/submissions/${encodeURIComponent(e)}`)}};const b=/^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}$/;function x(e,t){let n={};for(let r of e.fields){let e=t[r.label],i=S(r,e);i&&(n[r.label]=i)}return n}function S(e,t){let n=t,r=n==null||typeof n==`string`&&n===``||Array.isArray(n)&&n.length===0;if((e.is_required||e.validation.required)&&r)return`${e.label} is required`;if(r)return null;switch(e.field_type){case`text`:case`textarea`:case`custom`:if(typeof n!=`string`)return`Must be a string`;if(e.validation.min_length!==void 0&&n.length<e.validation.min_length)return`Must be at least ${e.validation.min_length} characters`;if(e.validation.max_length!==void 0&&n.length>e.validation.max_length)return`Must be at most ${e.validation.max_length} characters`;if(e.validation.pattern)try{if(!new RegExp(e.validation.pattern).test(n))return`Value does not match the required pattern`}catch{return`Field has an invalid validation pattern`}return null;case`email`:return typeof n==`string`?b.test(n)?null:`Invalid email format`:`Must be a string`;case`number`:{let t=typeof n==`number`?n:Number(n);return Number.isNaN(t)?`Must be a number`:e.validation.min!==void 0&&t<e.validation.min?`Must be at least ${e.validation.min}`:e.validation.max!==void 0&&t>e.validation.max?`Must be at most ${e.validation.max}`:null}case`date`:return typeof n!=`string`||Number.isNaN(Date.parse(n))&&!/^\d{4}-\d{2}-\d{2}$/.test(n)?`Invalid date format`:null;case`select`:case`radio`:case`checkbox`:return null}}var C=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/legal`,detailBase:`legal`})}async list(e){return this.paginate(`/sites/${this.siteId}/legal`,e)}async get(e){return this.http.getOrNull(`/legal/${encodeURIComponent(e)}`)}async getBySlug(e,t){return this.http.getOrNull(`/sites/${this.siteId}/legal/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async getCookieConsent(){return this.http.getOrNull(`/sites/${this.siteId}/legal/cookie-consent`)}async getGroups(e){return this.http.get(`/legal/${encodeURIComponent(e)}/groups`)}async getGroupItems(e){return this.http.get(`/legal/groups/${encodeURIComponent(e)}/items`)}async listVersions(e){return this.http.get(`/legal/${encodeURIComponent(e)}/versions`)}},w=class{constructor(e,t){this.http=e,this.siteId=t}async list(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/media`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async get(e){return this.http.getOrNull(`/media/${encodeURIComponent(e)}`)}},T=class{constructor(e,t){this.http=e,this.siteId=t}async listMenus(){return this.http.get(`/sites/${this.siteId}/menus`)}async getMenu(e){return this.http.getOrNull(`/menus/${encodeURIComponent(e)}`)}async getMenuBySlug(e){return this.http.getOrNull(`/sites/${this.siteId}/menus/slug/${encodeURIComponent(e)}`)}async getTree(e,t){return this.http.get(`/menus/${encodeURIComponent(e)}/tree`,t?.locale?{locale:t.locale}:void 0)}async listItems(e){return this.http.get(`/menus/${encodeURIComponent(e)}/items`)}async getItem(e){return this.http.getOrNull(`/navigation/${encodeURIComponent(e)}`)}},E=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/pages`,detailBase:`pages`})}async list(e){return this.paginate(`/sites/${this.siteId}/pages`,e)}async getByRoute(e){let t=e.startsWith(`/`)?e.slice(1):e;return this.http.getOrNull(`/sites/${this.siteId}/pages/by-route/${encodeURIComponent(t)}`)}async getSections(e){return this.http.get(`/pages/${encodeURIComponent(e)}/sections`)}async getSectionLocalizations(e){return this.http.get(`/pages/sections/${encodeURIComponent(e)}/localizations`)}async getPageSectionLocalizations(e){return this.http.get(`/pages/${encodeURIComponent(e)}/sections/localizations`)}},D=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/projects/public`,detailBase:`projects`})}async listPublished(e){return this.paginate(`/sites/${this.siteId}/projects/public`,e)}async get(e,t){return this.http.getOrNull(`/projects/${encodeURIComponent(e)}`,{locale:t?.locale})}async getBySlug(e,t){return this.http.getOrNull(`/sites/${this.siteId}/projects/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}},O=class{constructor(e,t){this.http=e,this.siteId=t}async lookup(e){return this.http.getOrNull(`/sites/${this.siteId}/redirects/lookup`,{path:e})}},k=class{constructor(e,t){this.http=e,this.siteId=t}async get(){return this.http.get(`/sites/${this.siteId}`)}async listLocales(){return this.http.get(`/sites/${this.siteId}/locales`)}async getCodeInjection(){let e=await this.http.get(`/sites/${this.siteId}/settings`);return{code_injection_head:e.code_injection_head??``,code_injection_footer:e.code_injection_footer??``}}},A=class{constructor(e,t){this.http=e,this.siteId=t}async list(){return this.http.get(`/sites/${this.siteId}/social`)}},j=class{constructor(e,t){this.http=e,this.siteId=t}async listTags(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/tags`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async listCategories(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/categories`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async getCategoriesWithBlogCounts(){return this.http.get(`/sites/${this.siteId}/categories/blog-counts`)}async getContentTags(e){return this.http.get(`/content/${encodeURIComponent(e)}/tags`)}async getContentCategories(e){return this.http.get(`/content/${encodeURIComponent(e)}/categories`)}async getTag(e){return this.http.getOrNull(`/tags/${encodeURIComponent(e)}`)}async getTagBySlug(e){return this.http.getOrNull(`/tags/by-slug/${encodeURIComponent(e)}`)}async getCategory(e){return this.http.getOrNull(`/categories/${encodeURIComponent(e)}`)}async getCategoryChildren(e){return this.http.get(`/categories/${encodeURIComponent(e)}/children`)}},M=class{constructor(e){let t=f(e);this.http=t,this.siteId=e.siteId,this.blogs=new g(t,e.siteId),this.pages=new E(t,e.siteId),this.navigation=new T(t,e.siteId),this.taxonomy=new j(t,e.siteId),this.analytics=new m(t,e.siteId),this.cv=new v(t,e.siteId),this.legal=new C(t,e.siteId),this.projects=new D(t,e.siteId),this.redirects=new O(t,e.siteId),this.site=new k(t,e.siteId),this.media=new w(t,e.siteId),this.social=new A(t,e.siteId),this.forms=new y(t)}collections(e){return new _(this.http,this.siteId,e)}};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
1
+ var e=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`ForjaError`}},t=class extends e{constructor(e=`Invalid or missing API key`){super(e,`AUTH_ERROR`),this.name=`ForjaAuthError`}},n=class extends e{constructor(e=`Insufficient permissions`){super(e,`PERMISSION_ERROR`),this.name=`ForjaPermissionError`}},r=class extends e{constructor(e=`Resource not found`){super(e,`NOT_FOUND`),this.name=`ForjaNotFoundError`}},i=class extends e{constructor(e=`Rate limit exceeded`,t){super(e,`RATE_LIMIT`),this.retryAfter=t,this.name=`ForjaRateLimitError`}},a=class extends e{constructor(e=`Validation error`,t){super(e,`VALIDATION_ERROR`),this.details=t,this.name=`ForjaValidationError`}},o=class extends e{constructor(e=`Internal server error`,t=500){super(e,`SERVER_ERROR`),this.status=t,this.name=`ForjaServerError`}},s=class extends e{constructor(e=`Network error`,t){super(e,`NETWORK_ERROR`),this.cause=t,this.name=`ForjaNetworkError`}};function c(e,t,n){let r=e.replace(/\/+$/,``),i=t.startsWith(`/`)?t:`/${t}`,a=new URL(`${r}${i}`);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&a.searchParams.set(e,t);return a.toString()}function l(e){let t={};for(let[n,r]of Object.entries(e))r!=null&&(t[u(n)]=String(r));return t}function u(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}async function d(e){let s;try{let t=await e.json();s=t.detail||t.message||t.title||e.statusText}catch{s=e.statusText}switch(e.status){case 401:throw new t(s);case 403:throw new n(s);case 404:throw new r(s);case 422:throw new a(s);case 429:{let t=e.headers.get(`retry-after`);throw new i(s,t?parseInt(t,10):void 0)}default:throw e.status,new o(s,e.status)}}function f(e){let t=e.fetch??globalThis.fetch,n=e.baseUrl.replace(/\/+$/,``),i={"X-API-Key":e.apiKey,"Content-Type":`application/json`};e.siteDomain&&(i[`X-Site-Domain`]=e.siteDomain);async function a(e,r,a,o){let l=c(n,r,a),u;try{u=await t(l,{method:e,headers:i,body:o===void 0?void 0:JSON.stringify(o)})}catch(e){throw new s(`Failed to connect to the Forja API`,e instanceof Error?e:void 0)}return u.ok?u:d(u)}function o(e,t){return a(`GET`,e,t).then(e=>e.json())}async function l(e,t){try{return await o(e,t)}catch(e){if(e instanceof r)return null;throw e}}return{get:o,getOrNull:l,getText:(e,t)=>a(`GET`,e,t).then(e=>e.text()),post:(e,t)=>a(`POST`,e,void 0,t).then(e=>e.json()),delete:e=>a(`DELETE`,e).then(()=>void 0)}}function p(e,t,n){return{data:e,meta:t,async fetchNext(){if(t.page>=t.total_pages)return null;let e=await n(t.page+1);return p(e.data,e.meta,n)},async fetchAll(){let r=[...e],i=t.page;for(;i<t.total_pages;){i++;let e=await n(i);r.push(...e.data)}return r},async*[Symbol.asyncIterator](){yield{data:e,meta:t};let r=t.page;for(;r<t.total_pages;)r++,yield await n(r)}}}var m=class{constructor(e,t){this.http=e,this.siteId=t}async trackPageview(e){return this.http.post(`/sites/${this.siteId}/analytics/pageview`,e)}async getReport(e){let t=e?l({days:e.days,top_n:e.topN,start_date:e.startDate,end_date:e.endDate}):void 0;return this.http.get(`/sites/${this.siteId}/analytics/report`,t)}async getPageAnalytics(e){let t=l({path:e.path,days:e.days,start_date:e.startDate,end_date:e.endDate});return this.http.get(`/sites/${this.siteId}/analytics/report/page`,t)}},h=class{constructor(e,t,n){this.http=e,this.siteId=t,this.config=n}async paginate(e,t,n){let r=t?l(t):void 0,i=t=>this.http.get(e,{...r,...n,page:String(t)}),a=await i(t?.page??1);return p(a.data,a.meta,i)}async list(e){return this.paginate(this.config.listPath,e)}async getDetail(e,t){return this.http.getOrNull(`/${this.config.detailBase}/${encodeURIComponent(e)}/detail`,{locale:t?.locale})}},g=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/blogs/published`,detailBase:`blogs`})}async listPublished(e){return this.paginate(`/sites/${this.siteId}/blogs/published`,e,e?.localeId?{locale_id:e.localeId}:void 0)}async listByCategory(e,t){return this.paginate(`/sites/${this.siteId}/blogs/published/category/${encodeURIComponent(e)}`,t,t?.localeId?{locale_id:t.localeId}:void 0)}async listFeatured(e){return this.http.get(`/sites/${this.siteId}/blogs/featured`,e?.limit===void 0?void 0:{limit:String(e.limit)})}async listSimilar(e,t){return this.http.get(`/sites/${this.siteId}/blogs/${encodeURIComponent(e)}/similar`,t?.limit===void 0?void 0:{limit:String(t.limit)})}async getBySlug(e,t){let n=await this.http.getOrNull(`/sites/${this.siteId}/blogs/by-slug/${encodeURIComponent(e)}`);return n?this.http.getOrNull(`/blogs/${n.id}/detail`,{locale:t?.locale}):null}async get(e,t){return super.getDetail(e,t)}async rss(){return this.http.getText(`/sites/${this.siteId}/feed.rss`)}},_=class{constructor(e,t,n){this.http=e,this.siteId=t,this.typeKey=n}base(){return`/sites/${this.siteId}/collections/${encodeURIComponent(this.typeKey)}`}async published(e){let t=async t=>this.http.get(`${this.base()}/published`,{...e?.locale?{locale:e.locale}:{},...e?.pageSize?{page_size:String(e.pageSize)}:{},page:String(t)}),n=await t(e?.page??1);return p(n.data,n.meta,t)}async bySlug(e,t){return this.http.getOrNull(`${this.base()}/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async schema(){return this.http.getOrNull(`${this.base()}/schema`)}},v=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/cv`,detailBase:`cv`})}async listSkills(e){return this.paginate(`/sites/${this.siteId}/skills`,e)}async getSkill(e,t){return this.http.getOrNull(`/skills/${encodeURIComponent(e)}`,{locale:t?.locale})}async getSkillBySlug(e,t){return this.http.getOrNull(`/skills/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async listEntries(e){return this.paginate(`/sites/${this.siteId}/cv`,e)}async getEntry(e,t){return this.http.getOrNull(`/cv/${encodeURIComponent(e)}`,{locale:t?.locale})}async getEntryDetail(e,t){return super.getDetail(e,t)}},y=class{constructor(e){this.http=e}async getForm(e,t){let n=t?.locale?{locale:t.locale}:void 0;return this.http.get(`/public/forms/${encodeURIComponent(e)}`,n)}async getAltchaChallenge(e){return this.http.get(`/public/forms/${encodeURIComponent(e)}/altcha-challenge`)}async submitForm(e,t,n={}){return this.http.post(`/public/forms/${encodeURIComponent(e)}/submit`,{data:t,consent_given:n.consentGiven??!1,bot_protection_token:n.botProtectionToken})}async lookupSubmission(e){return this.http.post(`/public/submissions/lookup`,{reference_code:e})}async getSubmission(e){return this.http.get(`/public/submissions/${encodeURIComponent(e)}`)}async deleteSubmission(e){return this.http.delete(`/public/submissions/${encodeURIComponent(e)}`)}};const b=/^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}$/;function x(e,t){let n={};for(let r of e.fields){let e=t[r.label],i=S(r,e);i&&(n[r.label]=i)}return n}function S(e,t){let n=t,r=n==null||typeof n==`string`&&n===``||Array.isArray(n)&&n.length===0;if((e.is_required||e.validation.required)&&r)return`${e.label} is required`;if(r)return null;switch(e.field_type){case`text`:case`textarea`:case`custom`:if(typeof n!=`string`)return`Must be a string`;if(e.validation.min_length!==void 0&&n.length<e.validation.min_length)return`Must be at least ${e.validation.min_length} characters`;if(e.validation.max_length!==void 0&&n.length>e.validation.max_length)return`Must be at most ${e.validation.max_length} characters`;if(e.validation.pattern)try{if(!new RegExp(e.validation.pattern).test(n))return`Value does not match the required pattern`}catch{return`Field has an invalid validation pattern`}return null;case`email`:return typeof n==`string`?b.test(n)?null:`Invalid email format`:`Must be a string`;case`number`:{let t=typeof n==`number`?n:Number(n);return Number.isNaN(t)?`Must be a number`:e.validation.min!==void 0&&t<e.validation.min?`Must be at least ${e.validation.min}`:e.validation.max!==void 0&&t>e.validation.max?`Must be at most ${e.validation.max}`:null}case`date`:return typeof n!=`string`||Number.isNaN(Date.parse(n))&&!/^\d{4}-\d{2}-\d{2}$/.test(n)?`Invalid date format`:null;case`select`:case`radio`:case`checkbox`:return null}}var C=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/legal`,detailBase:`legal`})}async list(e){return this.paginate(`/sites/${this.siteId}/legal`,e)}async get(e){return this.http.getOrNull(`/legal/${encodeURIComponent(e)}`)}async getBySlug(e,t){return this.http.getOrNull(`/sites/${this.siteId}/legal/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}async getCookieConsent(){return this.http.getOrNull(`/sites/${this.siteId}/legal/cookie-consent`)}async getGroups(e){return this.http.get(`/legal/${encodeURIComponent(e)}/groups`)}async getGroupItems(e){return this.http.get(`/legal/groups/${encodeURIComponent(e)}/items`)}async listVersions(e){return this.http.get(`/legal/${encodeURIComponent(e)}/versions`)}},w=class{constructor(e,t){this.http=e,this.siteId=t}async list(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/media`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async get(e){return this.http.getOrNull(`/media/${encodeURIComponent(e)}`)}},T=class{constructor(e,t){this.http=e,this.siteId=t}async listMenus(){return this.http.get(`/sites/${this.siteId}/menus`)}async getMenu(e){return this.http.getOrNull(`/menus/${encodeURIComponent(e)}`)}async getMenuBySlug(e){return this.http.getOrNull(`/sites/${this.siteId}/menus/slug/${encodeURIComponent(e)}`)}async getTree(e,t){return this.http.get(`/menus/${encodeURIComponent(e)}/tree`,t?.locale?{locale:t.locale}:void 0)}async listItems(e){return this.http.get(`/menus/${encodeURIComponent(e)}/items`)}async getItem(e){return this.http.getOrNull(`/navigation/${encodeURIComponent(e)}`)}},E=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/pages`,detailBase:`pages`})}async list(e){return this.paginate(`/sites/${this.siteId}/pages`,e)}async getByRoute(e){let t=e.startsWith(`/`)?e.slice(1):e;return this.http.getOrNull(`/sites/${this.siteId}/pages/by-route/${encodeURIComponent(t)}`)}async getSections(e){return this.http.get(`/pages/${encodeURIComponent(e)}/sections`)}async getSectionLocalizations(e){return this.http.get(`/pages/sections/${encodeURIComponent(e)}/localizations`)}async getPageSectionLocalizations(e){return this.http.get(`/pages/${encodeURIComponent(e)}/sections/localizations`)}},D=class extends h{constructor(e,t){super(e,t,{listPath:`/sites/${t}/projects/public`,detailBase:`projects`})}async listPublished(e){return this.paginate(`/sites/${this.siteId}/projects/public`,e)}async get(e,t){return this.http.getOrNull(`/projects/${encodeURIComponent(e)}`,{locale:t?.locale})}async getBySlug(e,t){return this.http.getOrNull(`/sites/${this.siteId}/projects/by-slug/${encodeURIComponent(e)}`,{locale:t?.locale})}},O=class{constructor(e,t){this.http=e,this.siteId=t}async lookup(e){return this.http.getOrNull(`/sites/${this.siteId}/redirects/lookup`,{path:e})}},k=class{constructor(e,t){this.http=e,this.siteId=t}async get(){return this.http.get(`/sites/${this.siteId}`)}async listLocales(){return this.http.get(`/sites/${this.siteId}/locales`)}async getCodeInjection(){let e=await this.http.get(`/sites/${this.siteId}/settings`);return{code_injection_head:e.code_injection_head??``,code_injection_footer:e.code_injection_footer??``}}},A=class{constructor(e,t){this.http=e,this.siteId=t}async list(){return this.http.get(`/sites/${this.siteId}/social`)}},j=class{constructor(e,t){this.http=e,this.siteId=t}async listTags(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/tags`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async listCategories(e){let t=e?l(e):void 0,n=async e=>this.http.get(`/sites/${this.siteId}/categories`,{...t,page:String(e)}),r=await n(e?.page??1);return p(r.data,r.meta,n)}async getCategoriesWithBlogCounts(){return this.http.get(`/sites/${this.siteId}/categories/blog-counts`)}async getContentTags(e){return this.http.get(`/content/${encodeURIComponent(e)}/tags`)}async getContentCategories(e){return this.http.get(`/content/${encodeURIComponent(e)}/categories`)}async getTag(e){return this.http.getOrNull(`/tags/${encodeURIComponent(e)}`)}async getTagBySlug(e){return this.http.getOrNull(`/tags/by-slug/${encodeURIComponent(e)}`)}async getCategory(e){return this.http.getOrNull(`/categories/${encodeURIComponent(e)}`)}async getCategoryChildren(e){return this.http.get(`/categories/${encodeURIComponent(e)}/children`)}},M=class{constructor(e){let t=f(e);this.http=t,this.siteId=e.siteId,this.blogs=new g(t,e.siteId),this.pages=new E(t,e.siteId),this.navigation=new T(t,e.siteId),this.taxonomy=new j(t,e.siteId),this.analytics=new m(t,e.siteId),this.cv=new v(t,e.siteId),this.legal=new C(t,e.siteId),this.projects=new D(t,e.siteId),this.redirects=new O(t,e.siteId),this.site=new k(t,e.siteId),this.media=new w(t,e.siteId),this.social=new A(t,e.siteId),this.forms=new y(t)}collections(e){return new _(this.http,this.siteId,e)}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return o}});
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./client-D-4q1qfr.cjs`);function t(e){return{head:e.code_injection_head,footer:e.code_injection_footer}}exports.CollectionsResource=e.r,exports.ForjaAuthError=e.i,exports.ForjaClient=e.t,exports.ForjaError=e.a,exports.ForjaNetworkError=e.o,exports.ForjaNotFoundError=e.s,exports.ForjaPermissionError=e.c,exports.ForjaRateLimitError=e.l,exports.ForjaServerError=e.u,exports.ForjaValidationError=e.d,exports.renderCodeInjection=t,exports.validateSubmission=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client-BSWR_os4.cjs");function t(e){return{head:e.code_injection_head,footer:e.code_injection_footer}}exports.CollectionsResource=e.r,exports.ForjaAuthError=e.i,exports.ForjaClient=e.t,exports.ForjaError=e.a,exports.ForjaNetworkError=e.o,exports.ForjaNotFoundError=e.s,exports.ForjaPermissionError=e.c,exports.ForjaRateLimitError=e.l,exports.ForjaServerError=e.u,exports.ForjaValidationError=e.d,exports.renderCodeInjection=t,exports.validateSubmission=e.n;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as MediaResponse, A as CategoryTree, At as SocialLinkResponse, B as LegalDocType, C as AnalyticsReportParams, Ct as SearchablePaginationParams, D as BlogListItem, Dt as SiteResponse, E as BlogDocumentResponse, Et as SiteLocaleResponse, F as CvEntryResponse, Ft as TranslationStatus, G as LegalGroupResponse, H as LegalDocumentFullDetailResponse, I as CvEntryType, It as TrendDataPoint, J as LegalVersionResponse, K as LegalGroupWithItems, L as DocumentLocalizationResponse, M as CodeInjection, Mt as TopContentItem, N as ContentStatus, Nt as TrackPageviewRequest, O as BlogResponse, Ot as SkillCategory, P as CvEntryParams, Pt as TrackPageviewResponse, Q as MediaListParams, R as ForjaClientConfig, S as AnalyticsPageParams, St as ReferrerItem, T as BlogDetailResponse, Tt as SectionType, U as LegalDocumentResponse, V as LegalDocumentDetailResponse, W as LegalDocumentWithGroups, X as LocalizationResponse, Y as LocaleFilterParams, Z as MediaListItem, _ as PublicCollectionListParams, _t as ProjectLocalizationResponse, a as FormFieldValidation, at as PageDetailResponse, b as PaginatedResult, bt as RedirectLookupResponse, c as PublicFormDefinition, ct as PageSectionResponse, d as SubmitFormOptions, dt as PaginationMeta, et as MediaVariantResponse, f as ValidationErrorMap, ft as PaginationParams, g as PublicCollectionField, gt as ProjectListParams, h as PublicCollectionEntry, ht as ProjectLinkType, i as FormFieldType, it as NavigationTree, j as CategoryWithCountResponse, jt as TagResponse, k as CategoryResponse, kt as SkillResponse, l as SelfServiceLookup, lt as PageType, m as CollectionsResource, mt as ProjectLinkResponse, n as FormBotProtection, nt as NavigationItemResponse, o as FormSubmitData, ot as PageListItem, p as validateSubmission, pt as ProjectDetailResponse, q as LegalItemResponse, r as FormFieldDefinition, rt as NavigationMenuResponse, s as FormSubmitResponse, st as PageResponse, t as ForjaClient, tt as NavigationItemLocalizationResponse, u as SelfServiceSubmission, ut as Paginated, v as PublicCollectionSchema, vt as ProjectMediaResponse, w as AnalyticsReportResponse, wt as SectionLocalizationResponse, x as AnalyticsPageDetailResponse, xt as RedirectResponse, y as HttpClient, yt as ProjectResponse, z as LegalDocLocalizationResponse } from "./client-Bvy1FhEg.cjs";
1
+ import { $ as MediaResponse, A as CategoryTree, At as SocialLinkResponse, B as LegalDocType, C as AnalyticsReportParams, Ct as SearchablePaginationParams, D as BlogListItem, Dt as SiteResponse, E as BlogDocumentResponse, Et as SiteLocaleResponse, F as CvEntryResponse, Ft as TranslationStatus, G as LegalGroupResponse, H as LegalDocumentFullDetailResponse, I as CvEntryType, It as TrendDataPoint, J as LegalVersionResponse, K as LegalGroupWithItems, L as DocumentLocalizationResponse, M as CodeInjection, Mt as TopContentItem, N as ContentStatus, Nt as TrackPageviewRequest, O as BlogResponse, Ot as SkillCategory, P as CvEntryParams, Pt as TrackPageviewResponse, Q as MediaListParams, R as ForjaClientConfig, S as AnalyticsPageParams, St as ReferrerItem, T as BlogDetailResponse, Tt as SectionType, U as LegalDocumentResponse, V as LegalDocumentDetailResponse, W as LegalDocumentWithGroups, X as LocalizationResponse, Y as LocaleFilterParams, Z as MediaListItem, _ as PublicCollectionListParams, _t as ProjectLocalizationResponse, a as FormFieldValidation, at as PageDetailResponse, b as PaginatedResult, bt as RedirectLookupResponse, c as PublicFormDefinition, ct as PageSectionResponse, d as SubmitFormOptions, dt as PaginationMeta, et as MediaVariantResponse, f as ValidationErrorMap, ft as PaginationParams, g as PublicCollectionField, gt as ProjectListParams, h as PublicCollectionEntry, ht as ProjectLinkType, i as FormFieldType, it as NavigationTree, j as CategoryWithCountResponse, jt as TagResponse, k as CategoryResponse, kt as SkillResponse, l as SelfServiceLookup, lt as PageType, m as CollectionsResource, mt as ProjectLinkResponse, n as FormBotProtection, nt as NavigationItemResponse, o as FormSubmitData, ot as PageListItem, p as validateSubmission, pt as ProjectDetailResponse, q as LegalItemResponse, r as FormFieldDefinition, rt as NavigationMenuResponse, s as FormSubmitResponse, st as PageResponse, t as ForjaClient, tt as NavigationItemLocalizationResponse, u as SelfServiceSubmission, ut as Paginated, v as PublicCollectionSchema, vt as ProjectMediaResponse, w as AnalyticsReportResponse, wt as SectionLocalizationResponse, x as AnalyticsPageDetailResponse, xt as RedirectResponse, y as HttpClient, yt as ProjectResponse, z as LegalDocLocalizationResponse } from "./client-BoEyJL6_.cjs";
2
2
 
3
3
  //#region src/code-injection.d.ts
4
4
  /**
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as MediaResponse, A as CategoryTree, At as SocialLinkResponse, B as LegalDocType, C as AnalyticsReportParams, Ct as SearchablePaginationParams, D as BlogListItem, Dt as SiteResponse, E as BlogDocumentResponse, Et as SiteLocaleResponse, F as CvEntryResponse, Ft as TranslationStatus, G as LegalGroupResponse, H as LegalDocumentFullDetailResponse, I as CvEntryType, It as TrendDataPoint, J as LegalVersionResponse, K as LegalGroupWithItems, L as DocumentLocalizationResponse, M as CodeInjection, Mt as TopContentItem, N as ContentStatus, Nt as TrackPageviewRequest, O as BlogResponse, Ot as SkillCategory, P as CvEntryParams, Pt as TrackPageviewResponse, Q as MediaListParams, R as ForjaClientConfig, S as AnalyticsPageParams, St as ReferrerItem, T as BlogDetailResponse, Tt as SectionType, U as LegalDocumentResponse, V as LegalDocumentDetailResponse, W as LegalDocumentWithGroups, X as LocalizationResponse, Y as LocaleFilterParams, Z as MediaListItem, _ as PublicCollectionListParams, _t as ProjectLocalizationResponse, a as FormFieldValidation, at as PageDetailResponse, b as PaginatedResult, bt as RedirectLookupResponse, c as PublicFormDefinition, ct as PageSectionResponse, d as SubmitFormOptions, dt as PaginationMeta, et as MediaVariantResponse, f as ValidationErrorMap, ft as PaginationParams, g as PublicCollectionField, gt as ProjectListParams, h as PublicCollectionEntry, ht as ProjectLinkType, i as FormFieldType, it as NavigationTree, j as CategoryWithCountResponse, jt as TagResponse, k as CategoryResponse, kt as SkillResponse, l as SelfServiceLookup, lt as PageType, m as CollectionsResource, mt as ProjectLinkResponse, n as FormBotProtection, nt as NavigationItemResponse, o as FormSubmitData, ot as PageListItem, p as validateSubmission, pt as ProjectDetailResponse, q as LegalItemResponse, r as FormFieldDefinition, rt as NavigationMenuResponse, s as FormSubmitResponse, st as PageResponse, t as ForjaClient, tt as NavigationItemLocalizationResponse, u as SelfServiceSubmission, ut as Paginated, v as PublicCollectionSchema, vt as ProjectMediaResponse, w as AnalyticsReportResponse, wt as SectionLocalizationResponse, x as AnalyticsPageDetailResponse, xt as RedirectResponse, y as HttpClient, yt as ProjectResponse, z as LegalDocLocalizationResponse } from "./client-DAhZzkp0.mjs";
1
+ import { $ as MediaResponse, A as CategoryTree, At as SocialLinkResponse, B as LegalDocType, C as AnalyticsReportParams, Ct as SearchablePaginationParams, D as BlogListItem, Dt as SiteResponse, E as BlogDocumentResponse, Et as SiteLocaleResponse, F as CvEntryResponse, Ft as TranslationStatus, G as LegalGroupResponse, H as LegalDocumentFullDetailResponse, I as CvEntryType, It as TrendDataPoint, J as LegalVersionResponse, K as LegalGroupWithItems, L as DocumentLocalizationResponse, M as CodeInjection, Mt as TopContentItem, N as ContentStatus, Nt as TrackPageviewRequest, O as BlogResponse, Ot as SkillCategory, P as CvEntryParams, Pt as TrackPageviewResponse, Q as MediaListParams, R as ForjaClientConfig, S as AnalyticsPageParams, St as ReferrerItem, T as BlogDetailResponse, Tt as SectionType, U as LegalDocumentResponse, V as LegalDocumentDetailResponse, W as LegalDocumentWithGroups, X as LocalizationResponse, Y as LocaleFilterParams, Z as MediaListItem, _ as PublicCollectionListParams, _t as ProjectLocalizationResponse, a as FormFieldValidation, at as PageDetailResponse, b as PaginatedResult, bt as RedirectLookupResponse, c as PublicFormDefinition, ct as PageSectionResponse, d as SubmitFormOptions, dt as PaginationMeta, et as MediaVariantResponse, f as ValidationErrorMap, ft as PaginationParams, g as PublicCollectionField, gt as ProjectListParams, h as PublicCollectionEntry, ht as ProjectLinkType, i as FormFieldType, it as NavigationTree, j as CategoryWithCountResponse, jt as TagResponse, k as CategoryResponse, kt as SkillResponse, l as SelfServiceLookup, lt as PageType, m as CollectionsResource, mt as ProjectLinkResponse, n as FormBotProtection, nt as NavigationItemResponse, o as FormSubmitData, ot as PageListItem, p as validateSubmission, pt as ProjectDetailResponse, q as LegalItemResponse, r as FormFieldDefinition, rt as NavigationMenuResponse, s as FormSubmitResponse, st as PageResponse, t as ForjaClient, tt as NavigationItemLocalizationResponse, u as SelfServiceSubmission, ut as Paginated, v as PublicCollectionSchema, vt as ProjectMediaResponse, w as AnalyticsReportResponse, wt as SectionLocalizationResponse, x as AnalyticsPageDetailResponse, xt as RedirectResponse, y as HttpClient, yt as ProjectResponse, z as LegalDocLocalizationResponse } from "./client-BoEyJL6_.mjs";
2
2
 
3
3
  //#region src/code-injection.d.ts
4
4
  /**
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./client-BT9X5cfs.mjs";function d(e){return{head:e.code_injection_head,footer:e.code_injection_footer}}export{s as CollectionsResource,r as ForjaAuthError,l as ForjaClient,e as ForjaError,o as ForjaNetworkError,c as ForjaNotFoundError,t as ForjaPermissionError,i as ForjaRateLimitError,u as ForjaServerError,n as ForjaValidationError,d as renderCodeInjection,a as validateSubmission};
1
+ import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./client-D9WF4wKY.mjs";function d(e){return{head:e.code_injection_head,footer:e.code_injection_footer}}export{s as CollectionsResource,r as ForjaAuthError,l as ForjaClient,e as ForjaError,o as ForjaNetworkError,c as ForjaNotFoundError,t as ForjaPermissionError,i as ForjaRateLimitError,u as ForjaServerError,n as ForjaValidationError,d as renderCodeInjection,a as validateSubmission};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forjacms/client",
3
- "version": "1.8.3",
3
+ "version": "2.0.1",
4
4
  "description": "Typed TypeScript SDK for the Forja CMS content API",
5
5
  "author": "Dominik Dorfstetter <dominik@dorfstetter.at>",
6
6
  "main": "dist/index.cjs",
@@ -63,15 +63,15 @@
63
63
  }
64
64
  },
65
65
  "devDependencies": {
66
- "@angular/core": "^21.2.9",
67
- "@vitest/coverage-v8": "^4.0.18",
66
+ "@angular/core": "^22.0.1",
67
+ "@vitest/coverage-v8": "^4.1.8",
68
68
  "rxjs": "^7.8.2",
69
- "tsdown": "^0.22.0",
70
- "typescript": "^6.0.2",
71
- "vitest": "^4.0.18",
72
- "zone.js": "^0.16.1"
69
+ "tsdown": "^0.22.2",
70
+ "typescript": "^6.0.3",
71
+ "vitest": "^4.1.8",
72
+ "zone.js": "^0.16.2"
73
73
  },
74
74
  "overrides": {
75
- "typescript": "^6.0.2"
75
+ "typescript": "^6.0.3"
76
76
  }
77
77
  }