@wavezfm/api 0.7.27 → 0.7.29

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Short prepaid Subscriber plans
6
+
7
+ - Added exported `SubscriptionCycle` values `weekly` (seven days) and `fortnightly` (fifteen days) to subscription checkout, Mercado Pago prepaid payment and checkout status contracts. Both are single payments without automatic renewal; Stripe supports enabled prices in all eight billing currencies, while Mercado Pago remains the BRL default.
8
+ - Confirm the current returned short-plan price with `expectedAmountMinor`, using whole JPY/KRW and hundredths for other currencies. The SDK forwards the buyer's confirmed amount without deriving a monthly fraction, changing providers or retrying payment.
9
+ - Individual subscription gifts also accept `weekly` (7 days) and `fortnightly` (15 days), with the same current-price confirmation and prepaid delivery rules. Typed pending notifications expose optional `subscriptionDays`, and sent-gift payment history exposes optional `days`; monthly/annual and older records remain compatible. The legacy Mercado Pago recurring helper retains monthly/annual cycles through `RecurringSubscriptionCycle`.
10
+
5
11
  ### Subscription prices, currency and localization
6
12
 
7
13
  - Subscription checkout, subscription gifts and room gifts now require `expectedAmountMinor`, the current price shown to the buyer. Use whole yen/won for JPY/KRW and hundredths for the other supported currencies. Room gifts confirm the requested count times the displayed monthly unit price; fewer eligible recipients can reduce the final charge.
@@ -17,7 +23,7 @@
17
23
 
18
24
  ### October 10 contract synchronization
19
25
 
20
- - Added typed `billingCheckoutPolicy`, eight supported fiat currencies and donation currency maps, checkout payment modes, returned payment mode/amount/currency, and `subscriptionPaymentMode` plus announcement options to subscription checkout. Prepaid Stripe Pix remains BRL-only and does not renew automatically.
26
+ - Added typed `billingCheckoutPolicy`, eight supported fiat currencies and donation currency maps, checkout payment modes, returned payment mode/amount/currency, and `subscriptionPaymentMode` plus announcement options to subscription checkout. Monthly/annual prepaid Stripe Pix remains BRL-only and does not renew automatically.
21
27
  - Added admin-session `adminMedia` listing, multipart upload and folder/asset management helpers and types. Moving or renaming an image changes its direct URL; folder rename/delete requires an empty folder.
22
28
  - Added session-authenticated bot appearance/access and deletion helpers, bot list `canEdit`/`canDelete`, and the `delete_protected_messages` permission to types and creation validation.
23
29
  - Typed effective private-command sender role, assigned room badge and platform role without changing raw event delivery. Documented platform staff hierarchy, protected bot targets, inline private replies and target-aware ephemeral visibility with local dismissal.
package/README.md CHANGED
@@ -109,8 +109,10 @@ name only; changing it does not change the bot avatar. The chat avatar uses
109
109
  `chatImageUrl`, then `photoUrl`, then the default robot. `photoUrl` also supplies
110
110
  the profile photo.
111
111
  Image artwork retains its own colors. Send the full appearance when preserving
112
- other fields: the server replaces all four fields and omitted fields reset to
113
- `null`. `setBotAppearanceAccess(roomId, enabled)` is platform-admin-only.
112
+ other fields: the server replaces the appearance object and omitted image/color
113
+ fields reset to `null`. `iconBackground` defaults to `true`; set it to `false`
114
+ to remove the chat icon's tinted background and border without changing its artwork
115
+ or the bot avatar. `setBotAppearanceAccess(roomId, enabled)` is platform-admin-only.
114
116
 
115
117
  ```ts
116
118
  await client.roomBot.sendMessage('room-id', {
@@ -395,6 +397,12 @@ enabling confirmation; `BILLING_PRICE_CHANGED` requires a new review rather than
395
397
  an automatic retry. Room gifts confirm requested count × monthly unit price;
396
398
  fewer eligible recipients can reduce the charge.
397
399
 
400
+ Individual Subscriber gifts also accept `cycle: 'weekly'` (7 days) and
401
+ `'fortnightly'` (15 days). These are single payments without automatic renewal;
402
+ confirm the current short-plan price rather than deriving it from the monthly
403
+ amount. Short gift notifications expose `subscriptionDays`; sent-gift history
404
+ uses `days`, while monthly/annual gifts retain their month-based fields.
405
+
398
406
  ```ts
399
407
  const { data: status } = await client.system.status();
400
408
  if (status.billingCheckoutPolicy?.stripeBrlEnabled) {
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { createAdminMediaResource } from "./resources/adminMedia.js";
20
20
  export { parseRoomQueueSnapshot } from "./utils/roomQueue.js";
21
21
  export { formatMentionText } from "./utils/chat.js";
22
22
  export { createRoomBotRealtimeClient } from "./realtime/roomBot.js";
23
- export type { BotPrivateCommand, AdminMediaAsset, AdminMediaFolder, AdminMediaListing, BillingCurrency, BillingCheckoutPolicy, SubscriptionPaymentMode, SubscriptionUpgradeQuote, SubscriptionUpgradePreviewResponse, CheckoutSessionStatus, RoomBotAppearance, RoomBotAppearanceAccess, CountryFlagSettings, TeamDirectory, StageHoverSettings, UserProfileOptions, ApiClientConfig, ApiLike, ApiQuery, ApiQueryValue, ApiRequestOptions, ApiSuccessResponse, AuthMode, AuthUser, BadgeAssignment, ChatImageUploadResponse, ChatLinkReview, ChatMediaPreviewResponse, ChatMessage, CheckoutSessionResponse, GifFavorite, Giveaway, GiveawayEntry, GiveawayJoinEligibility, GiveawayListResponse, GiveawayMutationResponse, GiveawayPrizeDeliveryStatus, GiveawayPrizeType, GiveawayScope, GiveawayStatus, InventoryResponse, InventoryCatalogEntry, InventoryCatalogItem, PurchaseHistoryCategory, PurchaseHistoryCurrency, PurchaseHistoryItem, PurchaseHistoryOptions, PurchaseHistoryResponse, LastFmAccountProfile, LastFmLinkStatus, LastFmWriteResponse, MediaSearchResponse, YouTubeRegionAvailability, RoomOwnershipTransferChallenge, RoomOwnershipTransferResult, MediaSearchResult, MiscShopUserState, MiscStoreCurrency, MiscStoreItemKind, MiscStoreRenderMode, NotificationCenterClearResponse, NotificationCenterStatus, PlaylistExternalImportResult, PlaylistExternalImportSource, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, PrivateConversation, PrivateMessage, PrivateMessageCustomEmoji, PrivateMessageReply, PrivateMessageSendInput, PrivateMessageSendResponse, PrivateMessageUser, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomActiveUser, RoomCustomEmoji, RoomLinkFiltersUpdateInput, RoomGuestPresenceResponse, RoomGuestViewer, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, RoomPlaybackHistoryEntry, RoomPermission, RoomPermissionOverrideMap, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomRoleName, RoomSettingsUpdateInput, RoomStateSnapshot, RoomBotEditMessageInput, RoomBotChatEmbed, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeSendMessageInput, RoomBotRealtimeOptions, RoomActionActor, RoomBotUserKickedPayload, RoomBotUserBannedPayload, RoomBotUserUnbannedPayload, RoomBotQueueRemovalReason, RoomBotQueueRemovedPayload, RoomBotQueueLeftPayload, RoomBotTrackSkippedPayload, RoomBotQueueReorderedPayload, RoomBotMessageDeletedPayload, RoomBotChatClearedPayload, RoomBotUserUpdatedPayload, RoomBotRoomSettingsUpdatedPayload, RoomBotRealtimeEventPayloads, RoomBotRealtimeEventName, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, RoomSystemAlert, RoomEvent, RoomEventApprovalStatus, RoomEventListResponse, RoomEventMutationResponse, RoomEventScope, RoomEventStatus, RoomEventSubmissionInput, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, AdminSystemHealth, AdminSystemStatus, SystemDonationGoal, SystemAlert, SystemAlertAppearance, SystemAlertCustomEmoji, SystemAlertInput, SystemAlertResponse, SystemHealth, SystemPublicStats, SystemProgressionXp, SystemStatus, TwoFactorStatus, UserSettings, UserSystemAlert, UserProfile, UserBlockState, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
23
+ export type { BotPrivateCommand, AdminMediaAsset, AdminMediaFolder, AdminMediaListing, BillingCurrency, BillingCheckoutPolicy, SubscriptionPaymentMode, SubscriptionCycle, RecurringSubscriptionCycle, BillingGiftNotification, SubscriptionPaymentHistoryEntry, SubscriptionPaymentHistoryResponse, SubscriptionUpgradeQuote, SubscriptionUpgradePreviewResponse, CheckoutSessionStatus, RoomBotAppearance, RoomBotAppearanceAccess, CountryFlagSettings, TeamDirectory, StageHoverSettings, UserProfileOptions, ApiClientConfig, ApiLike, ApiQuery, ApiQueryValue, ApiRequestOptions, ApiSuccessResponse, AuthMode, AuthUser, BadgeAssignment, ChatImageUploadResponse, ChatLinkReview, ChatMediaPreviewResponse, ChatMessage, CheckoutSessionResponse, GifFavorite, Giveaway, GiveawayEntry, GiveawayJoinEligibility, GiveawayListResponse, GiveawayMutationResponse, GiveawayPrizeDeliveryStatus, GiveawayPrizeType, GiveawayScope, GiveawayStatus, InventoryResponse, InventoryCatalogEntry, InventoryCatalogItem, PurchaseHistoryCategory, PurchaseHistoryCurrency, PurchaseHistoryItem, PurchaseHistoryOptions, PurchaseHistoryResponse, LastFmAccountProfile, LastFmLinkStatus, LastFmWriteResponse, MediaSearchResponse, YouTubeRegionAvailability, RoomOwnershipTransferChallenge, RoomOwnershipTransferResult, MediaSearchResult, MiscShopUserState, MiscStoreCurrency, MiscStoreItemKind, MiscStoreRenderMode, NotificationCenterClearResponse, NotificationCenterStatus, PlaylistExternalImportResult, PlaylistExternalImportSource, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistJsonTrack, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult, PrivateConversation, PrivateMessage, PrivateMessageCustomEmoji, PrivateMessageReply, PrivateMessageSendInput, PrivateMessageSendResponse, PrivateMessageUser, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaProvider, RoomExternalMediaSubtitleTrack, RoomExternalMediaValidationResponse, RoomActiveUser, RoomCustomEmoji, RoomLinkFiltersUpdateInput, RoomGuestPresenceResponse, RoomGuestViewer, RoomGlobalLimits, RoomGlobalLimitsUpdateInput, RoomPlaybackHistoryEntry, RoomPermission, RoomPermissionOverrideMap, RoomQueueEntry, RoomQueuePlayback, RoomQueueSnapshot, RoomQueueStatusResponse, RoomQueueUser, RoomQueueViewerStatus, RoomRoleName, RoomSettingsUpdateInput, RoomStateSnapshot, RoomBotEditMessageInput, RoomBotChatEmbed, RoomBotMessageReplyInput, RoomBotEventsResponse, RoomPresenceEventFilterType, RoomBotQueueAddResponse, RoomBotRealtimeClient, RoomBotRealtimeSendMessageInput, RoomBotRealtimeOptions, RoomActionActor, RoomBotUserKickedPayload, RoomBotUserBannedPayload, RoomBotUserUnbannedPayload, RoomBotQueueRemovalReason, RoomBotQueueRemovedPayload, RoomBotQueueLeftPayload, RoomBotTrackSkippedPayload, RoomBotQueueReorderedPayload, RoomBotMessageDeletedPayload, RoomBotChatClearedPayload, RoomBotUserUpdatedPayload, RoomBotRoomSettingsUpdatedPayload, RoomBotRealtimeEventPayloads, RoomBotRealtimeEventName, RoomBotSendMessageInput, RoomBotSendMessageResponse, RoomBotState, RoomBotToken, RoomBotSettings, RoomBotSettingsUpdateInput, RoomPresenceEvent, RoomPresenceEventType, RoomSummary, RoomSystemAlert, RoomEvent, RoomEventApprovalStatus, RoomEventListResponse, RoomEventMutationResponse, RoomEventScope, RoomEventStatus, RoomEventSubmissionInput, WavezApiLocale, WavezApiMessageKey, WavezApiMessages, WavezApiMessageValues, StoreCatalogResponse, StoreCatalogItem, StoreCatalogSection, MiscStoreItem, AdminSystemHealth, AdminSystemStatus, SystemDonationGoal, SystemAlert, SystemAlertAppearance, SystemAlertCustomEmoji, SystemAlertInput, SystemAlertResponse, SystemHealth, SystemPublicStats, SystemProgressionXp, SystemStatus, TwoFactorStatus, UserSettings, UserSystemAlert, UserProfile, UserBlockState, WalletBalance, WebSocketLike, WsPacket, } from "./types.js";
24
24
  import type { ApiClientConfig } from "./types.js";
25
25
  export declare function createApiClient(config: ApiClientConfig): {
26
26
  api: import("./core/api.js").WavezApi;
@@ -486,13 +486,13 @@ export declare function createApiClient(config: ApiClientConfig): {
486
486
  quoteId: string;
487
487
  locale?: string | null;
488
488
  }): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
489
- listSubscriptionPaymentHistory(): Promise<import("./types.js").ApiSuccessResponse<unknown[]>>;
489
+ listSubscriptionPaymentHistory(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").SubscriptionPaymentHistoryResponse>>;
490
490
  createSubscriptionCheckout(input: {
491
491
  expectedAmountMinor: number;
492
492
  subscriptionPaymentMode?: import("./types.js").SubscriptionPaymentMode | null;
493
493
  announceInRoom?: boolean;
494
494
  announceRoomSlug?: string | null;
495
- cycle?: string | null;
495
+ cycle?: import("./types.js").SubscriptionCycle | null;
496
496
  currency?: string | null;
497
497
  locale?: string | null;
498
498
  returnPath?: string | null;
@@ -549,7 +549,7 @@ export declare function createApiClient(config: ApiClientConfig): {
549
549
  expectedAmountMinor: number;
550
550
  recipientUsername?: string | null;
551
551
  recipientUserId?: string | null;
552
- cycle?: string | null;
552
+ cycle?: import("./types.js").SubscriptionCycle | null;
553
553
  currency?: string | null;
554
554
  locale?: string | null;
555
555
  returnPath?: string | null;
@@ -576,7 +576,7 @@ export declare function createApiClient(config: ApiClientConfig): {
576
576
  createMercadoPagoPayment(input: {
577
577
  kind: string;
578
578
  expectedAmountMinor?: number;
579
- cycle?: string | null;
579
+ cycle?: import("./types.js").SubscriptionCycle | null;
580
580
  quantity?: number;
581
581
  amountCents?: number;
582
582
  itemId?: string | null;
@@ -597,12 +597,12 @@ export declare function createApiClient(config: ApiClientConfig): {
597
597
  getMercadoPagoPaymentStatus(paymentId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
598
598
  createMercadoPagoSubscription(input: {
599
599
  expectedAmountMinor: number;
600
- cycle?: string | null;
600
+ cycle?: import("./types.js").RecurringSubscriptionCycle | null;
601
601
  locale?: string | null;
602
602
  returnPath?: string | null;
603
603
  formData?: Record<string, unknown> | null;
604
604
  }): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
605
- listPendingGifts(): Promise<import("./types.js").ApiSuccessResponse<unknown[]>>;
605
+ listPendingGifts(): Promise<import("./types.js").ApiSuccessResponse<import("./types.js").BillingGiftNotification[]>>;
606
606
  markGiftSeen(giftId: string): Promise<import("./types.js").ApiSuccessResponse<Record<string, unknown>>>;
607
607
  };
608
608
  adminMedia: {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,oBAAoB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AAC,GAAG,CAAC;QACjC,UAAU,EAAE,wBAAwB,CAAC,GAAG,CAAC;QACzC,SAAS,EAAE,uBAAuB,CAAC,GAAG,CAAC;QACvC,IAAI,EAAE,kBAAkB,CAAC,GAAG,CAAC;QAC7B,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC;QACnC,UAAU,EAAE,wBAAwB,CAAC,GAAG,CAAC;QACzC,MAAM,EAAE,oBAAoB,CAAC,GAAG,CAAC;QACjC,MAAM,EAAE,oBAAoB,CAAC,GAAG,CAAC;QACjC,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC;KACtC,CAAC;AACN,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ApiLike, CheckoutSessionResponse, CheckoutSessionStatus, SubscriptionPaymentMode, SubscriptionUpgradePreviewResponse } from "../types.js";
1
+ import type { ApiLike, BillingGiftNotification, CheckoutSessionResponse, CheckoutSessionStatus, RecurringSubscriptionCycle, SubscriptionCycle, SubscriptionPaymentHistoryResponse, SubscriptionPaymentMode, SubscriptionUpgradePreviewResponse } from "../types.js";
2
2
  export declare function createBillingResource(api: ApiLike): {
3
3
  getCheckoutSessionStatus(sessionId: string): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionStatus>>;
4
4
  cancelSubscription(): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
@@ -11,15 +11,15 @@ export declare function createBillingResource(api: ApiLike): {
11
11
  quoteId: string;
12
12
  locale?: string | null;
13
13
  }): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
14
- listSubscriptionPaymentHistory(): Promise<import("../types.js").ApiSuccessResponse<unknown[]>>;
14
+ listSubscriptionPaymentHistory(): Promise<import("../types.js").ApiSuccessResponse<SubscriptionPaymentHistoryResponse>>;
15
15
  createSubscriptionCheckout(input: {
16
16
  /** Confirmed catalog amount in Stripe minor units: whole JPY/KRW; hundredths otherwise. */
17
17
  expectedAmountMinor: number;
18
- /** Prepaid Stripe Pix is available only for BRL; recurring requires card support. */
18
+ /** Weekly and fortnightly are prepaid in all supported Stripe currencies; monthly/annual Stripe prepaid remains BRL Pix. */
19
19
  subscriptionPaymentMode?: SubscriptionPaymentMode | null;
20
20
  announceInRoom?: boolean;
21
21
  announceRoomSlug?: string | null;
22
- cycle?: string | null;
22
+ cycle?: SubscriptionCycle | null;
23
23
  currency?: string | null;
24
24
  locale?: string | null;
25
25
  returnPath?: string | null;
@@ -76,7 +76,8 @@ export declare function createBillingResource(api: ApiLike): {
76
76
  expectedAmountMinor: number;
77
77
  recipientUsername?: string | null;
78
78
  recipientUserId?: string | null;
79
- cycle?: string | null;
79
+ /** All gifts are prepaid; weekly grants 7 days and fortnightly grants 15 days. */
80
+ cycle?: SubscriptionCycle | null;
80
81
  currency?: string | null;
81
82
  locale?: string | null;
82
83
  returnPath?: string | null;
@@ -105,7 +106,8 @@ export declare function createBillingResource(api: ApiLike): {
105
106
  kind: string;
106
107
  /** Required for subscription_prepaid and gift_subscription_prepaid; BRL cents. */
107
108
  expectedAmountMinor?: number;
108
- cycle?: string | null;
109
+ /** Prepaid Subscriber purchases and gifts also accept weekly and fortnightly. */
110
+ cycle?: SubscriptionCycle | null;
109
111
  quantity?: number;
110
112
  amountCents?: number;
111
113
  itemId?: string | null;
@@ -126,11 +128,12 @@ export declare function createBillingResource(api: ApiLike): {
126
128
  getMercadoPagoPaymentStatus(paymentId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
127
129
  createMercadoPagoSubscription(input: {
128
130
  expectedAmountMinor: number;
129
- cycle?: string | null;
131
+ /** Legacy recurring-management flow; short terms use createMercadoPagoPayment(). */
132
+ cycle?: RecurringSubscriptionCycle | null;
130
133
  locale?: string | null;
131
134
  returnPath?: string | null;
132
135
  formData?: Record<string, unknown> | null;
133
136
  }): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
134
- listPendingGifts(): Promise<import("../types.js").ApiSuccessResponse<unknown[]>>;
137
+ listPendingGifts(): Promise<import("../types.js").ApiSuccessResponse<BillingGiftNotification[]>>;
135
138
  markGiftSeen(giftId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
136
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAC9C,OAAO;QACH,wBAAwB,CAAC,SAAiB;YACtC,OAAO,GAAG,CAAC,GAAG,CAAwB,kCAAkC,EAAE;gBACtE,KAAK,EAAE,EAAE,SAAS,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,0BAA0B,CAAC,KAAkC;YACzD,OAAO,GAAG,CAAC,IAAI,CACX,uCAAuC,EACvC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,+EAA+E;QAC/E,mBAAmB,CAAC,KAAkD;YAClE,OAAO,GAAG,CAAC,IAAI,CACX,+BAA+B,EAC/B,KAAK,CACR,CAAC;QACN,CAAC;QAED,8BAA8B;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,uCAAuC,CAC1C,CAAC;QACN,CAAC;QAED,0BAA0B,CAAC,KAa1B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,gCAAgC,EAChC,KAAK,CACR,CAAC;QACN,CAAC;QAED,qBAAqB,CAAC,KAOrB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,4BAA4B,EAC5B,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,sBAAsB,CAAC,KAStB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;QAED,0BAA0B,CACtB,MAAc,EACd,KAOC;YAED,OAAO,GAAG,CAAC,IAAI,CACX,2BAA2B,kBAAkB,CAAC,MAAM,CAAC,WAAW,EAChE,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,4BAA4B,CAAC,KAO5B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,yBAAyB,CAAC,KAWzB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,8BAA8B,CAAC,KAc9B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,qCAAqC,EACrC,KAAK,CACR,CAAC;QACN,CAAC;QAED,kCAAkC,CAAC,KAalC;YACG,OAAO,GAAG,CAAC,IAAI,CACX,0CAA0C,EAC1C,KAAK,CACR,CAAC;QACN,CAAC;QAED,wBAAwB,CAAC,KAqBxB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;QAED,2BAA2B,CAAC,SAAiB;YACzC,OAAO,GAAG,CAAC,GAAG,CACV,gCAAgC,kBAAkB,CAAC,SAAS,CAAC,SAAS,CACzE,CAAC;QACN,CAAC;QAED,6BAA6B,CAAC,KAM7B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,gBAAgB;YACZ,OAAO,GAAG,CAAC,GAAG,CAAY,wBAAwB,CAAC,CAAC;QACxD,CAAC;QAED,YAAY,CAAC,MAAc;YACvB,OAAO,GAAG,CAAC,IAAI,CACX,kBAAkB,kBAAkB,CAAC,MAAM,CAAC,OAAO,EACnD,EAAE,CACL,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY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AAC;QACN,CAAC;QAED,yBAAyB,CAAC,KAWzB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,iCAAiC,EACjC,KAAK,CACR,CAAC;QACN,CAAC;QAED,8BAA8B,CAAC,KAe9B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,qCAAqC,EACrC,KAAK,CACR,CAAC;QACN,CAAC;QAED,kCAAkC,CAAC,KAalC;YACG,OAAO,GAAG,CAAC,IAAI,CACX,0CAA0C,EAC1C,KAAK,CACR,CAAC;QACN,CAAC;QAED,wBAAwB,CAAC,KAsBxB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,KAAK,CACR,CAAC;QACN,CAAC;QAED,2BAA2B,CAAC,SAAiB;YACzC,OAAO,GAAG,CAAC,GAAG,CACV,gCAAgC,kBAAkB,CAAC,SAAS,CAAC,SAAS,CACzE,CAAC;QACN,CAAC;QAED,6BAA6B,CAAC,KAO7B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,mCAAmC,EACnC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,gBAAgB;YACZ,OAAO,GAAG,CAAC,GAAG,CAA4B,wBAAwB,CAAC,CAAC;QACxE,CAAC;QAED,YAAY,CAAC,MAAc;YACvB,OAAO,GAAG,CAAC,IAAI,CACX,kBAAkB,kBAAkB,CAAC,MAAM,CAAC,OAAO,EACnD,EAAE,CACL,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
package/dist/types.d.ts CHANGED
@@ -789,6 +789,54 @@ export interface StoreCatalogResponse {
789
789
  /** Supported fiat currencies. JPY and KRW have zero-decimal Stripe checkout amounts. */
790
790
  export type BillingCurrency = "usd" | "brl" | "eur" | "czk" | "jpy" | "pln" | "krw" | "nok";
791
791
  export type SubscriptionPaymentMode = "recurring" | "prepaid";
792
+ /** Short cycles are prepaid: exactly seven or fifteen days, without automatic renewal. */
793
+ export type SubscriptionCycle = "monthly" | "annual" | "weekly" | "fortnightly";
794
+ /** Recurring subscriptions retain monthly or annual cycles. Gifts are prepaid. */
795
+ export type RecurringSubscriptionCycle = "monthly" | "annual";
796
+ export interface BillingGiftNotification {
797
+ id: string;
798
+ kind: "subscription" | "diamonds";
799
+ senderUserId: string;
800
+ senderUsername: string;
801
+ senderDisplayUsername: string;
802
+ recipientUserId: string;
803
+ recipientUsername: string;
804
+ recipientDisplayUsername: string;
805
+ anonymous: boolean;
806
+ announceInRoom: boolean;
807
+ roomName: string | null;
808
+ message: string;
809
+ diamondsAmount: number | null;
810
+ subscriptionCycle: SubscriptionCycle | null;
811
+ subscriptionMonths: number | null;
812
+ /** Exactly 7 or 15 for short gifts; null or absent on monthly/annual and older records. */
813
+ subscriptionDays?: number | null;
814
+ currency: BillingCurrency | null;
815
+ createdAt: string;
816
+ [key: string]: unknown;
817
+ }
818
+ export interface SubscriptionPaymentHistoryEntry {
819
+ id: string;
820
+ source: "transaction" | "billing_event" | "gift";
821
+ provider: string;
822
+ status: string;
823
+ amountCents: number | null;
824
+ currency: string | null;
825
+ description: string;
826
+ reference: string | null;
827
+ eventType: string;
828
+ recipientUsername: string | null;
829
+ recipientDisplayUsername: string | null;
830
+ months: number | null;
831
+ /** Exactly 7 or 15 for short gifts; do not format these as a month. */
832
+ days?: number | null;
833
+ cycle: SubscriptionCycle | null;
834
+ createdAt: string;
835
+ [key: string]: unknown;
836
+ }
837
+ export interface SubscriptionPaymentHistoryResponse {
838
+ items: SubscriptionPaymentHistoryEntry[];
839
+ }
792
840
  export interface BillingCheckoutPolicy {
793
841
  stripeBrlEnabled: boolean;
794
842
  /** Applies to new Stripe BRL checkouts, not existing recurring renewals. */
@@ -883,6 +931,8 @@ export interface RoomBotAppearance {
883
931
  icon: string | null;
884
932
  /** HTTPS chat-avatar image; falls back to photoUrl, then the default robot. */
885
933
  chatImageUrl: string | null;
934
+ /** Whether the name badge has a tinted background and border. Defaults to true. */
935
+ iconBackground?: boolean;
886
936
  }
887
937
  export interface RoomBotAppearanceAccess {
888
938
  enabled: boolean;
@@ -1195,7 +1245,7 @@ export interface CheckoutSessionStatus {
1195
1245
  status: string | null;
1196
1246
  paymentStatus: string | null;
1197
1247
  kind: string | null;
1198
- cycle: "monthly" | "annual" | null;
1248
+ cycle: SubscriptionCycle | null;
1199
1249
  subscriptionPaymentMode?: SubscriptionPaymentMode | null;
1200
1250
  /** Recorded amount in hundredths of the major currency unit. */
1201
1251
  amount?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavezfm/api",
3
- "version": "0.7.27",
3
+ "version": "0.7.29",
4
4
  "description": "Official JavaScript/TypeScript API client for WavezFM.",
5
5
  "homepage": "https://docs.wavez.fm/docs",
6
6
  "repository": {