@brandwave/ts 0.1.3 → 0.3.2
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/index.d.ts +49 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { ConnectSocialAccountParams, CreateCreatorParams, CreatorParams, Creator
|
|
|
27
27
|
import * as _brandwave_database_queries_campaigns_schemas from '@brandwave/database/queries/campaigns/schemas';
|
|
28
28
|
export { CampaignParams, CampaignStatsParams, CampaignStatusFilter, CreateCampaignParams, DeleteCampaignParams, LinkActivityParams, ListCampaignsParams, UnlinkActivityByIdsParams, UnlinkActivityParams, UpdateCampaignParams, campaignParamsSchema, campaignStatsParamsSchema, campaignStatusSchema, createCampaignSchema, deleteCampaignSchema, linkActivitySchema, listCampaignsParamsSchema, unlinkActivityByIdsSchema, unlinkActivitySchema, updateCampaignSchema } from '@brandwave/database/queries/campaigns/schemas';
|
|
29
29
|
import * as _brandwave_database_queries_billing_schemas from '@brandwave/database/queries/billing/schemas';
|
|
30
|
-
export { BillingCheckoutSessionResult, BillingCheckoutSessionSyncResult, BillingPlanKey, BillingPortalSessionResult, CreateBillingCheckoutSessionParams, CreateBillingPortalSessionParams, SubscriptionStatus, SyncBillingCheckoutSessionParams, billingCheckoutSessionResultSchema, billingCheckoutSessionSyncResultSchema, billingPlanKeys, billingPlanSchema, billingPortalSessionResultSchema, createBillingCheckoutSessionSchema, createBillingPortalSessionSchema, subscriptionStatusSchema, subscriptionStatusValues, syncBillingCheckoutSessionSchema } from '@brandwave/database/queries/billing/schemas';
|
|
30
|
+
export { BillingCheckoutSessionResult, BillingCheckoutSessionSyncResult, BillingPlanKey, BillingPortalSessionResult, CreateBillingCheckoutSessionParams, CreateBillingPortalSessionParams, GetPlanUsageParams, PlanUsageResult, SubscriptionStatus, SyncBillingCheckoutSessionParams, billingCheckoutSessionResultSchema, billingCheckoutSessionSyncResultSchema, billingPlanKeys, billingPlanSchema, billingPortalSessionResultSchema, createBillingCheckoutSessionSchema, createBillingPortalSessionSchema, subscriptionStatusSchema, subscriptionStatusValues, syncBillingCheckoutSessionSchema } from '@brandwave/database/queries/billing/schemas';
|
|
31
31
|
import * as _brandwave_database_queries_activity_log_types from '@brandwave/database/queries/activity-log/types';
|
|
32
32
|
export { ActivityLogEntry, ActivityLogEntryInList, ActivityLogResolvedRefs, ActivityLogSearchResult, ResolvedActivityLogRef, ResolvedActor } from '@brandwave/database/queries/activity-log/types';
|
|
33
33
|
import * as _brandwave_database_queries_activity_log_schemas from '@brandwave/database/queries/activity-log/schemas';
|
|
@@ -56,6 +56,7 @@ export { CompleteOrganicSignupResult, OrganizationCreateResult, OrganizationInLi
|
|
|
56
56
|
export { Conversion, ConversionCreateResult, ConversionInList, ConversionUpdateResult } from '@brandwave/database/queries/conversions/types';
|
|
57
57
|
export { ConversionSource, ConversionSourceCreateResult, ConversionSourceInList, ConversionSourceUpdateResult } from '@brandwave/database/queries/conversion-sources/types';
|
|
58
58
|
export { CostInList } from '@brandwave/database/queries/costs/types';
|
|
59
|
+
export { LimitedResource, buildPlanLimitExceededMessage, getEnforcedLimit, limitedResources } from '@brandwave/database/queries/billing/plan-limits';
|
|
59
60
|
export { billingPlanCatalog, billingPlans, stripePriceEnvKeys, stripeProductEnvKeys } from '@brandwave/database/queries/billing/catalog';
|
|
60
61
|
export { isValidContentUrl } from '@brandwave/database/social-media/content-url';
|
|
61
62
|
export { isValidSocialInput } from '@brandwave/database/social-media/extract';
|
|
@@ -1253,6 +1254,30 @@ declare const createActivityLogResource: (http: HttpClient) => ((params: _brandw
|
|
|
1253
1254
|
};
|
|
1254
1255
|
|
|
1255
1256
|
declare const createBillingResource: (http: HttpClient) => {
|
|
1257
|
+
/** Retrieve current plan usage and enforced limits for an organization. */
|
|
1258
|
+
planUsage: (params: _brandwave_database_queries_billing_schemas.GetPlanUsageParams) => Promise<_brandwave_database_queries__shared_types.ItemResult<{
|
|
1259
|
+
organizationId: string;
|
|
1260
|
+
planKey: "starter" | "growth" | "scale" | null;
|
|
1261
|
+
enforced: boolean;
|
|
1262
|
+
resources: {
|
|
1263
|
+
creators: {
|
|
1264
|
+
used: number;
|
|
1265
|
+
limit: number;
|
|
1266
|
+
};
|
|
1267
|
+
linkedSocialAccounts: {
|
|
1268
|
+
used: number;
|
|
1269
|
+
limit: number;
|
|
1270
|
+
};
|
|
1271
|
+
activities: {
|
|
1272
|
+
used: number;
|
|
1273
|
+
limit: number;
|
|
1274
|
+
};
|
|
1275
|
+
campaigns: {
|
|
1276
|
+
used: number;
|
|
1277
|
+
limit: number;
|
|
1278
|
+
};
|
|
1279
|
+
};
|
|
1280
|
+
}>>;
|
|
1256
1281
|
/** Create a Stripe Checkout session for a selected Brandwave paid plan. */
|
|
1257
1282
|
createCheckoutSession: (params: _brandwave_database_queries_billing_schemas.CreateBillingCheckoutSessionParams) => Promise<_brandwave_database_queries__shared_types.ItemResult<{
|
|
1258
1283
|
checkoutSessionId: string;
|
|
@@ -3849,6 +3874,29 @@ declare const createBrandwave: (options: BrandwaveOptions) => {
|
|
|
3849
3874
|
* Start paid-plan checkout flows backed by Stripe-hosted Billing.
|
|
3850
3875
|
*/
|
|
3851
3876
|
billing: {
|
|
3877
|
+
planUsage: (params: _brandwave_database_queries_billing_schemas.GetPlanUsageParams) => Promise<_brandwave_database_queries__shared_types.ItemResult<{
|
|
3878
|
+
organizationId: string;
|
|
3879
|
+
planKey: "starter" | "growth" | "scale" | null;
|
|
3880
|
+
enforced: boolean;
|
|
3881
|
+
resources: {
|
|
3882
|
+
creators: {
|
|
3883
|
+
used: number;
|
|
3884
|
+
limit: number;
|
|
3885
|
+
};
|
|
3886
|
+
linkedSocialAccounts: {
|
|
3887
|
+
used: number;
|
|
3888
|
+
limit: number;
|
|
3889
|
+
};
|
|
3890
|
+
activities: {
|
|
3891
|
+
used: number;
|
|
3892
|
+
limit: number;
|
|
3893
|
+
};
|
|
3894
|
+
campaigns: {
|
|
3895
|
+
used: number;
|
|
3896
|
+
limit: number;
|
|
3897
|
+
};
|
|
3898
|
+
};
|
|
3899
|
+
}>>;
|
|
3852
3900
|
createCheckoutSession: (params: _brandwave_database_queries_billing_schemas.CreateBillingCheckoutSessionParams) => Promise<_brandwave_database_queries__shared_types.ItemResult<{
|
|
3853
3901
|
checkoutSessionId: string;
|
|
3854
3902
|
checkoutUrl: string;
|