ugcinc 4.5.93 → 4.6.0

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/billing.d.ts CHANGED
@@ -17,19 +17,29 @@ export interface BillingInfo {
17
17
  name: string | null;
18
18
  }>;
19
19
  }
20
- export interface CancelSubscriptionResponse {
21
- message: string;
22
- }
23
20
  export interface PortalUrlResponse {
24
21
  url: string;
25
22
  }
26
- export interface DeactivateAccountParams {
23
+ export interface CancelAccountParams {
24
+ account_id: string;
25
+ }
26
+ export interface CancelAccountResponse {
27
+ message: string;
28
+ account_id: string;
29
+ cancel_at: string;
30
+ }
31
+ export interface ReactivateAccountParams {
27
32
  account_id: string;
28
33
  }
29
- export interface DeactivateAccountResponse {
34
+ export interface ReactivateAccountResponse {
30
35
  message: string;
31
36
  account_id: string;
32
37
  }
38
+ export interface CancelSubscriptionResponse {
39
+ message: string;
40
+ cancelled: number;
41
+ cancel_at: string | null;
42
+ }
33
43
  export interface RequestReplacementParams {
34
44
  account_id: string;
35
45
  reason?: string;
@@ -37,7 +47,6 @@ export interface RequestReplacementParams {
37
47
  export interface RequestReplacementResponse {
38
48
  message: string;
39
49
  request: BillingRequestInfo | null;
40
- new_account_id: string | null;
41
50
  }
42
51
  export interface RequestRefundParams {
43
52
  account_id: string;
@@ -68,22 +77,28 @@ export declare class BillingClient extends BaseClient {
68
77
  * Get billing information including subscription details and linked orgs
69
78
  */
70
79
  getBilling(): Promise<ApiResponse<BillingInfo>>;
71
- /**
72
- * Cancel subscription at the end of the current billing period
73
- */
74
- cancelSubscription(): Promise<ApiResponse<CancelSubscriptionResponse>>;
75
80
  /**
76
81
  * Get a Stripe billing portal URL for managing payment methods
77
82
  */
78
83
  getPortalUrl(params?: PortalParams): Promise<ApiResponse<PortalUrlResponse>>;
79
84
  /**
80
- * Deactivate an account slot, removing it from your subscription
81
- * The account is reclaimed and billing is adjusted (no proration)
85
+ * Cancel the subscription for a single account. The account keeps access until
86
+ * the end of the current billing period, then is reclaimed automatically.
87
+ * Can be reversed with reactivateAccount before that date.
82
88
  */
83
- deactivateAccount(params: DeactivateAccountParams): Promise<ApiResponse<DeactivateAccountResponse>>;
89
+ cancelAccount(params: CancelAccountParams): Promise<ApiResponse<CancelAccountResponse>>;
90
+ /**
91
+ * Undo a pending cancellation on an account, restoring it to its prior status.
92
+ */
93
+ reactivateAccount(params: ReactivateAccountParams): Promise<ApiResponse<ReactivateAccountResponse>>;
94
+ /**
95
+ * Cancel all accounts under this billing. Each account keeps access until the
96
+ * end of the current billing period, then is reclaimed automatically.
97
+ */
98
+ cancelSubscription(): Promise<ApiResponse<CancelSubscriptionResponse>>;
84
99
  /**
85
- * Request a replacement for an account
86
- * First replacement is auto-approved; subsequent requests require manual review
100
+ * Request a replacement for an account. All replacement requests require
101
+ * admin review.
87
102
  */
88
103
  requestReplacement(params: RequestReplacementParams): Promise<ApiResponse<RequestReplacementResponse>>;
89
104
  /**
package/dist/billing.js CHANGED
@@ -15,12 +15,6 @@ class BillingClient extends base_1.BaseClient {
15
15
  async getBilling() {
16
16
  return this.get('/billing');
17
17
  }
18
- /**
19
- * Cancel subscription at the end of the current billing period
20
- */
21
- async cancelSubscription() {
22
- return this.post('/billing/cancel');
23
- }
24
18
  /**
25
19
  * Get a Stripe billing portal URL for managing payment methods
26
20
  */
@@ -28,15 +22,29 @@ class BillingClient extends base_1.BaseClient {
28
22
  return this.post('/billing/portal', params ?? {});
29
23
  }
30
24
  /**
31
- * Deactivate an account slot, removing it from your subscription
32
- * The account is reclaimed and billing is adjusted (no proration)
25
+ * Cancel the subscription for a single account. The account keeps access until
26
+ * the end of the current billing period, then is reclaimed automatically.
27
+ * Can be reversed with reactivateAccount before that date.
33
28
  */
34
- async deactivateAccount(params) {
35
- return this.post('/billing/deactivate', params);
29
+ async cancelAccount(params) {
30
+ return this.post('/billing/cancel-account', params);
31
+ }
32
+ /**
33
+ * Undo a pending cancellation on an account, restoring it to its prior status.
34
+ */
35
+ async reactivateAccount(params) {
36
+ return this.post('/billing/reactivate-account', params);
37
+ }
38
+ /**
39
+ * Cancel all accounts under this billing. Each account keeps access until the
40
+ * end of the current billing period, then is reclaimed automatically.
41
+ */
42
+ async cancelSubscription() {
43
+ return this.post('/billing/cancel-subscription');
36
44
  }
37
45
  /**
38
- * Request a replacement for an account
39
- * First replacement is auto-approved; subsequent requests require manual review
46
+ * Request a replacement for an account. All replacement requests require
47
+ * admin review.
40
48
  */
41
49
  async requestReplacement(params) {
42
50
  return this.post('/billing/request-replacement', params);
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export type { RefreshStatsParams, RefreshStatsError, RefreshStatsResponse, Refre
32
32
  export type { Org, ApiKey, DeleteApiKeyParams, EditApiKeyParams, IntegrationKey, IntegrationProvider, UpsertIntegrationKeyParams, DeleteIntegrationKeyParams } from './org';
33
33
  export type { UserMedia, MediaUse, SocialAudio, Media, GetMediaParams, GetSocialAudioParams, UploadMediaParams, UploadMediaResponse, MediaTagUpdate, UpdateMediaTagsParams, MediaTagUpdateResult, UpdateMediaTagsResponse, UpdateMediaTagParams, UpdateMediaNameParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, ImportTextParams, ImportTextResponse, CreateMediaFromUrlParams, GetMediaUseParams, GetMediaUseResponse, FilterMediaParams, FilterMediaResponse, GetUploadTokenParams, UploadTokenResponse, } from './media';
34
34
  export type { CommentStatus, Comment, CreateCommentParams, CreateCommentResponse, GetCommentsParams, } from './comments';
35
- export type { BillingInfo, CancelSubscriptionResponse, PortalUrlResponse, DeactivateAccountParams, DeactivateAccountResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
35
+ export type { BillingInfo, PortalUrlResponse, CancelAccountParams, CancelAccountResponse, ReactivateAccountParams, ReactivateAccountResponse, CancelSubscriptionResponse, RequestReplacementParams, RequestReplacementResponse, RequestRefundParams, RequestRefundResponse, BillingRequestInfo, PortalParams, } from './billing';
36
36
  export type { RenderJobResponse, RenderJobStatus, SubmitImageRenderJobParams, SubmitVideoRenderJobParams, SubmitScreenshotAnimationRenderJobParams, SubmitAutoCaptionRenderJobParams, SubmitSceneSplitJobParams, SceneSplitDetectorConfig, SubmitInstagramDmRenderJobParams, SubmitIMessageDmRenderJobParams, IgDmMessage, ImDmMessage, RenderVideoEditorConfig, } from './render';
37
37
  export type { VideoEditorNodeConfig, VideoEditorChannel, VideoEditorSegment, VideoEditorVideoSegment, VideoEditorAudioSegment, VideoEditorImageSegment, VideoEditorTextSegment, VideoEditorImageSequenceSegment, VideoEditorVideoSequenceSegment, TimeValue, TimeMode, SegmentTimelinePosition, DeduplicationLevel, DeduplicationInput, ImageEditorElement, DimensionPresetKey, } from './render/types';
38
38
  export type { ImageEditorNodeConfig, ImageComposerNodeConfig, ImageComposerRenderInput } from './automations/nodes/image-composer';
@@ -11,14 +11,6 @@ exports.billingTools = [
11
11
  return client.billing.getBilling();
12
12
  },
13
13
  },
14
- {
15
- name: 'cancel_subscription',
16
- description: 'Cancel subscription at the end of the current billing period. The subscription remains active until the period ends.',
17
- schema: zod_1.z.object({}).optional(),
18
- execute: async (client) => {
19
- return client.billing.cancelSubscription();
20
- },
21
- },
22
14
  {
23
15
  name: 'get_billing_portal',
24
16
  description: 'Get a Stripe billing portal URL for managing payment methods and invoices.',
@@ -30,18 +22,36 @@ exports.billingTools = [
30
22
  },
31
23
  },
32
24
  {
33
- name: 'deactivate_account',
34
- description: 'Deactivate an account slot. Removes it from your subscription (no proration) and reclaims the account.',
25
+ name: 'cancel_account',
26
+ description: 'Cancel the subscription for a single account. The account keeps access until the end of the current billing period, then is reclaimed automatically.',
27
+ schema: zod_1.z.object({
28
+ account_id: zod_1.z.string().describe('ID of the account to cancel'),
29
+ }),
30
+ execute: async (client, params) => {
31
+ return client.billing.cancelAccount(params);
32
+ },
33
+ },
34
+ {
35
+ name: 'reactivate_account',
36
+ description: 'Undo a pending cancellation on an account, restoring it to its prior status. Must be called before the billing period ends.',
35
37
  schema: zod_1.z.object({
36
- account_id: zod_1.z.string().describe('ID of the account to deactivate'),
38
+ account_id: zod_1.z.string().describe('ID of the account to reactivate'),
37
39
  }),
38
40
  execute: async (client, params) => {
39
- return client.billing.deactivateAccount(params);
41
+ return client.billing.reactivateAccount(params);
42
+ },
43
+ },
44
+ {
45
+ name: 'cancel_subscription',
46
+ description: 'Cancel every account under this billing. Each account keeps access until the end of the current billing period, then is reclaimed automatically.',
47
+ schema: zod_1.z.object({}).optional(),
48
+ execute: async (client) => {
49
+ return client.billing.cancelSubscription();
40
50
  },
41
51
  },
42
52
  {
43
53
  name: 'request_replacement',
44
- description: 'Request a replacement for an account. First replacement is auto-approved; subsequent requests require manual review.',
54
+ description: 'Request a replacement for an account. All replacement requests require manual review.',
45
55
  schema: zod_1.z.object({
46
56
  account_id: zod_1.z.string().describe('ID of the account to replace'),
47
57
  reason: zod_1.z.string().optional().describe('Reason for replacement'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.5.93",
3
+ "version": "4.6.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",