@dynamoi/mcp 0.6.4 → 0.7.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.
Files changed (63) hide show
  1. package/CAPABILITY_PARITY.md +60 -0
  2. package/CHANGELOG.md +37 -1
  3. package/README.md +25 -7
  4. package/dist/auth/protected-resource.d.ts +34 -5
  5. package/dist/auth/protected-resource.d.ts.map +1 -0
  6. package/dist/auth/protected-resource.js +10 -4
  7. package/dist/auth/protected-resource.js.map +9 -1
  8. package/dist/auth/verify-token.d.ts +21 -0
  9. package/dist/auth/verify-token.d.ts.map +1 -0
  10. package/dist/chunk-2jm8hjsz.js +96 -0
  11. package/dist/chunk-2jm8hjsz.js.map +10 -0
  12. package/dist/chunk-kb3xpcrb.js +9 -0
  13. package/dist/chunk-kb3xpcrb.js.map +10 -0
  14. package/dist/consent.d.ts +4 -0
  15. package/dist/consent.d.ts.map +1 -0
  16. package/dist/consent.js +13 -0
  17. package/dist/consent.js.map +9 -0
  18. package/dist/flow-types.d.ts +160 -0
  19. package/dist/flow-types.d.ts.map +1 -0
  20. package/dist/index.d.ts +14 -2464
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +1592 -1408
  23. package/dist/index.js.map +26 -1
  24. package/dist/readiness-types.d.ts +88 -0
  25. package/dist/readiness-types.d.ts.map +1 -0
  26. package/dist/server/create-server.d.ts +84 -0
  27. package/dist/server/create-server.d.ts.map +1 -0
  28. package/dist/server/distribution-tools.d.ts +72 -0
  29. package/dist/server/distribution-tools.d.ts.map +1 -0
  30. package/dist/server/instructions.d.ts +3 -0
  31. package/dist/server/instructions.d.ts.map +1 -0
  32. package/dist/server/onboarding-tool-definitions.d.ts +56 -0
  33. package/dist/server/onboarding-tool-definitions.d.ts.map +1 -0
  34. package/dist/server/openai-tools.d.ts +88 -0
  35. package/dist/server/openai-tools.d.ts.map +1 -0
  36. package/dist/server/output-schemas.d.ts +122 -0
  37. package/dist/server/output-schemas.d.ts.map +1 -0
  38. package/dist/server/playbook-resources.d.ts +3 -0
  39. package/dist/server/playbook-resources.d.ts.map +1 -0
  40. package/dist/server/prompts.d.ts +3 -0
  41. package/dist/server/prompts.d.ts.map +1 -0
  42. package/dist/server/resources.d.ts +4 -0
  43. package/dist/server/resources.d.ts.map +1 -0
  44. package/dist/server/shared-schemas.d.ts +14 -0
  45. package/dist/server/shared-schemas.d.ts.map +1 -0
  46. package/dist/server/smart-link-theme-preview.d.ts +48 -0
  47. package/dist/server/smart-link-theme-preview.d.ts.map +1 -0
  48. package/dist/server/smart-link-tools.d.ts +346 -0
  49. package/dist/server/smart-link-tools.d.ts.map +1 -0
  50. package/dist/server/tools.d.ts +878 -0
  51. package/dist/server/tools.d.ts.map +1 -0
  52. package/dist/server/workflow-tools.d.ts +93 -0
  53. package/dist/server/workflow-tools.d.ts.map +1 -0
  54. package/dist/transport/http.d.ts +9 -0
  55. package/dist/transport/http.d.ts.map +1 -0
  56. package/dist/types.d.ts +469 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/version.d.ts +2 -0
  59. package/dist/version.d.ts.map +1 -0
  60. package/package.json +19 -9
  61. package/server.json +3 -3
  62. package/dist/chunk-CHQUK72A.js +0 -35
  63. package/dist/chunk-CHQUK72A.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ # Dynamoi MCP Capability Parity
2
+
3
+ This map keeps the public MCP promise aligned with customer-facing Dynamoi app
4
+ behavior. Parity means an agent can complete an appropriate customer workflow
5
+ or make a truthful handoff. It does not mean exposing operator, legal, provider,
6
+ admin, or payment controls as agent tools.
7
+
8
+ ## Public tool audit
9
+
10
+ | Tool | App capability | MCP behavior | ChatGPT app |
11
+ | --- | --- | --- | --- |
12
+ | `dynamoi_get_account_overview` | Account and roster orientation | Returns accessible organizations, artists, connection state, and next actions | Available |
13
+ | `dynamoi_list_artists` | Artist roster | Lists accessible artists or reads one artist's profile | Available |
14
+ | `dynamoi_search` | Product search | Searches artists, campaigns, and Smart Links | Available |
15
+ | `search` | OpenAI app search | Returns compact searchable Dynamoi records | Available |
16
+ | `fetch` | OpenAI app record fetch | Fetches one search result by stable identifier | Available |
17
+ | `dynamoi_list_campaigns` | Campaign management | Lists an artist's Smart Campaigns and YouTube campaigns | Available |
18
+ | `dynamoi_get_campaign` | Campaign detail and reporting | Reads budget, targeting, status, deployment state, and optional analytics | Available |
19
+ | `dynamoi_get_artist_analytics` | Promotion analytics | Returns artist-level campaign rollups and daily performance | Available |
20
+ | `dynamoi_get_billing` | Managed-advertising billing state | Reads subscription, credits, and launch blockers without collecting payment | Full MCP only |
21
+ | `dynamoi_get_platform_status` | Spotify, Meta, and YouTube connections | Reads platform connection and onboarding state | Available |
22
+ | `dynamoi_list_available_countries` | Campaign targeting catalogs | Lists supported targeting countries by campaign type | Full MCP only |
23
+ | `dynamoi_get_campaign_readiness` | Campaign creation validation | Checks launch inputs and blockers without creating a campaign | Full MCP only |
24
+ | `dynamoi_start_youtube_channel_link` | YouTube connection | Starts either advertising OAuth or least-privilege distribution identity OAuth | Full MCP only |
25
+ | `dynamoi_start_meta_connection` | Facebook/Instagram connection | Starts either advertising OAuth or least-privilege distribution identity OAuth | Full MCP only |
26
+ | `dynamoi_update_campaign` | Campaign management | Pauses, resumes, or updates an eligible campaign after explicit intent | Full MCP only |
27
+ | `dynamoi_list_media_assets` | Campaign creative library | Lists reusable launch media | Full MCP only |
28
+ | `dynamoi_launch_campaign` | Smart Campaign and YouTube campaign creation | Creates an eligible managed campaign after readiness and intent checks | Full MCP only |
29
+ | `dynamoi_create_smart_link_from_spotify` | Smart Link creation | Creates or returns a Smart Link for one Spotify track or album | Available |
30
+ | `dynamoi_create_smart_links_from_spotify_artist` | Artist hub and catalog import | Creates an artist hub and starts catalog Smart Link import | Available |
31
+ | `dynamoi_list_smart_links` | Smart Link library | Lists an artist's Smart Links | Available |
32
+ | `dynamoi_get_smart_link` | Smart Link detail, settings, and analytics | Reads a link with optional analytics and artist settings | Available |
33
+ | `dynamoi_update_smart_link` | Smart Link editing | Updates link content, theme, pixels, or publish state within validated fields | Available |
34
+ | `dynamoi_preview_smart_link_themes` | Smart Link theme picker | Renders the four themes without changing a Smart Link | Available |
35
+ | `dynamoi_get_distribution_application` | Distribution application page | Reads the exact five requirements, evidence, eligibility, and application status | Available |
36
+ | `dynamoi_apply_for_distribution` | Distribution application submission | Rechecks server truth and submits an idempotent application for manual review | Available |
37
+
38
+ ## Customer capability boundaries
39
+
40
+ | App capability family | Parity decision | Reason |
41
+ | --- | --- | --- |
42
+ | Artist/account onboarding | Partial MCP plus handoff | Spotify-based artist and Smart Link onboarding is agent-callable; organization administration and team invites remain in the app. |
43
+ | Smart Links | MCP appropriate | Creation, discovery, editing, settings, publication, themes, and analytics have bounded customer-safe contracts. |
44
+ | Smart Campaigns and YouTube campaigns | Full MCP appropriate; ChatGPT read-only | Full MCP clients can validate, launch, and update campaigns. ChatGPT keeps paid launch and live campaign mutations in the dashboard review profile. |
45
+ | Analytics and reporting | MCP appropriate | Artist, campaign, and Smart Link analytics are customer reads scoped by artist access. |
46
+ | Billing and checkout | Read plus dashboard handoff | Agents can inspect billing state, but checkout and payment collection remain in the dashboard. |
47
+ | Platform connections | Full MCP appropriate | Advertising connections are billing-gated; distribution identity connections use separate least-privilege permissions without billing. |
48
+ | Distribution application | MCP appropriate | Eligibility and application submission now use the same server truth and access checks as the app. |
49
+ | Distribution agreement | Dashboard handoff | Agreement acceptance is a separate legal act and is not implied by application submission. |
50
+ | Distribution release intake and status | Future customer-safe MCP work | Release rights, splits, proofs, tax readiness, and delivery gates need a dedicated contract before agent mutation is safe. |
51
+ | Distribution catalog, royalties, and earnings | Future read-only MCP work | Customer-safe reads are useful, but the current public MCP does not claim them. |
52
+ | Takedowns | Dashboard and operator workflow | Takedowns carry rights and provider consequences and need a separately reviewed mutation contract. |
53
+ | Team and organization management | Dashboard handoff | Membership and role changes are security-sensitive administration, not promotion execution. |
54
+ | Shop purchases | Public shop/API handoff | The authenticated MCP does not expose direct checkout or agent payment tools. |
55
+ | Publishing administration | Out of current MCP scope | Dynamoi MCP must not imply a publishing-administration workflow that the customer app does not provide. |
56
+
57
+ The next meaningful parity expansion is distribution release intake and read-only
58
+ distribution catalog/royalty status. It should ship only after the agreement,
59
+ rights, splits, tax, payout, and provider-delivery boundaries have stable
60
+ customer-safe domain contracts.
package/CHANGELOG.md CHANGED
@@ -5,7 +5,43 @@ All notable changes to `@dynamoi/mcp` will be documented in this file.
5
5
  This project follows the principles of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
6
  and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.7.0] - 2026-08-12
9
+
10
+ ### Added
11
+
12
+ - Added customer-safe tools to check the five music-distribution application
13
+ requirements and submit an eligible application for manual review.
14
+ - Added least-privilege Meta and YouTube distribution-identity connection modes
15
+ that remain separate from advertising billing and permissions.
16
+ - Added dedicated distribution read/apply OAuth scopes and consent coverage.
17
+
18
+ ### Changed
19
+
20
+ - Repositioned Dynamoi MCP around music-promotion campaigns, Smart Links,
21
+ analytics, and distribution applications, with explicit routing instructions
22
+ for agents.
23
+
24
+ ## [0.6.5] - 2026-08-12
25
+
26
+ ### Added
27
+
28
+ - Added `dynamoi_preview_smart_link_themes` with a ChatGPT Apps SDK UI resource
29
+ so reviewers can see the four Smart Link themes without creating or updating
30
+ a Smart Link.
31
+
32
+ ### Changed
33
+
34
+ - Automated official MCP Registry publication after npm releases with GitHub
35
+ OIDC authentication, pinned tooling, propagation retries, and exact metadata
36
+ readback.
37
+ - Pinned public release and validation workflow actions to immutable commits.
38
+
39
+ ### Fixed
40
+
41
+ - Replaced dynamic HTML construction in the Smart Link theme preview with safe
42
+ DOM and text APIs.
43
+ - Rejected control characters in generated OAuth challenge headers and blocked
44
+ redirects during registry metadata verification.
9
45
 
10
46
  ## [0.6.4] - 2026-05-30
11
47
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Dynamoi MCP 🎧
2
2
 
3
- > Let any MCP-capable AI agent help artists and labels get releases ready to promote.
3
+ > Let any MCP-capable AI agent run music-promotion workflows for artists and labels.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@dynamoi/mcp?label=npm)](https://www.npmjs.com/package/@dynamoi/mcp)
6
6
  [![license](https://img.shields.io/npm/l/@dynamoi/mcp)](./LICENSE)
@@ -12,9 +12,9 @@ links, artist pages, campaign setup, ad account connections, billing checks,
12
12
  analytics, and launch notes.
13
13
 
14
14
  **Dynamoi MCP lets an AI agent help with that work directly.** A connected agent
15
- can create a free Smart Link, pull artist and campaign context, check what is
16
- blocking a launch, start YouTube or Meta connection flows, and keep the next
17
- promotion step clear.
15
+ can create music-promotion campaigns and free Smart Links, pull artist and
16
+ campaign context, review analytics, start platform connection flows, and handle
17
+ music-distribution applications.
18
18
 
19
19
  It works with any MCP host that supports remote Streamable HTTP and OAuth:
20
20
  ChatGPT, Claude, Gemini, local agent runtimes, internal label tools, or custom
@@ -33,6 +33,7 @@ https://dynamoi.com/mcp
33
33
  | 📈 "What do we have live right now?" | Search artists, Smart Links, campaigns, analytics, and account status. |
34
34
  | 📺 "Connect our YouTube channel." | Start the correct connection flow from the conversation. |
35
35
  | 🚀 "Can we promote this?" | Keep the free-link workflow separate from managed advertising, then point to the next safe step. |
36
+ | 💿 "Can we apply for distribution?" | Check the five eligibility requirements and submit a complete application for manual review. |
36
37
 
37
38
  ## 🎤 Who It Is For
38
39
 
@@ -71,6 +72,19 @@ helps agents answer the practical questions:
71
72
  | "What needs attention?" | Active campaigns, Smart Links, analytics, and next actions. |
72
73
  | "Are we connected?" | YouTube and Meta connection state, plus connection-start flows where available. |
73
74
 
75
+ ## 💿 Music Distribution Applications
76
+
77
+ Dynamoi MCP checks the same five application requirements as the app: Spotify
78
+ connected, at least 1,000 Spotify followers, at least 10,000 verified
79
+ Soundcharts monthly listeners, connected Facebook Page plus Instagram
80
+ professional identity, and connected YouTube identity. Eligible users can
81
+ submit an application for manual review from an agent.
82
+
83
+ Application submission does not approve distribution, accept an agreement,
84
+ submit a release, transfer rights, configure splits or tax forms, or deliver
85
+ music to stores. Those remain separate customer, legal, provider, and operator
86
+ steps.
87
+
74
88
  ## 🧠 Built For Any MCP Agent
75
89
 
76
90
  This is a general MCP server, not a single-chat-product integration. Use the
@@ -120,8 +134,9 @@ const server = createDynamoiMcpServer({
120
134
  });
121
135
  ```
122
136
 
123
- `handleMcpHttpRequest` provides Streamable HTTP request handling with session
124
- binding, so an MCP session cannot drift across authenticated users.
137
+ `handleMcpHttpRequest` provides stateless Streamable HTTP request handling for
138
+ serverless deployments. Authentication and authorization remain the host
139
+ application's responsibility on every request.
125
140
 
126
141
  ### What Ships In This Package
127
142
 
@@ -130,7 +145,7 @@ binding, so an MCP session cannot drift across authenticated users.
130
145
  | Tool schemas | The public MCP contract exposed by Dynamoi. |
131
146
  | Prompts and resources | Guidance for Dynamoi-specific agent workflows. |
132
147
  | Protected-resource metadata | OAuth discovery metadata for compatible clients. |
133
- | HTTP transport helpers | Streamable HTTP handling with session binding. |
148
+ | HTTP transport helpers | Stateless Streamable HTTP handling for serverless hosts. |
134
149
  | TypeScript types | Integration-safe contracts for hosted server code. |
135
150
 
136
151
  ## 🛡️ Safety Model
@@ -161,6 +176,8 @@ Try these from any connected MCP agent:
161
176
 
162
177
  > 🚀 Get this release ready to promote.
163
178
 
179
+ > 💿 Check whether this artist can apply for music distribution.
180
+
164
181
  ## 🔗 Links
165
182
 
166
183
  | Resource | URL |
@@ -170,3 +187,4 @@ Try these from any connected MCP agent:
170
187
  | npm package | <https://www.npmjs.com/package/@dynamoi/mcp> |
171
188
  | Repository | <https://github.com/getDynamoi/mcp> |
172
189
  | Changelog | [CHANGELOG.md](./CHANGELOG.md) |
190
+ | Capability parity map | [CAPABILITY_PARITY.md](./CAPABILITY_PARITY.md) |
@@ -5,18 +5,47 @@ type ProtectedResourceMetadata = {
5
5
  resource_documentation?: string;
6
6
  scopes_supported: string[];
7
7
  };
8
- declare const DYNAMOI_MCP_SCOPES: readonly ["email", "profile"];
9
- declare function buildProtectedResourceMetadata(options: {
8
+ export declare const DYNAMOI_BETTER_AUTH_MCP_SCOPES: readonly ["dynamoi:read", "dynamoi:billing.read", "dynamoi:campaign.launch", "dynamoi:campaign.write", "dynamoi:distribution.apply", "dynamoi:distribution.read", "dynamoi:platform.read", "dynamoi:platform.write", "dynamoi:smart_links.write"];
9
+ /** @deprecated Use DYNAMOI_BETTER_AUTH_MCP_SCOPES. */
10
+ export declare const DYNAMOI_MCP_SCOPES: readonly ["dynamoi:read", "dynamoi:billing.read", "dynamoi:campaign.launch", "dynamoi:campaign.write", "dynamoi:distribution.apply", "dynamoi:distribution.read", "dynamoi:platform.read", "dynamoi:platform.write", "dynamoi:smart_links.write"];
11
+ export declare const DYNAMOI_MCP_TOOL_SCOPES: {
12
+ readonly dynamoi_create_smart_link_from_spotify: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
13
+ readonly dynamoi_create_smart_links_from_spotify_artist: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
14
+ readonly dynamoi_get_account_overview: readonly ["dynamoi:read"];
15
+ readonly dynamoi_get_artist_analytics: readonly ["dynamoi:read"];
16
+ readonly dynamoi_get_billing: readonly ["dynamoi:read", "dynamoi:billing.read"];
17
+ readonly dynamoi_get_campaign: readonly ["dynamoi:read"];
18
+ readonly dynamoi_get_campaign_readiness: readonly ["dynamoi:read"];
19
+ readonly dynamoi_get_distribution_application: readonly ["dynamoi:read", "dynamoi:distribution.read"];
20
+ readonly dynamoi_get_platform_status: readonly ["dynamoi:read", "dynamoi:platform.read"];
21
+ readonly dynamoi_get_smart_link: readonly ["dynamoi:read"];
22
+ readonly dynamoi_launch_campaign: readonly ["dynamoi:read", "dynamoi:campaign.launch"];
23
+ readonly dynamoi_apply_for_distribution: readonly ["dynamoi:read", "dynamoi:distribution.apply"];
24
+ readonly dynamoi_list_artists: readonly ["dynamoi:read"];
25
+ readonly dynamoi_list_available_countries: readonly ["dynamoi:read"];
26
+ readonly dynamoi_list_campaigns: readonly ["dynamoi:read"];
27
+ readonly dynamoi_list_media_assets: readonly ["dynamoi:read"];
28
+ readonly dynamoi_list_smart_links: readonly ["dynamoi:read"];
29
+ readonly dynamoi_preview_smart_link_themes: readonly ["dynamoi:read"];
30
+ readonly dynamoi_search: readonly ["dynamoi:read"];
31
+ readonly dynamoi_start_meta_connection: readonly ["dynamoi:read", "dynamoi:platform.write"];
32
+ readonly dynamoi_start_youtube_channel_link: readonly ["dynamoi:read", "dynamoi:platform.write"];
33
+ readonly dynamoi_update_campaign: readonly ["dynamoi:read", "dynamoi:campaign.write"];
34
+ readonly dynamoi_update_smart_link: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
35
+ readonly fetch: readonly ["dynamoi:read"];
36
+ readonly search: readonly ["dynamoi:read"];
37
+ };
38
+ export declare function buildProtectedResourceMetadata(options: {
10
39
  resource: string;
11
40
  authorizationServers: string[];
12
41
  resourceDocumentation?: string;
13
42
  scopesSupported?: string[];
14
43
  }): ProtectedResourceMetadata;
15
- declare function buildWwwAuthenticateHeader(options: {
44
+ export declare function buildWwwAuthenticateHeader(options: {
16
45
  resourceMetadataUrl: string;
17
46
  errorDescription?: string;
18
47
  error?: "insufficient_scope" | "invalid_token";
19
48
  scope?: string;
20
49
  }): string;
21
-
22
- export { DYNAMOI_MCP_SCOPES, buildProtectedResourceMetadata, buildWwwAuthenticateHeader };
50
+ export {};
51
+ //# sourceMappingURL=protected-resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protected-resource.d.ts","sourceRoot":"","sources":["../../../src/auth/protected-resource.ts"],"names":[],"mappings":"AAAA,KAAK,yBAAyB,GAAG;IAChC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,wBAAwB,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,8BAA8B,YAC1C,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,CAClB,CAAC;AACX,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,mPAAiC,CAAC;AACjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCkB,CAAC;AAEvD,wBAAgB,8BAA8B,CAAC,OAAO,EAAE;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,yBAAyB,CAa5B;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,oBAAoB,GAAG,eAAe,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAgBT"}
@@ -1,11 +1,17 @@
1
1
  import {
2
+ DYNAMOI_BETTER_AUTH_MCP_SCOPES,
2
3
  DYNAMOI_MCP_SCOPES,
4
+ DYNAMOI_MCP_TOOL_SCOPES,
3
5
  buildProtectedResourceMetadata,
4
6
  buildWwwAuthenticateHeader
5
- } from "../chunk-CHQUK72A.js";
7
+ } from "../chunk-2jm8hjsz.js";
6
8
  export {
7
- DYNAMOI_MCP_SCOPES,
9
+ buildWwwAuthenticateHeader,
8
10
  buildProtectedResourceMetadata,
9
- buildWwwAuthenticateHeader
11
+ DYNAMOI_MCP_TOOL_SCOPES,
12
+ DYNAMOI_MCP_SCOPES,
13
+ DYNAMOI_BETTER_AUTH_MCP_SCOPES
10
14
  };
11
- //# sourceMappingURL=protected-resource.js.map
15
+
16
+ //# debugId=9BBF6C6C05D5C09964756E2164756E21
17
+ //# sourceMappingURL=protected-resource.js.map
@@ -1 +1,9 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [
5
+ ],
6
+ "mappings": "",
7
+ "debugId": "9BBF6C6C05D5C09964756E2164756E21",
8
+ "names": []
9
+ }
@@ -0,0 +1,21 @@
1
+ type VerifiedAccessToken = {
2
+ sub: string;
3
+ iss: string;
4
+ aud: string | string[] | undefined;
5
+ exp: number;
6
+ grantId: string | null;
7
+ clientId: string | null;
8
+ jti: string | null;
9
+ scopes: string[];
10
+ sessionId: string | null;
11
+ };
12
+ type VerifyAccessTokenOptions = {
13
+ algorithms?: Array<"ES256" | "RS256">;
14
+ token: string;
15
+ jwksUrl: string;
16
+ issuer: string;
17
+ audienceAllowlist: string[];
18
+ };
19
+ export declare function verifyAccessToken(options: VerifyAccessTokenOptions): Promise<VerifiedAccessToken>;
20
+ export {};
21
+ //# sourceMappingURL=verify-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-token.d.ts","sourceRoot":"","sources":["../../../src/auth/verify-token.ts"],"names":[],"mappings":"AAEA,KAAK,mBAAmB,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA4CF,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CAmC9B"}
@@ -0,0 +1,96 @@
1
+ // src/auth/protected-resource.ts
2
+ var DYNAMOI_BETTER_AUTH_MCP_SCOPES = [
3
+ "dynamoi:read",
4
+ "dynamoi:billing.read",
5
+ "dynamoi:campaign.launch",
6
+ "dynamoi:campaign.write",
7
+ "dynamoi:distribution.apply",
8
+ "dynamoi:distribution.read",
9
+ "dynamoi:platform.read",
10
+ "dynamoi:platform.write",
11
+ "dynamoi:smart_links.write"
12
+ ];
13
+ var DYNAMOI_MCP_SCOPES = DYNAMOI_BETTER_AUTH_MCP_SCOPES;
14
+ var DYNAMOI_MCP_TOOL_SCOPES = {
15
+ dynamoi_create_smart_link_from_spotify: [
16
+ "dynamoi:read",
17
+ "dynamoi:smart_links.write"
18
+ ],
19
+ dynamoi_create_smart_links_from_spotify_artist: [
20
+ "dynamoi:read",
21
+ "dynamoi:smart_links.write"
22
+ ],
23
+ dynamoi_get_account_overview: ["dynamoi:read"],
24
+ dynamoi_get_artist_analytics: ["dynamoi:read"],
25
+ dynamoi_get_billing: ["dynamoi:read", "dynamoi:billing.read"],
26
+ dynamoi_get_campaign: ["dynamoi:read"],
27
+ dynamoi_get_campaign_readiness: ["dynamoi:read"],
28
+ dynamoi_get_distribution_application: [
29
+ "dynamoi:read",
30
+ "dynamoi:distribution.read"
31
+ ],
32
+ dynamoi_get_platform_status: ["dynamoi:read", "dynamoi:platform.read"],
33
+ dynamoi_get_smart_link: ["dynamoi:read"],
34
+ dynamoi_launch_campaign: ["dynamoi:read", "dynamoi:campaign.launch"],
35
+ dynamoi_apply_for_distribution: [
36
+ "dynamoi:read",
37
+ "dynamoi:distribution.apply"
38
+ ],
39
+ dynamoi_list_artists: ["dynamoi:read"],
40
+ dynamoi_list_available_countries: ["dynamoi:read"],
41
+ dynamoi_list_campaigns: ["dynamoi:read"],
42
+ dynamoi_list_media_assets: ["dynamoi:read"],
43
+ dynamoi_list_smart_links: ["dynamoi:read"],
44
+ dynamoi_preview_smart_link_themes: ["dynamoi:read"],
45
+ dynamoi_search: ["dynamoi:read"],
46
+ dynamoi_start_meta_connection: ["dynamoi:read", "dynamoi:platform.write"],
47
+ dynamoi_start_youtube_channel_link: [
48
+ "dynamoi:read",
49
+ "dynamoi:platform.write"
50
+ ],
51
+ dynamoi_update_campaign: ["dynamoi:read", "dynamoi:campaign.write"],
52
+ dynamoi_update_smart_link: ["dynamoi:read", "dynamoi:smart_links.write"],
53
+ fetch: ["dynamoi:read"],
54
+ search: ["dynamoi:read"]
55
+ };
56
+ function buildProtectedResourceMetadata(options) {
57
+ const metadata = {
58
+ authorization_servers: options.authorizationServers,
59
+ bearer_methods_supported: ["header"],
60
+ resource: options.resource,
61
+ scopes_supported: options.scopesSupported ?? [
62
+ ...DYNAMOI_BETTER_AUTH_MCP_SCOPES
63
+ ]
64
+ };
65
+ if (options.resourceDocumentation) {
66
+ metadata.resource_documentation = options.resourceDocumentation;
67
+ }
68
+ return metadata;
69
+ }
70
+ function buildWwwAuthenticateHeader(options) {
71
+ const scope = options.scope ?? "dynamoi:read";
72
+ const error = options.error ?? "invalid_token";
73
+ const errorDescription = options.errorDescription ?? (error === "insufficient_scope" ? "Additional Dynamoi permissions are required." : "Sign in to Dynamoi to continue.");
74
+ const params = [
75
+ `resource_metadata="${escapeHeaderValue(options.resourceMetadataUrl)}"`,
76
+ `scope="${escapeHeaderValue(scope)}"`,
77
+ `error="${escapeHeaderValue(error)}"`,
78
+ `error_description="${escapeHeaderValue(errorDescription)}"`
79
+ ];
80
+ return `Bearer ${params.join(", ")}`;
81
+ }
82
+ function escapeHeaderValue(value) {
83
+ const containsControlCharacter = Array.from(value).some((character) => {
84
+ const codePoint = character.codePointAt(0) ?? 0;
85
+ return codePoint <= 31 || codePoint === 127;
86
+ });
87
+ if (containsControlCharacter) {
88
+ throw new Error("WWW-Authenticate values cannot contain control characters.");
89
+ }
90
+ return value.replaceAll("\\", "\\\\").replaceAll('"', "\\\"");
91
+ }
92
+
93
+ export { DYNAMOI_BETTER_AUTH_MCP_SCOPES, DYNAMOI_MCP_SCOPES, DYNAMOI_MCP_TOOL_SCOPES, buildProtectedResourceMetadata, buildWwwAuthenticateHeader };
94
+
95
+ //# debugId=269E277FE47A8BBF64756E2164756E21
96
+ //# sourceMappingURL=chunk-2jm8hjsz.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/auth/protected-resource.ts"],
4
+ "sourcesContent": [
5
+ "type ProtectedResourceMetadata = {\n\tauthorization_servers: string[];\n\tbearer_methods_supported: [\"header\"];\n\tresource: string;\n\tresource_documentation?: string;\n\tscopes_supported: string[];\n};\n\nexport const DYNAMOI_BETTER_AUTH_MCP_SCOPES = [\n\t\"dynamoi:read\",\n\t\"dynamoi:billing.read\",\n\t\"dynamoi:campaign.launch\",\n\t\"dynamoi:campaign.write\",\n\t\"dynamoi:distribution.apply\",\n\t\"dynamoi:distribution.read\",\n\t\"dynamoi:platform.read\",\n\t\"dynamoi:platform.write\",\n\t\"dynamoi:smart_links.write\",\n] as const;\n/** @deprecated Use DYNAMOI_BETTER_AUTH_MCP_SCOPES. */\nexport const DYNAMOI_MCP_SCOPES = DYNAMOI_BETTER_AUTH_MCP_SCOPES;\nexport const DYNAMOI_MCP_TOOL_SCOPES = {\n\tdynamoi_create_smart_link_from_spotify: [\n\t\t\"dynamoi:read\",\n\t\t\"dynamoi:smart_links.write\",\n\t],\n\tdynamoi_create_smart_links_from_spotify_artist: [\n\t\t\"dynamoi:read\",\n\t\t\"dynamoi:smart_links.write\",\n\t],\n\tdynamoi_get_account_overview: [\"dynamoi:read\"],\n\tdynamoi_get_artist_analytics: [\"dynamoi:read\"],\n\tdynamoi_get_billing: [\"dynamoi:read\", \"dynamoi:billing.read\"],\n\tdynamoi_get_campaign: [\"dynamoi:read\"],\n\tdynamoi_get_campaign_readiness: [\"dynamoi:read\"],\n\tdynamoi_get_distribution_application: [\n\t\t\"dynamoi:read\",\n\t\t\"dynamoi:distribution.read\",\n\t],\n\tdynamoi_get_platform_status: [\"dynamoi:read\", \"dynamoi:platform.read\"],\n\tdynamoi_get_smart_link: [\"dynamoi:read\"],\n\tdynamoi_launch_campaign: [\"dynamoi:read\", \"dynamoi:campaign.launch\"],\n\tdynamoi_apply_for_distribution: [\n\t\t\"dynamoi:read\",\n\t\t\"dynamoi:distribution.apply\",\n\t],\n\tdynamoi_list_artists: [\"dynamoi:read\"],\n\tdynamoi_list_available_countries: [\"dynamoi:read\"],\n\tdynamoi_list_campaigns: [\"dynamoi:read\"],\n\tdynamoi_list_media_assets: [\"dynamoi:read\"],\n\tdynamoi_list_smart_links: [\"dynamoi:read\"],\n\tdynamoi_preview_smart_link_themes: [\"dynamoi:read\"],\n\tdynamoi_search: [\"dynamoi:read\"],\n\tdynamoi_start_meta_connection: [\"dynamoi:read\", \"dynamoi:platform.write\"],\n\tdynamoi_start_youtube_channel_link: [\n\t\t\"dynamoi:read\",\n\t\t\"dynamoi:platform.write\",\n\t],\n\tdynamoi_update_campaign: [\"dynamoi:read\", \"dynamoi:campaign.write\"],\n\tdynamoi_update_smart_link: [\"dynamoi:read\", \"dynamoi:smart_links.write\"],\n\tfetch: [\"dynamoi:read\"],\n\tsearch: [\"dynamoi:read\"],\n} as const satisfies Record<string, readonly string[]>;\n\nexport function buildProtectedResourceMetadata(options: {\n\tresource: string;\n\tauthorizationServers: string[];\n\tresourceDocumentation?: string;\n\tscopesSupported?: string[];\n}): ProtectedResourceMetadata {\n\tconst metadata: ProtectedResourceMetadata = {\n\t\tauthorization_servers: options.authorizationServers,\n\t\tbearer_methods_supported: [\"header\"],\n\t\tresource: options.resource,\n\t\tscopes_supported: options.scopesSupported ?? [\n\t\t\t...DYNAMOI_BETTER_AUTH_MCP_SCOPES,\n\t\t],\n\t};\n\tif (options.resourceDocumentation) {\n\t\tmetadata.resource_documentation = options.resourceDocumentation;\n\t}\n\treturn metadata;\n}\n\nexport function buildWwwAuthenticateHeader(options: {\n\tresourceMetadataUrl: string;\n\terrorDescription?: string;\n\terror?: \"insufficient_scope\" | \"invalid_token\";\n\tscope?: string;\n}): string {\n\tconst scope = options.scope ?? \"dynamoi:read\";\n\tconst error = options.error ?? \"invalid_token\";\n\tconst errorDescription =\n\t\toptions.errorDescription ??\n\t\t(error === \"insufficient_scope\"\n\t\t\t? \"Additional Dynamoi permissions are required.\"\n\t\t\t: \"Sign in to Dynamoi to continue.\");\n\tconst params = [\n\t\t`resource_metadata=\"${escapeHeaderValue(options.resourceMetadataUrl)}\"`,\n\t\t`scope=\"${escapeHeaderValue(scope)}\"`,\n\t\t`error=\"${escapeHeaderValue(error)}\"`,\n\t\t`error_description=\"${escapeHeaderValue(errorDescription)}\"`,\n\t];\n\t// RFC 6750 style with resource metadata extension.\n\treturn `Bearer ${params.join(\", \")}`;\n}\n\nfunction escapeHeaderValue(value: string): string {\n\tconst containsControlCharacter = Array.from(value).some((character) => {\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\t\treturn codePoint <= 31 || codePoint === 127;\n\t});\n\tif (containsControlCharacter) {\n\t\tthrow new Error(\n\t\t\t\"WWW-Authenticate values cannot contain control characters.\",\n\t\t);\n\t}\n\treturn value.replaceAll(\"\\\\\", \"\\\\\\\\\").replaceAll('\"', '\\\\\"');\n}\n"
6
+ ],
7
+ "mappings": ";AAQO,IAAM,iCAAiC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEO,IAAM,qBAAqB;AAC3B,IAAM,0BAA0B;AAAA,EACtC,wCAAwC;AAAA,IACvC;AAAA,IACA;AAAA,EACD;AAAA,EACA,gDAAgD;AAAA,IAC/C;AAAA,IACA;AAAA,EACD;AAAA,EACA,8BAA8B,CAAC,cAAc;AAAA,EAC7C,8BAA8B,CAAC,cAAc;AAAA,EAC7C,qBAAqB,CAAC,gBAAgB,sBAAsB;AAAA,EAC5D,sBAAsB,CAAC,cAAc;AAAA,EACrC,gCAAgC,CAAC,cAAc;AAAA,EAC/C,sCAAsC;AAAA,IACrC;AAAA,IACA;AAAA,EACD;AAAA,EACA,6BAA6B,CAAC,gBAAgB,uBAAuB;AAAA,EACrE,wBAAwB,CAAC,cAAc;AAAA,EACvC,yBAAyB,CAAC,gBAAgB,yBAAyB;AAAA,EACnE,gCAAgC;AAAA,IAC/B;AAAA,IACA;AAAA,EACD;AAAA,EACA,sBAAsB,CAAC,cAAc;AAAA,EACrC,kCAAkC,CAAC,cAAc;AAAA,EACjD,wBAAwB,CAAC,cAAc;AAAA,EACvC,2BAA2B,CAAC,cAAc;AAAA,EAC1C,0BAA0B,CAAC,cAAc;AAAA,EACzC,mCAAmC,CAAC,cAAc;AAAA,EAClD,gBAAgB,CAAC,cAAc;AAAA,EAC/B,+BAA+B,CAAC,gBAAgB,wBAAwB;AAAA,EACxE,oCAAoC;AAAA,IACnC;AAAA,IACA;AAAA,EACD;AAAA,EACA,yBAAyB,CAAC,gBAAgB,wBAAwB;AAAA,EAClE,2BAA2B,CAAC,gBAAgB,2BAA2B;AAAA,EACvE,OAAO,CAAC,cAAc;AAAA,EACtB,QAAQ,CAAC,cAAc;AACxB;AAEO,SAAS,8BAA8B,CAAC,SAKjB;AAAA,EAC7B,MAAM,WAAsC;AAAA,IAC3C,uBAAuB,QAAQ;AAAA,IAC/B,0BAA0B,CAAC,QAAQ;AAAA,IACnC,UAAU,QAAQ;AAAA,IAClB,kBAAkB,QAAQ,mBAAmB;AAAA,MAC5C,GAAG;AAAA,IACJ;AAAA,EACD;AAAA,EACA,IAAI,QAAQ,uBAAuB;AAAA,IAClC,SAAS,yBAAyB,QAAQ;AAAA,EAC3C;AAAA,EACA,OAAO;AAAA;AAGD,SAAS,0BAA0B,CAAC,SAKhC;AAAA,EACV,MAAM,QAAQ,QAAQ,SAAS;AAAA,EAC/B,MAAM,QAAQ,QAAQ,SAAS;AAAA,EAC/B,MAAM,mBACL,QAAQ,qBACP,UAAU,uBACR,iDACA;AAAA,EACJ,MAAM,SAAS;AAAA,IACd,sBAAsB,kBAAkB,QAAQ,mBAAmB;AAAA,IACnE,UAAU,kBAAkB,KAAK;AAAA,IACjC,UAAU,kBAAkB,KAAK;AAAA,IACjC,sBAAsB,kBAAkB,gBAAgB;AAAA,EACzD;AAAA,EAEA,OAAO,UAAU,OAAO,KAAK,IAAI;AAAA;AAGlC,SAAS,iBAAiB,CAAC,OAAuB;AAAA,EACjD,MAAM,2BAA2B,MAAM,KAAK,KAAK,EAAE,KAAK,CAAC,cAAc;AAAA,IACtE,MAAM,YAAY,UAAU,YAAY,CAAC,KAAK;AAAA,IAC9C,OAAO,aAAa,MAAM,cAAc;AAAA,GACxC;AAAA,EACD,IAAI,0BAA0B;AAAA,IAC7B,MAAM,IAAI,MACT,4DACD;AAAA,EACD;AAAA,EACA,OAAO,MAAM,WAAW,MAAM,MAAM,EAAE,WAAW,KAAK,MAAK;AAAA;",
8
+ "debugId": "269E277FE47A8BBF64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,9 @@
1
+ // src/consent.ts
2
+ var PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION = "managed-ads-prospective-daily-v1";
3
+ var PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY = "Authorize automatic card funding for this campaign's requested approximately 24-hour daily budget.";
4
+ var PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH = "36efa2138175fe14ec7b104d6f240bdce89d21b86ffccbd9f968100c50123e15";
5
+
6
+ export { PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION, PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY, PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH };
7
+
8
+ //# debugId=7CFA96341B1D2ABC64756E2164756E21
9
+ //# sourceMappingURL=chunk-kb3xpcrb.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/consent.ts"],
4
+ "sourcesContent": [
5
+ "export const PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION =\n\t\"managed-ads-prospective-daily-v1\";\nexport const PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY =\n\t\"Authorize automatic card funding for this campaign's requested approximately 24-hour daily budget.\";\nexport const PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH =\n\t\"36efa2138175fe14ec7b104d6f240bdce89d21b86ffccbd9f968100c50123e15\";\n"
6
+ ],
7
+ "mappings": ";AAAO,IAAM,6CACZ;AACM,IAAM,0CACZ;AACM,IAAM,+CACZ;",
8
+ "debugId": "7CFA96341B1D2ABC64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare const PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION = "managed-ads-prospective-daily-v1";
2
+ export declare const PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY = "Authorize automatic card funding for this campaign's requested approximately 24-hour daily budget.";
3
+ export declare const PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH = "36efa2138175fe14ec7b104d6f240bdce89d21b86ffccbd9f968100c50123e15";
4
+ //# sourceMappingURL=consent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../../src/consent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0CAA0C,qCACpB,CAAC;AACpC,eAAO,MAAM,uCAAuC,uGACiD,CAAC;AACtG,eAAO,MAAM,4CAA4C,qEACU,CAAC"}
@@ -0,0 +1,13 @@
1
+ import {
2
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY,
3
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
4
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION
5
+ } from "./chunk-kb3xpcrb.js";
6
+ export {
7
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION,
8
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
9
+ PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY
10
+ };
11
+
12
+ //# debugId=FD7B0090CB8A7ACF64756E2164756E21
13
+ //# sourceMappingURL=consent.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [
5
+ ],
6
+ "mappings": "",
7
+ "debugId": "FD7B0090CB8A7ACF64756E2164756E21",
8
+ "names": []
9
+ }
@@ -0,0 +1,160 @@
1
+ import type { ArtistTier, BillingStatus, CampaignDisplayStatus, CampaignType, MoneyDisplay } from "./types";
2
+ export type GetBillingData = {
3
+ tier: ArtistTier;
4
+ billingStatus: BillingStatus;
5
+ creditBalance: MoneyDisplay | null;
6
+ recentUsage?: {
7
+ period: string;
8
+ totalSpend: MoneyDisplay;
9
+ campaignCount: number;
10
+ };
11
+ isPromoArtist: boolean;
12
+ promoLimits?: {
13
+ campaignsUsed: number;
14
+ campaignsAllowed: number;
15
+ remainingBudget: MoneyDisplay;
16
+ };
17
+ warnings?: string[];
18
+ actionRequired?: string[];
19
+ };
20
+ export type GetBillingSummaryData = {
21
+ summary: string;
22
+ warnings?: string[];
23
+ actionRequired?: string[];
24
+ };
25
+ export type GetPlatformStatusData = {
26
+ platforms: {
27
+ spotify: {
28
+ connected: boolean;
29
+ artistName?: string;
30
+ artistUrl?: string;
31
+ };
32
+ meta: {
33
+ connected: boolean;
34
+ status: "not_connected" | "oauth_complete" | "selection_pending" | "partnership_pending" | "partnership_active";
35
+ pageName?: string;
36
+ tokenExpiresAt?: string;
37
+ isTokenExpired?: boolean;
38
+ };
39
+ youtube: {
40
+ connected: boolean;
41
+ channelName?: string;
42
+ channelUrl?: string;
43
+ };
44
+ };
45
+ onboardingComplete: boolean;
46
+ missingForSmartCampaign: string[];
47
+ missingForYouTube: string[];
48
+ warnings?: string[];
49
+ actionRequired?: string[];
50
+ };
51
+ export type GetPlatformStatusSummaryData = {
52
+ summary: string;
53
+ warnings?: string[];
54
+ actionRequired?: string[];
55
+ };
56
+ export type StartYoutubeChannelLinkData = {
57
+ artistId: string;
58
+ artistName: string;
59
+ purpose: "advertising" | "distribution_identity";
60
+ onboardingAttemptId: string;
61
+ authorizationUrl: string;
62
+ expiresAt: string;
63
+ completionCheck: {
64
+ pollTools: string[];
65
+ onboardingFlow: "youtube";
66
+ connectedFlag: "platforms.youtube.connected";
67
+ readyValue: true;
68
+ } | {
69
+ pollTools: string[];
70
+ requirementKey: "youtube_identity";
71
+ readyValue: true;
72
+ };
73
+ nextActions: string[];
74
+ summary: string;
75
+ warnings?: string[];
76
+ actionRequired?: string[];
77
+ };
78
+ export type StartMetaConnectionData = {
79
+ artistId: string;
80
+ artistName: string;
81
+ purpose: "advertising" | "distribution_identity";
82
+ onboardingAttemptId: string | null;
83
+ status: "authorization_url" | "already_connected" | "billing_check_unavailable" | "billing_required";
84
+ authorizationUrl: string | null;
85
+ expiresAt: string | null;
86
+ completionCheck: {
87
+ pollTools: string[];
88
+ onboardingFlow: "meta";
89
+ connectedFlag: "platforms.meta.connected";
90
+ statusField: "platforms.meta.status";
91
+ readyStatuses: Array<"oauth_complete" | "partnership_pending" | "partnership_active">;
92
+ } | {
93
+ pollTools: string[];
94
+ requirementKey: "meta_identity";
95
+ readyValue: true;
96
+ };
97
+ nextActions: string[];
98
+ summary: string;
99
+ warnings?: string[];
100
+ actionRequired?: string[];
101
+ };
102
+ export type PauseResumePlatformResult = {
103
+ platform: "META" | "GOOGLE";
104
+ success: boolean;
105
+ message?: string;
106
+ };
107
+ export type PauseResumeCampaignData = {
108
+ id: string;
109
+ contentTitle: string;
110
+ newStatus: "PAUSED" | "ACTIVE";
111
+ platformResults: PauseResumePlatformResult[];
112
+ warnings?: string[];
113
+ actionRequired?: string[];
114
+ };
115
+ export type UpdateBudgetData = {
116
+ id: string;
117
+ contentTitle: string;
118
+ previousBudget: MoneyDisplay;
119
+ newBudget: MoneyDisplay;
120
+ budgetType: "DAILY" | "TOTAL";
121
+ endDate?: string;
122
+ warnings?: string[];
123
+ actionRequired?: string[];
124
+ };
125
+ export type UpdateCampaignData = PauseResumeCampaignData | UpdateBudgetData;
126
+ export type MediaAssetSummary = {
127
+ id: string;
128
+ url?: string;
129
+ urlExpiresAt?: string;
130
+ fileType: string;
131
+ fileName?: string;
132
+ width?: number;
133
+ height?: number;
134
+ aspectRatio?: string;
135
+ createdAt: string;
136
+ };
137
+ export type ListMediaAssetsData = {
138
+ assets: MediaAssetSummary[];
139
+ nextCursor?: string;
140
+ };
141
+ export type ListMediaAssetsSummaryData = {
142
+ summary: string;
143
+ totalCount: number;
144
+ nextCursor?: string;
145
+ };
146
+ export type LaunchCampaignData = {
147
+ summary: string;
148
+ id: string;
149
+ contentTitle: string;
150
+ campaignType: CampaignType;
151
+ status: CampaignDisplayStatus;
152
+ budget: MoneyDisplay;
153
+ budgetType: "DAILY" | "TOTAL";
154
+ platforms: string[];
155
+ deliveryState: "ACTIVE" | "PENDING_REVIEW" | "CONTENT_VALIDATION";
156
+ isLive: boolean;
157
+ nextSteps: string[];
158
+ warnings?: string[];
159
+ };
160
+ //# sourceMappingURL=flow-types.d.ts.map