@api7/portal-sdk 0.0.1 → 0.0.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.
@@ -0,0 +1,7 @@
1
+ "use strict";const Y=require("axios"),Z=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:n,sseDefaultRetryDelay:l,sseMaxRetryAttempts:c,sseMaxRetryDelay:i,sseSleepFn:o,url:d,...a})=>{let h;const b=o??(m=>new Promise(y=>setTimeout(y,m)));return{stream:async function*(){let m=l??3e3,y=0;const S=a.signal??new AbortController().signal;for(;!S.aborted;){y++;const z=a.headers instanceof Headers?a.headers:new Headers(a.headers);h!==void 0&&z.set("Last-Event-ID",h);try{const j={redirect:"follow",...a,body:a.serializedBody,headers:z,signal:S};let P=new Request(d,j);e&&(P=await e(d,j));const A=await(a.fetch??globalThis.fetch)(P);if(!A.ok)throw new Error(`SSE failed: ${A.status} ${A.statusText}`);if(!A.body)throw new Error("No body in SSE response");const I=A.body.pipeThrough(new TextDecoderStream).getReader();let v="";const k=()=>{try{I.cancel()}catch{}};S.addEventListener("abort",k);try{for(;;){const{done:G,value:K}=await I.read();if(G)break;v+=K,v=v.replace(/\r\n/g,`
2
+ `).replace(/\r/g,`
3
+ `);const O=v.split(`
4
+
5
+ `);v=O.pop()??"";for(const Q of O){const X=Q.split(`
6
+ `),R=[];let q;for(const f of X)if(f.startsWith("data:"))R.push(f.replace(/^data:\s*/,""));else if(f.startsWith("event:"))q=f.replace(/^event:\s*/,"");else if(f.startsWith("id:"))h=f.replace(/^id:\s*/,"");else if(f.startsWith("retry:")){const B=Number.parseInt(f.replace(/^retry:\s*/,""),10);Number.isNaN(B)||(m=B)}let T,U=!1;if(R.length){const f=R.join(`
7
+ `);try{T=JSON.parse(f),U=!0}catch{T=f}}U&&(n&&await n(T),s&&(T=await s(T))),r?.({data:T,event:q,id:h,retry:m}),R.length&&(yield T)}}}finally{S.removeEventListener("abort",k),I.releaseLock()}break}catch(j){if(t?.(j),c!==void 0&&y>=c)break;const P=Math.min(m*2**(y-1),i??3e4);await b(P)}}}()}},ee=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},te=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},re=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},W=({allowReserved:e,explode:t,name:r,style:s,value:n})=>{if(!t){const i=(e?n:n.map(o=>encodeURIComponent(o))).join(te(s));switch(s){case"label":return`.${i}`;case"matrix":return`;${r}=${i}`;case"simple":return i;default:return`${r}=${i}`}}const l=ee(s),c=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):D({allowReserved:e,name:r,value:i})).join(l);return s==="label"||s==="matrix"?l+c:c},D=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},H=({allowReserved:e,explode:t,name:r,style:s,value:n,valueOnly:l})=>{if(n instanceof Date)return l?n.toISOString():`${r}=${n.toISOString()}`;if(s!=="deepObject"&&!t){let o=[];Object.entries(n).forEach(([a,h])=>{o=[...o,a,e?h:encodeURIComponent(h)]});const d=o.join(",");switch(s){case"form":return`${r}=${d}`;case"label":return`.${d}`;case"matrix":return`;${r}=${d}`;default:return d}}const c=re(s),i=Object.entries(n).map(([o,d])=>D({allowReserved:e,name:s==="deepObject"?`${r}[${o}]`:o,value:d})).join(c);return s==="label"||s==="matrix"?c+i:i},se=/\{[^{}]+\}/g,ne=({path:e,url:t})=>{let r=t;const s=t.match(se);if(s)for(const n of s){let l=!1,c=n.substring(1,n.length-1),i="simple";c.endsWith("*")&&(l=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),i="label"):c.startsWith(";")&&(c=c.substring(1),i="matrix");const o=e[c];if(o==null)continue;if(Array.isArray(o)){r=r.replace(n,W({explode:l,name:c,style:i,value:o}));continue}if(typeof o=="object"){r=r.replace(n,H({explode:l,name:c,style:i,value:o,valueOnly:!0}));continue}if(i==="matrix"){r=r.replace(n,`;${D({name:c,value:o})}`);continue}const d=encodeURIComponent(i==="label"?`.${o}`:o);r=r.replace(n,d)}return r},ie=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{const l=n.startsWith("/")?n:`/${n}`;let c=(e??"")+l;t&&(c=ne({path:t,url:c}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(c+=`?${i}`),c};function ae(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const ce=async(e,t)=>{const r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r},oe=({parameters:e={},...t}={})=>s=>{const n=[];if(s&&typeof s=="object")for(const l in s){const c=s[l];if(c==null)continue;const i=e[l]||t;if(Array.isArray(c)){const o=W({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:c,...i.array});o&&n.push(o)}else if(typeof c=="object"){const o=H({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:c,...i.object});o&&n.push(o)}else{const o=D({allowReserved:i.allowReserved,name:l,value:c});o&&n.push(o)}}return n.join("&")},le=(e,t)=>t?t in e.headers||e.query?.[t]?!0:"Cookie"in e.headers&&e.headers.Cookie&&typeof e.headers.Cookie=="string"?e.headers.Cookie.includes(`${t}=`):!1:!1,pe=async({security:e,...t})=>{for(const r of e){if(le(t,r.name))continue;const s=await ce(r,t.auth);if(!s)continue;const n=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[n]=s;break;case"cookie":{const l=`${n}=${s}`;"Cookie"in t.headers&&t.headers.Cookie?t.headers.Cookie=`${t.headers.Cookie}; ${l}`:t.headers.Cookie=l;break}case"header":default:t.headers[n]=s;break}}},N=e=>{const t=e.axios?.defaults?.baseURL,r=e.baseURL&&typeof e.baseURL=="string"?e.baseURL:t;return ie({baseUrl:r,path:e.path,query:e.paramsSerializer?void 0:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:oe(e.querySerializer),url:e.url})},L=(e,t)=>{const r={...e,...t};return r.headers=x(e.headers,t.headers),r},ue=["common","delete","get","head","patch","post","put"],x=(...e)=>{const t={};for(const r of e){if(!r||typeof r!="object")continue;const s=Object.entries(r);for(const[n,l]of s)if(ue.includes(n)&&typeof l=="object")t[n]={...t[n],...l};else if(l===null)delete t[n];else if(Array.isArray(l))for(const c of l)t[n]=[...t[n]??[],c];else l!==void 0&&(t[n]=typeof l=="object"?JSON.stringify(l):l)}return t},V=(e={})=>({...e}),M=(e={})=>{let t=L(V(),e),r;if(t.axios&&!("Axios"in t.axios))r=t.axios;else{const{auth:d,...a}=t;r=Y.create(a)}const s=()=>({...t}),n=d=>(t=L(t,d),r.defaults={...r.defaults,...t,headers:x(r.defaults.headers,t.headers)},s()),l=async d=>{const a={...t,...d,axios:d.axios??t.axios??r,headers:x(t.headers,d.headers)};a.security&&await pe({...a,security:a.security}),a.requestValidator&&await a.requestValidator(a),a.body!==void 0&&a.bodySerializer&&(a.body=a.bodySerializer(a.body));const h=N(a);return{opts:a,url:h}},c=async d=>{const{opts:a,url:h}=await l(d);try{const b=a.axios,{auth:w,...$}=a,m=await b({...$,baseURL:"",data:ae(a),headers:a.headers,params:a.paramsSerializer?a.query:void 0,url:h});let{data:y}=m;return a.responseType==="json"&&(a.responseValidator&&await a.responseValidator(y),a.responseTransformer&&(y=await a.responseTransformer(y))),{...m,data:y??{}}}catch(b){const w=b;if(a.throwOnError)throw w;return w.error=w.response?.data??{},w}},i=d=>a=>c({...a,method:d}),o=d=>async a=>{const{opts:h,url:b}=await l(a);return Z({...h,body:h.body,headers:h.headers,method:d,signal:h.signal,url:b})};return{buildUrl:N,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:s,head:i("HEAD"),instance:r,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:c,setConfig:n,sse:{connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),head:o("HEAD"),options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),trace:o("TRACE")},trace:i("TRACE")}},u=M(V()),g=e=>(e=new Date(e),e),F=e=>(e.last_active_at&&(e.last_active_at=g(e.last_active_at)),e.created_at=g(e.created_at),e.updated_at=g(e.updated_at),e),de=async e=>(e.list=e.list.map(t=>F(t)),e),he=async e=>(e=F(e),e),fe=e=>(e.subscribed_at=g(e.subscribed_at),e),ye=async e=>(e.list=e.list.map(t=>fe(t)),e),J=e=>(e.created_at=g(e.created_at),e.updated_at=g(e.updated_at),e),E=e=>(e=J(e),e),me=e=>(e=E(e),e),be=async e=>(e.list=e.list.map(t=>me(t)),e),Te=async e=>(e=E(e),e),ge=async e=>(e=E(e),e),we=async e=>(e=E(e),e),_=e=>(e=J(e),e),_e=async e=>(e.list=e.list.map(t=>_(t)),e),Ae=async e=>(e=_(e),e),ve=async e=>(e=_(e),e),Ce=async e=>(e=_(e),e),Se=async e=>(e=_(e),e),je=e=>(e.hour_timestamp=g(e.hour_timestamp),e),Pe=async e=>(e.list=e.list.map(t=>je(t)),e),Re=async e=>(e.list=e.list.map(t=>_(t)),e),De=e=>(e?.client??u).get({responseTransformer:de,responseType:"json",url:"/api/developers",...e}),Ee=e=>(e?.client??u).post({responseTransformer:he,responseType:"json",url:"/api/developers",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ie=e=>(e.client??u).delete({url:"/api/developers/{developer_id}",...e}),xe=e=>(e?.client??u).get({responseType:"json",url:"/api/api_products",...e}),$e=e=>(e.client??u).get({responseType:"json",url:"/api/api_products/{api_product_id}",...e}),ze=e=>(e.client??u).post({url:"/api/api_products/{api_product_id}/subscriptions",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e?.client??u).get({responseTransformer:ye,responseType:"json",url:"/api/subscriptions",...e}),Oe=e=>(e?.client??u).post({url:"/api/subscriptions",...e,headers:{"Content-Type":"application/json",...e?.headers}}),qe=e=>(e.client??u).delete({url:"/api/subscriptions/{subscription_id}",...e}),Ue=e=>(e?.client??u).get({responseTransformer:be,responseType:"json",url:"/api/applications",...e}),Be=e=>(e?.client??u).post({responseTransformer:Te,responseType:"json",url:"/api/applications",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ne=e=>(e.client??u).delete({url:"/api/applications/{application_id}",...e}),Le=e=>(e.client??u).get({responseTransformer:ge,responseType:"json",url:"/api/applications/{application_id}",...e}),We=e=>(e.client??u).put({responseTransformer:we,responseType:"json",url:"/api/applications/{application_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??u).get({responseTransformer:_e,responseType:"json",url:"/api/applications/{application_id}/credentials",...e}),Ve=e=>(e.client??u).post({responseTransformer:Ae,responseType:"json",url:"/api/applications/{application_id}/credentials",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??u).delete({url:"/api/applications/{application_id}/credentials/{credential_id}",...e}),Fe=e=>(e.client??u).get({responseTransformer:ve,responseType:"json",url:"/api/applications/{application_id}/credentials/{credential_id}",...e}),Je=e=>(e.client??u).put({responseTransformer:Ce,responseType:"json",url:"/api/applications/{application_id}/credentials/{credential_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??u).put({responseTransformer:Se,responseType:"json",url:"/api/applications/{application_id}/credentials/{credential_id}/regenerate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??u).get({responseTransformer:Pe,responseType:"json",url:"/api/applications/api_calls",...e}),Qe=e=>(e?.client??u).get({responseTransformer:Re,responseType:"json",url:"/api/credentials",...e}),Xe=e=>(e.client??u).get({responseType:"json",url:"/api/labels/{resource_type}",...e}),Ye=e=>(e?.client??u).get({responseType:"json",url:"/api/system_settings/public_access",...e}),Ze=e=>(e?.client??u).get({responseType:"json",url:"/api/dcr_providers",...e});class C extends Error{constructor(t,r,s,n,l){super(t),this.message=t,this.status=r,this.method=s,this.url=n,this.stack=void 0,this.#e=l}#e;static fromAxiosError=t=>{const r=t.error&&t.error.error_msg;return new C(`Request failed: ${r||(t.status?`with status code ${t.status}`:t.message)}`,t.status??0,t.config?.method?.toUpperCase()??"",t.config?.url??"",t)};static isAPIError=t=>t instanceof C;rawError(){return this.#e}}const p=e=>{if(e.error||e.status&&e.status>=400)throw C.fromAxiosError(e);return e.data};class et{constructor(t){this.client=t}async create(t,r){return p(await Ve({client:this.client,path:{application_id:t},body:r}))}async list(t,r){return p(await He({client:this.client,path:{application_id:t},query:r}))}async get(t,r){return p(await Fe({client:this.client,path:{application_id:t,credential_id:r}}))}async update(t,r,s){return p(await Je({client:this.client,path:{application_id:t,credential_id:r},body:s}))}async delete(t,r){return p(await Me({client:this.client,path:{application_id:t,credential_id:r}}))}async regenerate(t,r,s){return p(await Ge({client:this.client,path:{application_id:t,credential_id:r},body:s}))}}class tt{constructor(t){this.client=t}async list(t){return p(await Qe({client:this.client,query:t}))}}class rt{constructor(t){this.client=t,this.credential=new et(this.client)}credential;async create(t){return p(await Be({client:this.client,body:t}))}async list(t){return p(await Ue({client:this.client,query:t}))}async get(t){return p(await Le({client:this.client,path:{application_id:t}}))}async update(t,r){return p(await We({client:this.client,path:{application_id:t},body:r}))}async delete(t){p(await Ne({client:this.client,path:{application_id:t}}))}async apiCall(t){return p(await Ke({client:this.client,query:t}))}}class st{constructor(t){this.client=t}async list(t){return p(await Ze({client:this.client,query:t}))}}class nt{constructor(t){this.client=t}async getPublicAccess(){return p(await Ye({client:this.client})).portal_public_access}}class it{constructor(t){this.client=t}async listLabels(t){return p(await Xe({client:this.client,path:{resource_type:t}}))}}class at{constructor(t){this.client=t}async create(t){return p(await Ee({client:this.client,body:t}))}async list(t){return p(await De({client:this.client,query:t}))}async delete(t){p(await Ie({client:this.client,path:{developer_id:t}}))}}class ct{constructor(t){this.client=t}async list(t){return p(await xe({client:this.client,query:t}))}async get(t){return p(await $e({client:this.client,path:{api_product_id:t}}))}async subscribe(t,r){p(await ze({client:this.client,path:{api_product_id:t},body:r}))}}class ot{constructor(t){this.client=t}async list(t){return p(await ke({client:this.client,query:t}))}async bulkSubscribe(t){p(await Oe({client:this.client,body:t}))}async unsubscribe(t){p(await qe({client:this.client,path:{subscription_id:t}}))}}exports.APIError=C;exports.APIProductAPI=ct;exports.ApplicationAPI=rt;exports.CredentialAPI=tt;exports.DCRProviderAPI=st;exports.DeveloperAPI=at;exports.MiscellaneousAPI=it;exports.SubscriptionAPI=ot;exports.SystemSettingAPI=nt;exports.createClient=M;
@@ -1,5 +1,5 @@
1
- import { CreateSubscriptionReq, ListSubscriptionsData, ListSubscriptionsResponses } from './generated/index.js';
2
1
  import { Client } from './generated/client/types.gen.js';
2
+ import { CreateSubscriptionReq, ListSubscriptionsData, ListSubscriptionsResponses } from './generated/index.js';
3
3
  export declare class SubscriptionAPI {
4
4
  private readonly client;
5
5
  constructor(client: Client);
@@ -12,6 +12,7 @@ export declare class SubscriptionAPI {
12
12
  list(query?: ListSubscriptionsData['query']): Promise<ListSubscriptionsResponses['200']>;
13
13
  /**
14
14
  * Bulk subscribe to products
15
+ * @param data The subscription data.
15
16
  * @returns The created subscription.
16
17
  * @throws {APIError} If the API request fails or network error occurs.
17
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAGrB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;OAKG;IACU,IAAI,CACf,KAAK,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,GACrC,OAAO,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAM7C;;;;OAIG;IACU,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAItE;;;;;OAKG;IACU,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQpD"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAIhC,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;OAKG;IACU,IAAI,CACf,KAAK,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,GACrC,OAAO,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAM7C;;;;;OAKG;IACU,aAAa,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtE;;;;;OAKG;IACU,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQpD"}
@@ -0,0 +1,2 @@
1
+ export { type ApiProduct, type CreateApiProductSubscriptionReq, type ListApiProductsData, type ListApiProductsResponses, type CreateDeveloperApplicationReq, type DeveloperApplication, type GetApiCallsData, type GetApiCallsResponses, type ListDeveloperApplicationsData, type ListDeveloperApplicationsResponses, type ApplicationCredential, type CreateApplicationCredentialReq, type ListCredentialsData, type ListCredentialsResponses, type ListDeveloperCredentialsData, type ListDeveloperCredentialsResponses, type RegenerateApplicationCredentialReq, type UpdateApplicationCredentialReq, type CreateDeveloperReq, type Developer, type ListDevelopersData, type ListDevelopersResponses, type AllLabels, type DeveloperPortalLabelResourceType, type ListDcrProvidersData, type ListDcrProvidersResponses, type CreateSubscriptionReq, type ListSubscriptionsData, type ListSubscriptionsResponses, } from '../generated/index.js';
2
+ //# sourceMappingURL=typing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../src/unstable/typing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,+BAA+B,EACpC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,4 @@
1
1
  import { AxiosError, AxiosResponse } from 'axios';
2
- export declare const attachDeveloperIdHeader: (id: string, headers?: Record<string, string>) => {
3
- 'X-Portal-Developer-ID': string;
4
- };
5
2
  type ResponseNormal<TData> = AxiosResponse<TData> & {
6
3
  error: undefined;
7
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,uBAAuB,GAClC,IAAI,MAAM,EACV,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;CAIhC,CAAC;AAEH,KAAK,cAAc,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AACzE,KAAK,gBAAgB,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG;IACnD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACF,KAAK,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEhF,qBAAa,QAAS,SAAQ,KAAK;;IAIf,OAAO,EAAE,MAAM;IACxB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;gBAHF,OAAO,EAAE,MAAM,EACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EAClB,GAAG,EAAE,UAAU;IAOjB,MAAM,CAAC,cAAc,GAAI,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAC,cAiB9D;IAEF;;;;OAIG;IACH,MAAM,CAAC,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAAQ,CAC3B;IAE5B;;;OAGG;IACI,QAAQ,IAAI,UAAU;CAG9B;AAED,eAAO,MAAM,iBAAiB,GAAI,KAAK,EAAE,MAAM,EAC7C,MAAM,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAIT,KACrB,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,KAAK,cAAc,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AACzE,KAAK,gBAAgB,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG;IACnD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACF,KAAK,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEhF,qBAAa,QAAS,SAAQ,KAAK;;IAIf,OAAO,EAAE,MAAM;IACxB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,MAAM;gBAHF,OAAO,EAAE,MAAM,EACxB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EAClB,GAAG,EAAE,UAAU;IAOjB,MAAM,CAAC,cAAc,GAAI,MAAM,EAAE,OAAO,gBAAgB,CAAC,MAAM,CAAC,cAiB9D;IAEF;;;;OAIG;IACH,MAAM,CAAC,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAAQ,CAC3B;IAE5B;;;OAGG;IACI,QAAQ,IAAI,UAAU;CAG9B;AAED,eAAO,MAAM,iBAAiB,GAAI,KAAK,EAAE,MAAM,EAC7C,MAAM,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAIT,KACrB,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@api7/portal-sdk",
3
- "version": "0.0.1",
3
+ "description": "API7 Portal JavaScript SDK",
4
+ "version": "0.0.3",
4
5
  "license": "Apache-2.0",
5
6
  "repository": {
6
- "url": "https://github.com/api7/portal-sdk-typescript"
7
+ "url": "https://github.com/api7/portal-sdk-typescript",
8
+ "directory": "packages/portal-sdk"
7
9
  },
8
10
  "type": "module",
9
11
  "main": "./dist/index.js",
@@ -16,6 +18,15 @@
16
18
  "import": "./dist/index.js",
17
19
  "require": "./dist/index.cjs",
18
20
  "default": "./dist/index.js"
21
+ },
22
+ "./browser": {
23
+ "types": "./dist/browser.d.ts",
24
+ "import": "./dist/browser.js",
25
+ "require": "./dist/browser.cjs",
26
+ "default": "./dist/browser.js"
27
+ },
28
+ "./unstable-types": {
29
+ "types": "./dist/unstable/typing.d.ts"
19
30
  }
20
31
  },
21
32
  "files": [