soundlink 2.10.0 → 2.11.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # soundlink
2
2
 
3
+ ## 2.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#46](https://github.com/Fan-ID/typescript-sdk/pull/46) [`6999a0c`](https://github.com/Fan-ID/typescript-sdk/commit/6999a0c643162bdf6c2346977556104d70879e98) Thanks [@jotanarciso](https://github.com/jotanarciso)! - Accept `streamValueEventEnabled` on soundlink create and return it on soundlink detail.
8
+
3
9
  ## 2.10.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -205,7 +205,7 @@ const { data: created } = await soundlink.soundlinks.create(
205
205
  );
206
206
 
207
207
  const { data: detail } = await soundlink.soundlinks.get('sl_abc123');
208
- // detail.autoFollow, detail.appleMusicUrl, detail.youtubeMusicUrl
208
+ // detail.streamValueEventEnabled, detail.autoFollow, detail.appleMusicUrl, detail.youtubeMusicUrl
209
209
 
210
210
  const { data: archived } = await soundlink.soundlinks.delete('sl_abc123');
211
211
  // archived.status === 'archived'
@@ -1,5 +1,5 @@
1
1
  /** Stable snake_case error codes returned by the Soundlink Public API. */
2
- type PublicApiErrorCode = 'invalid_api_key' | 'invalid_token' | 'api_key_revoked' | 'api_key_expired' | 'access_denied' | 'insufficient_scope' | 'not_found' | 'not_in_listening_graph' | 'campaign_not_found' | 'invalid_query_parameter' | 'invalid_date_range' | 'page_size_exceeded' | 'invalid_request' | 'invalid_genre' | 'invalid_duration_or_budget' | 'invalid_daily_budget' | 'invalid_duration_days' | 'invalid_spotify_url' | 'invalid_tier_budget_allocation' | 'invalid_tier_status' | 'learning_edit_ack_required' | 'wallet_not_enabled' | 'premium_plan_required' | 'youtube_music_not_enabled' | 'attribution_not_enabled' | 'soundlink_plan_required' | 'custom_pixel_not_enabled' | 'meta_pixel_conflict' | 'pixel_in_use' | 'insufficient_credit' | 'idempotency_key_conflict' | 'rate_limit_exceeded' | 'invalid_video_url' | 'video_import_limit_exceeded' | 'video_import_session_not_found' | 'internal_error';
2
+ type PublicApiErrorCode = 'invalid_api_key' | 'invalid_token' | 'api_key_revoked' | 'api_key_expired' | 'access_denied' | 'insufficient_scope' | 'not_found' | 'not_in_listening_graph' | 'campaign_not_found' | 'invalid_query_parameter' | 'invalid_date_range' | 'page_size_exceeded' | 'invalid_request' | 'invalid_genre' | 'invalid_duration_or_budget' | 'invalid_daily_budget' | 'invalid_duration_days' | 'invalid_spotify_url' | 'invalid_tier_budget_allocation' | 'invalid_tier_status' | 'learning_edit_ack_required' | 'wallet_not_enabled' | 'premium_plan_required' | 'youtube_music_not_enabled' | 'attribution_not_enabled' | 'soundlink_plan_required' | 'stream_value_not_enabled' | 'custom_pixel_not_enabled' | 'meta_pixel_conflict' | 'pixel_in_use' | 'insufficient_credit' | 'idempotency_key_conflict' | 'rate_limit_exceeded' | 'invalid_video_url' | 'video_import_limit_exceeded' | 'video_import_session_not_found' | 'internal_error';
3
3
  /** Campaign lifecycle status returned by the Public API. */
4
4
  type CampaignStatus = 'creating' | 'active' | 'inactive' | 'ended' | 'renewing' | 'restarting' | 'restart_failed' | 'renew_awaiting_charge' | 'renew_failed' | 'stopped';
5
5
  /** Ad platform used by the campaign. */
@@ -601,6 +601,11 @@ interface SoundlinkDetail extends SoundlinkSummary {
601
601
  * landing-page click.
602
602
  */
603
603
  attributionEnabled: boolean;
604
+ /**
605
+ * Whether Soundlink Stream Value is on for this soundlink. `true` only when
606
+ * it was set at creation.
607
+ */
608
+ streamValueEventEnabled: boolean;
604
609
  }
605
610
  /** Body for `POST /v1/soundlinks`. */
606
611
  interface CreateSoundlinkRequest {
@@ -635,6 +640,14 @@ interface CreateSoundlinkRequest {
635
640
  * landing-page click. Defaults to `true`. Cannot combine with `autoFollow: true`.
636
641
  */
637
642
  attributionEnabled?: boolean;
643
+ /**
644
+ * When `true`, Soundlink sends a Meta conversion event named
645
+ * "Soundlink Stream Value" for attributed streams on this soundlink.
646
+ * Defaults to `false`. The organization must already be enabled for it, or
647
+ * create returns `403 stream_value_not_enabled`. Cannot combine with
648
+ * `attributionEnabled: false`. Can only be set at creation.
649
+ */
650
+ streamValueEventEnabled?: boolean;
638
651
  }
639
652
  /** Paginated soundlink list payload. */
640
653
  interface SoundlinkListData {
@@ -1,4 +1,4 @@
1
- import { C as CampaignStatus, S as StrategyType, M as MetricsOverview, W as WalletData } from './api-BCcqXQoy.js';
1
+ import { C as CampaignStatus, S as StrategyType, M as MetricsOverview, W as WalletData } from './api-C7t2QZ2d.js';
2
2
 
3
3
  type EmulatorTransitionAction = 'activate' | 'reject_meta' | 'set_spend' | 'end';
4
4
  interface EmulatorCampaignRecord {
@@ -1,5 +1,5 @@
1
- import { a as SoundlinkOptions, A as ApiResponse, J as JsonlStream, D as DateRangeParams, E as ExportCollection, P as PingData, W as WalletData, b as StrategiesCatalogData, c as PixelListData, U as UpdatePixelRequest, d as Pixel, e as PixelTestEventData, f as CampaignTiersData, g as UpdateCampaignTiersRequest, h as CampaignListParams, i as CampaignListData, j as CampaignDetail, k as CampaignActivityParams, l as CampaignActivityData, L as ListeningInsight, m as ListeningInsightsData, n as CreateCampaignRequest, I as IdempotencyOptions, o as CampaignCreateData, p as CampaignStopData, q as IncreaseCampaignBudgetRequest, r as IncreaseCampaignBudgetData, s as DecreaseCampaignBudgetRequest, t as DecreaseCampaignBudgetData, u as UpdateCampaignAutoRenewRequest, v as CampaignAutoRenewData, w as SoundlinkBreakdownRow, B as BreakdownExportParams, x as SoundlinkBreakdownListParams, y as SoundlinkBreakdownListData, z as SoundlinkEngagementRow, F as EngagementExportParams, G as SoundlinkEngagementListParams, H as SoundlinkEngagementListData, K as SoundlinkListParams, N as SoundlinkListData, O as SoundlinkDetail, Q as CreateSoundlinkRequest, R as SoundlinkMetricsOverview, T as CohortRetentionListData, V as BreakdownRow, X as BreakdownListParams, Y as BreakdownListData, Z as EngagementRow, M as MetricsOverview, _ as CreativeMetrics, $ as CreativeDailyParams, a0 as CreativeDailyData } from './api-BCcqXQoy.js';
2
- export { a1 as ApiError, a2 as ApiMeta, a3 as BudgetDecreaseMode, a4 as BudgetIncreaseMode, a5 as BuiltInStrategyType, a6 as CampaignActivityItem, a7 as CampaignGeneration, a8 as CampaignSortBy, C as CampaignStatus, a9 as CampaignSummary, aa as CampaignTier, ab as CatalogDigInInsightArtist, ac as CatalogDigInListeningInsight, ad as CohortRetentionDailyRow, ae as CreateCampaignRequestBase, af as CreateCampaignRequestBuiltIn, ag as CreateCampaignRequestCustom, ah as CreativeDailyRow, ai as CreativeDirection, aj as CreativeMetricsChild, ak as CreativeMetricsGroup, al as CustomTier, am as DoItForMeCreativeDirection, an as EngagementContext, ao as FullControlCreativeDirection, ap as Genre, aq as ListeningInsightWindow, ar as OtherArtistsInsightArtist, as as OtherArtistsListeningInsight, at as Pagination, au as PixelPlatform, av as PixelStatus, aw as PublicApiErrorCode, ax as SocialPlatform, ay as SortOrder, az as SoundlinkBreakdownSortBy, aA as SoundlinkClientOptions, aB as SoundlinkEngagementSortBy, aC as SoundlinkSortBy, aD as SoundlinkStatus, aE as SoundlinkSummary, aF as SoundlinkTargetType, aG as StrategyCatalogItem, S as StrategyType, aH as StreamSplitContext, aI as StreamSplitEngagementContext, aJ as StreamSplitListeningInsight, aK as TierLearningStatus, aL as TierStatusUpdateItem, aM as TierTargeting } from './api-BCcqXQoy.js';
1
+ import { a as SoundlinkOptions, A as ApiResponse, J as JsonlStream, D as DateRangeParams, E as ExportCollection, P as PingData, W as WalletData, b as StrategiesCatalogData, c as PixelListData, U as UpdatePixelRequest, d as Pixel, e as PixelTestEventData, f as CampaignTiersData, g as UpdateCampaignTiersRequest, h as CampaignListParams, i as CampaignListData, j as CampaignDetail, k as CampaignActivityParams, l as CampaignActivityData, L as ListeningInsight, m as ListeningInsightsData, n as CreateCampaignRequest, I as IdempotencyOptions, o as CampaignCreateData, p as CampaignStopData, q as IncreaseCampaignBudgetRequest, r as IncreaseCampaignBudgetData, s as DecreaseCampaignBudgetRequest, t as DecreaseCampaignBudgetData, u as UpdateCampaignAutoRenewRequest, v as CampaignAutoRenewData, w as SoundlinkBreakdownRow, B as BreakdownExportParams, x as SoundlinkBreakdownListParams, y as SoundlinkBreakdownListData, z as SoundlinkEngagementRow, F as EngagementExportParams, G as SoundlinkEngagementListParams, H as SoundlinkEngagementListData, K as SoundlinkListParams, N as SoundlinkListData, O as SoundlinkDetail, Q as CreateSoundlinkRequest, R as SoundlinkMetricsOverview, T as CohortRetentionListData, V as BreakdownRow, X as BreakdownListParams, Y as BreakdownListData, Z as EngagementRow, M as MetricsOverview, _ as CreativeMetrics, $ as CreativeDailyParams, a0 as CreativeDailyData } from './api-C7t2QZ2d.js';
2
+ export { a1 as ApiError, a2 as ApiMeta, a3 as BudgetDecreaseMode, a4 as BudgetIncreaseMode, a5 as BuiltInStrategyType, a6 as CampaignActivityItem, a7 as CampaignGeneration, a8 as CampaignSortBy, C as CampaignStatus, a9 as CampaignSummary, aa as CampaignTier, ab as CatalogDigInInsightArtist, ac as CatalogDigInListeningInsight, ad as CohortRetentionDailyRow, ae as CreateCampaignRequestBase, af as CreateCampaignRequestBuiltIn, ag as CreateCampaignRequestCustom, ah as CreativeDailyRow, ai as CreativeDirection, aj as CreativeMetricsChild, ak as CreativeMetricsGroup, al as CustomTier, am as DoItForMeCreativeDirection, an as EngagementContext, ao as FullControlCreativeDirection, ap as Genre, aq as ListeningInsightWindow, ar as OtherArtistsInsightArtist, as as OtherArtistsListeningInsight, at as Pagination, au as PixelPlatform, av as PixelStatus, aw as PublicApiErrorCode, ax as SocialPlatform, ay as SortOrder, az as SoundlinkBreakdownSortBy, aA as SoundlinkClientOptions, aB as SoundlinkEngagementSortBy, aC as SoundlinkSortBy, aD as SoundlinkStatus, aE as SoundlinkSummary, aF as SoundlinkTargetType, aG as StrategyCatalogItem, S as StrategyType, aH as StreamSplitContext, aI as StreamSplitEngagementContext, aJ as StreamSplitListeningInsight, aK as TierLearningStatus, aL as TierStatusUpdateItem, aM as TierTargeting } from './api-C7t2QZ2d.js';
3
3
 
4
4
  interface HttpGetOptions {
5
5
  path: string;
@@ -1827,6 +1827,12 @@ paths:
1827
1827
  Requires the `soundlinks:write` scope and a self-serve plan on the
1828
1828
  organization; otherwise returns `403 soundlink_plan_required`.
1829
1829
 
1830
+ `streamValueEventEnabled: true` turns on Soundlink Stream Value for
1831
+ that soundlink. The organization must already be enabled for it, or
1832
+ the request returns `403 stream_value_not_enabled`. It cannot be
1833
+ combined with `attributionEnabled: false`. Events are sent only when
1834
+ the soundlink has a Meta pixel and conversion access token.
1835
+
1830
1836
  `Idempotency-Key` is **required**. Reusing the key with an unchanged
1831
1837
  body replays the original `201`; a different body returns
1832
1838
  `409 idempotency_key_conflict`. Keys are honored for 24 hours.
@@ -1857,10 +1863,11 @@ paths:
1857
1863
  metaPixelId: '1234567890123456'
1858
1864
  metaConversionAccessToken: 'EAAB...'
1859
1865
  playlist:
1860
- summary: Playlist soundlink
1866
+ summary: Playlist soundlink with Stream Value
1861
1867
  value:
1862
1868
  name: Late Night Mix
1863
1869
  spotifyUrl: 'https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M'
1870
+ streamValueEventEnabled: true
1864
1871
  responses:
1865
1872
  '201':
1866
1873
  description: Soundlink created
@@ -1881,6 +1888,7 @@ paths:
1881
1888
  autoFollow: true
1882
1889
  artistIdFollow: '4gzpq5DPGxSnKTe4SA8HAU'
1883
1890
  attributionEnabled: true
1891
+ streamValueEventEnabled: false
1884
1892
  metaPixelId: '1234567890123456'
1885
1893
  tiktokPixelId: null
1886
1894
  appleMusicUrl: null
@@ -1931,6 +1939,7 @@ paths:
1931
1939
  autoFollow: true
1932
1940
  artistIdFollow: '4gzpq5DPGxSnKTe4SA8HAU'
1933
1941
  attributionEnabled: true
1942
+ streamValueEventEnabled: false
1934
1943
  metaPixelId: '1234567890123456'
1935
1944
  tiktokPixelId: null
1936
1945
  appleMusicUrl: null
@@ -1980,6 +1989,7 @@ paths:
1980
1989
  autoFollow: true
1981
1990
  artistIdFollow: '4gzpq5DPGxSnKTe4SA8HAU'
1982
1991
  attributionEnabled: true
1992
+ streamValueEventEnabled: false
1983
1993
  metaPixelId: '1234567890123456'
1984
1994
  tiktokPixelId: null
1985
1995
  appleMusicUrl: null
@@ -3111,6 +3121,7 @@ components:
3111
3121
  - wallet_not_enabled
3112
3122
  - premium_plan_required
3113
3123
  - soundlink_plan_required
3124
+ - stream_value_not_enabled
3114
3125
  - custom_pixel_not_enabled
3115
3126
  - meta_pixel_conflict
3116
3127
  - pixel_in_use
@@ -4604,6 +4615,18 @@ components:
4604
4615
  When false, the landing page skips Spotify login and only tracks
4605
4616
  the landing-page click. Omit or send true to keep attribution.
4606
4617
  Cannot be combined with `autoFollow: true`.
4618
+ streamValueEventEnabled:
4619
+ type: boolean
4620
+ default: false
4621
+ description: |
4622
+ When true, Soundlink sends a Meta conversion event named
4623
+ "Soundlink Stream Value" for attributed streams on this soundlink.
4624
+ Requires the organization to be enabled for Soundlink Stream Value,
4625
+ otherwise the request returns `403 stream_value_not_enabled`.
4626
+ Cannot be combined with `attributionEnabled: false`. Omit or send
4627
+ false to leave it off. Can only be set at creation. Events are
4628
+ sent only when the soundlink has a Meta pixel and conversion
4629
+ access token.
4607
4630
 
4608
4631
  SoundlinkDetail:
4609
4632
  allOf:
@@ -4617,6 +4640,7 @@ components:
4617
4640
  - appleMusicUrl
4618
4641
  - youtubeMusicUrl
4619
4642
  - attributionEnabled
4643
+ - streamValueEventEnabled
4620
4644
  properties:
4621
4645
  autoFollow:
4622
4646
  type: boolean
@@ -4655,6 +4679,11 @@ components:
4655
4679
  description: |
4656
4680
  Whether this soundlink keeps Spotify attribution. `false`
4657
4681
  means the landing page skips login and only tracks the click.
4682
+ streamValueEventEnabled:
4683
+ type: boolean
4684
+ description: |
4685
+ Whether Soundlink Stream Value is on for this soundlink.
4686
+ `true` only when it was set at creation.
4658
4687
 
4659
4688
  SoundlinkDetailResponse:
4660
4689
  type: object
@@ -5576,8 +5605,9 @@ components:
5576
5605
 
5577
5606
  CreateSoundlinkForbidden:
5578
5607
  description: |
5579
- Valid credentials but missing the `soundlinks:write` scope, or the
5580
- organization has no self-serve plan.
5608
+ Valid credentials but missing the `soundlinks:write` scope, the
5609
+ organization has no self-serve plan, or Soundlink Stream Value was
5610
+ requested for an organization that is not enabled for it.
5581
5611
  content:
5582
5612
  application/json:
5583
5613
  schema:
@@ -5597,6 +5627,13 @@ components:
5597
5627
  message: 'Creating a Soundlink requires a self-serve plan.'
5598
5628
  meta:
5599
5629
  requestId: 550e8400-e29b-41d4-a716-446655440000
5630
+ stream_value_not_enabled:
5631
+ value:
5632
+ error:
5633
+ code: stream_value_not_enabled
5634
+ message: 'This organization cannot create a soundlink with stream value enabled.'
5635
+ meta:
5636
+ requestId: 550e8400-e29b-41d4-a716-446655440000
5600
5637
  CreateSoundlinkUnprocessable:
5601
5638
  description: Request body is well-formed but the Spotify URL is invalid.
5602
5639
  content:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soundlink",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "Official TypeScript SDK for the Soundlink Public API",
5
5
  "license": "MIT",
6
6
  "type": "module",