@dvina/sdk 4.1.76 → 4.1.89
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/adapters/angular/index.js +1 -1
- package/dist/billing/index.d.ts +29 -0
- package/dist/billing/index.js +1 -1
- package/dist/chunk-DNCW73ED.js +5 -0
- package/dist/{chunk-SJ6Q5IDB.js → chunk-YUQTEBYO.js} +7 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2RXHPDJI.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Fg}from'../../chunk-
|
|
1
|
+
import {Fg}from'../../chunk-DNCW73ED.js';import'../../chunk-H3TI6B7T.js';import'../../chunk-IIQ3WGOJ.js';import'../../chunk-YUQTEBYO.js';import'../../chunk-5E7LX4YQ.js';import'../../chunk-2EXM4BMP.js';import'../../chunk-EK7ODJWE.js';import {inject,DestroyRef,signal,effect,computed,makeEnvironmentProviders,untracked}from'@angular/core';function L(e,i){let l=i?.destroyRef??inject(DestroyRef),t=signal(e.current),r=true;return (async()=>{try{for await(let o of e){if(!r)break;t.set(o);}}catch{}})(),l.onDestroy(()=>{r=false,e.dispose();}),t.asReadonly()}function j(e){let i=inject(DestroyRef),l="params"in e&&e.params!==void 0,t=signal(void 0),r=signal("idle"),o=signal(void 0),a=null,u=false,m=null,c=()=>{a?.abort(),a=null,u=false,m?.dispose(),m=null;},f=s=>{c(),o.set(void 0);let D=untracked(()=>t()!==void 0);r.set(D?"reloading":"loading"),a=new AbortController;let x=l?{params:s,abortSignal:a.signal}:{abortSignal:a.signal},d=e.loader(x);if(A(d)){h(d)&&(m=d),u=true;let p=a;(async()=>{try{for await(let n of d){if(!u)break;t.set(n),r.set("resolved"),o.set(void 0);}}catch(n){if(!u||p.signal.aborted)return;let y=n instanceof Error?n:new Error(String(n));o.set(y),r.set("error");}})();}else {let p=a;d.then(n=>{p.signal.aborted||(t.set(n),r.set("resolved"));},n=>{if(p.signal.aborted||n instanceof DOMException&&n.name==="AbortError")return;let y=n instanceof Error?n:new Error(String(n));o.set(y),r.set("error");});}};l?effect(()=>{let s=e.params();s!==void 0?f(s):(c(),t.set(void 0),r.set("idle"),o.set(void 0));}):f(),i.onDestroy(()=>{c();});let b=r.asReadonly(),S=computed(()=>{let s=r();return s==="loading"||s==="reloading"});return {value:t.asReadonly(),status:b,isLoading:S,error:o.asReadonly(),hasValue:()=>t()!==void 0,reload(){if(l){let s=e.params();s!==void 0&&f(s);}else f();},destroy(){c(),t.set(void 0),r.set("idle"),o.set(void 0);}}}function A(e){return e!=null&&typeof e=="object"&&Symbol.asyncIterator in e}function h(e){return e!=null&&typeof e=="object"&&"dispose"in e&&typeof e.dispose=="function"}function O(e){return makeEnvironmentProviders([{provide:Fg,useFactory:()=>{let i=typeof e=="function"?e():e;return new Fg(i)}}])}export{j as dvnResource,O as provideDvina,L as toSignal};
|
package/dist/billing/index.d.ts
CHANGED
|
@@ -50,10 +50,18 @@ type Plan = {
|
|
|
50
50
|
};
|
|
51
51
|
type Price = {
|
|
52
52
|
amount?: Maybe<Scalars['Float']>;
|
|
53
|
+
campaign?: Maybe<PriceCampaign>;
|
|
53
54
|
currency: Scalars['String'];
|
|
54
55
|
id: Scalars['String'];
|
|
55
56
|
interval?: Maybe<SubscriptionCycle>;
|
|
56
57
|
};
|
|
58
|
+
type PriceCampaign = {
|
|
59
|
+
discountedAmount: Scalars['Float'];
|
|
60
|
+
expiresAt?: Maybe<Scalars['DateTime']>;
|
|
61
|
+
name: Scalars['String'];
|
|
62
|
+
originalAmount: Scalars['Float'];
|
|
63
|
+
percentOff?: Maybe<Scalars['Float']>;
|
|
64
|
+
};
|
|
57
65
|
type ScheduledChange = {
|
|
58
66
|
effectiveDate?: Maybe<Scalars['DateTime']>;
|
|
59
67
|
newCycle?: Maybe<SubscriptionCycle>;
|
|
@@ -93,6 +101,13 @@ type PlanFragmentFragment = {
|
|
|
93
101
|
currency: string;
|
|
94
102
|
amount?: number | null;
|
|
95
103
|
interval?: SubscriptionCycle | null;
|
|
104
|
+
campaign?: {
|
|
105
|
+
name: string;
|
|
106
|
+
originalAmount: number;
|
|
107
|
+
discountedAmount: number;
|
|
108
|
+
percentOff?: number | null;
|
|
109
|
+
expiresAt?: any | null;
|
|
110
|
+
} | null;
|
|
96
111
|
}>;
|
|
97
112
|
entitlements: {
|
|
98
113
|
canAddUser: boolean;
|
|
@@ -186,6 +201,13 @@ declare class BillingClient {
|
|
|
186
201
|
currency: string;
|
|
187
202
|
amount?: number | null;
|
|
188
203
|
interval?: SubscriptionCycle | null;
|
|
204
|
+
campaign?: {
|
|
205
|
+
name: string;
|
|
206
|
+
originalAmount: number;
|
|
207
|
+
discountedAmount: number;
|
|
208
|
+
percentOff?: number | null;
|
|
209
|
+
expiresAt?: any | null;
|
|
210
|
+
} | null;
|
|
189
211
|
}>;
|
|
190
212
|
entitlements: {
|
|
191
213
|
canAddUser: boolean;
|
|
@@ -213,6 +235,13 @@ declare class BillingClient {
|
|
|
213
235
|
currency: string;
|
|
214
236
|
amount?: number | null;
|
|
215
237
|
interval?: SubscriptionCycle | null;
|
|
238
|
+
campaign?: {
|
|
239
|
+
name: string;
|
|
240
|
+
originalAmount: number;
|
|
241
|
+
discountedAmount: number;
|
|
242
|
+
percentOff?: number | null;
|
|
243
|
+
expiresAt?: any | null;
|
|
244
|
+
} | null;
|
|
216
245
|
}>;
|
|
217
246
|
entitlements: {
|
|
218
247
|
canAddUser: boolean;
|
package/dist/billing/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{h as BillingClient,e as EntitlementTier,f as SubscriptionCycle,g as SubscriptionProvider}from'../chunk-
|
|
1
|
+
export{h as BillingClient,e as EntitlementTier,f as SubscriptionCycle,g as SubscriptionProvider}from'../chunk-YUQTEBYO.js';import'../chunk-5E7LX4YQ.js';import'../chunk-EK7ODJWE.js';
|