picked 0.0.116-next.1 → 0.0.116-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,13 +131,14 @@ documentation uses, and it names the others.
131
131
 
132
132
  ## APIs and analytics
133
133
 
134
- | Term | What it is |
135
- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
- | **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
137
- | **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
138
- | **Preview token** | A token that lets a Delivery API request read unpublished content. |
139
- | **Report** | An embedded analytics dashboard or question, attached to a project. |
140
- | **User ID** | Your own ID for a visitor, such as the ID of their account. The GTM template sends it in the `user_id` field of the `session` context. It is not the visitor ID (`Lead.userId`). |
134
+ | Term | What it is |
135
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | **Default Reports** | The Leads and Sessions reports that Picked Analytics keeps for each project. A project sets a mode for each area: `AUTOMATIC` (Leads only: applies when the project has a lead), `ON`, or `OFF`. The API field is `Project.defaultReports`. |
137
+ | **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
138
+ | **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
139
+ | **Preview token** | A token that lets a Delivery API request read unpublished content. |
140
+ | **Report** | An embedded analytics dashboard or question, attached to a project. |
141
+ | **User ID** | Your own ID for a visitor, such as the ID of their account. The GTM template sends it in the `user_id` field of the `session` context. It is not the visitor ID (`Lead.userId`). |
141
142
 
142
143
  ## Tools
143
144
 
@@ -147,6 +147,11 @@ type Project {
147
147
  Picked's AI agents read it when they query or explain analytics. Null until set.
148
148
  """
149
149
  analyticsContext: String
150
+ """
151
+ The project's Default Reports: for each area, its mode and whether its reports apply.
152
+ Scope: `ORGANIZATION_PROJECTS_READ`.
153
+ """
154
+ defaultReports: DefaultReports! @auth
150
155
  """The organization the project belongs to."""
151
156
  organization: Organization!
152
157
  """
@@ -252,7 +257,7 @@ type Project {
252
257
  """
253
258
  The Leads reports on the project, in order: how leads are acquired, the journeys behind them,
254
259
  and how visits convert to leads. Each is a signed embed URL locked to the project, with an
255
- editable date range.
260
+ editable date range. Empty when the Leads Default Reports do not apply to the project.
256
261
  Scope: `ORGANIZATION_SESSIONS_READ`.
257
262
  """
258
263
  leadReports: [LeadReport!]! @auth
@@ -276,7 +281,7 @@ type Project {
276
281
  """
277
282
  The Sessions reports on the project, in order: how its sessions arrive, the journeys they take,
278
283
  and which of them convert. Each is a signed embed URL locked to the project, with an editable
279
- date range.
284
+ date range. Empty when the Sessions Default Reports do not apply to the project.
280
285
  Scope: `ORGANIZATION_SESSIONS_READ`.
281
286
  """
282
287
  analyticsSessionsReports: [AnalyticsSessionsReport!]! @auth
@@ -612,6 +617,67 @@ type ProjectCreatePayload {
612
617
  }
613
618
  ```
614
619
 
620
+ ### `DefaultReports`
621
+
622
+ ```graphql
623
+ """
624
+ The built-in Leads and Sessions reports Picked Analytics keeps for every project, and which of them
625
+ apply to one project.
626
+ """
627
+ type DefaultReports {
628
+ """
629
+ The Leads reports: how leads are acquired, the journeys behind them and how visits convert.
630
+ """
631
+ leads: DefaultReportsArea!
632
+ """
633
+ The Sessions reports: how sessions arrive, the journeys they take and which of them convert.
634
+ """
635
+ sessions: DefaultReportsArea!
636
+ }
637
+ ```
638
+
639
+ ### `DefaultReportsArea`
640
+
641
+ ```graphql
642
+ """
643
+ One area of a project's Default Reports: its mode and whether its reports apply.
644
+ """
645
+ type DefaultReportsArea {
646
+ """The mode the project sets for the area."""
647
+ mode: DefaultReportsMode!
648
+ """Whether the area's reports apply to the project."""
649
+ applies: Boolean!
650
+ }
651
+ ```
652
+
653
+ ### `DefaultReportsMode`
654
+
655
+ ```graphql
656
+ """Whether an area of the Default Reports applies to a project."""
657
+ enum DefaultReportsMode {
658
+ """Applies once the project holds a lead. Leads only."""
659
+ AUTOMATIC
660
+ """Always applies."""
661
+ ON
662
+ """Never applies."""
663
+ OFF
664
+ }
665
+ ```
666
+
667
+ ### `DefaultReportsInput`
668
+
669
+ ```graphql
670
+ """
671
+ The input of `projectUpdate`'s `defaultReports`. Omit a field to keep its value.
672
+ """
673
+ input DefaultReportsInput {
674
+ """The Leads mode."""
675
+ leads: DefaultReportsMode
676
+ """The Sessions mode. `AUTOMATIC` is rejected."""
677
+ sessions: DefaultReportsMode
678
+ }
679
+ ```
680
+
615
681
  ### `ProjectUpdateInput`
616
682
 
617
683
  ```graphql
@@ -625,6 +691,8 @@ input ProjectUpdateInput {
625
691
  context: String
626
692
  """The project analytics brief in Markdown. An empty string clears it."""
627
693
  analyticsContext: String
694
+ """The modes of the project's Default Reports."""
695
+ defaultReports: DefaultReportsInput
628
696
  }
629
697
  ```
630
698
 
@@ -59,8 +59,10 @@ have permission to edit project settings.
59
59
  #### `get_project_settings`
60
60
 
61
61
  Gives the name, the time zone, and the stored settings of a project. Also gives the country where
62
- the project keeps its analytics data, and the link to the project settings page. You change the
63
- settings in the dashboard.
62
+ the project keeps its analytics data, the Default Reports of the project, and the link to the
63
+ project settings page. For each Default Reports area (Leads and Sessions), it gives the mode
64
+ (`AUTOMATIC`, `ON`, or `OFF`) and if the area applies to the project. You change the settings in
65
+ the dashboard.
64
66
 
65
67
  #### `guide_create_organisation`
66
68
 
@@ -453,12 +455,14 @@ queries by `project_id`. You must have the reports read permission on the organi
453
455
 
454
456
  #### `list_analytics_reports`
455
457
 
456
- Lists the analytics reports of a project. The list starts with six reports:
457
- `Leads: Acquisition`, `Leads: Journeys`, `Leads: Conversion`, `Sessions: Acquisition`,
458
- `Sessions: Journeys`, and `Sessions: Conversion`. Then it has the other reports of the
459
- project.
458
+ Lists the analytics reports of a project. The list starts with the Default Reports that
459
+ apply to the project. When Leads applies, these are `Leads: Acquisition`, `Leads: Journeys`,
460
+ and `Leads: Conversion`. When Sessions applies, these are `Sessions: Acquisition`,
461
+ `Sessions: Journeys`, and `Sessions: Conversion`. Then the list has the other reports of the
462
+ project. To see which Default
463
+ Reports apply, use `get_project_settings`.
460
464
 
461
- Each report has its ID and the parameters that limit its data. The six reports above set
465
+ Each report has its ID and the parameters that limit its data. The Default Reports set
462
466
  `project_id` to the ID of the project. The other reports have only the parameters that a
463
467
  user set for them with `lockedParameters` in `reportCreate` or `reportUpdate`. A report can
464
468
  have no parameters.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "picked",
3
3
  "description": "The Picked SDK front door: the client, the picked.config helpers, and the picked CLI in one install",
4
- "version": "0.0.116-next.1",
4
+ "version": "0.0.116-next.2",
5
5
  "bin": {
6
6
  "picked": "dist/esm/bin.js"
7
7
  },
8
8
  "dependencies": {
9
- "@picked/cli": "0.0.116-next.1",
10
- "@picked/config": "0.0.116-next.1"
9
+ "@picked/cli": "0.0.116-next.2",
10
+ "@picked/config": "0.0.116-next.2"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@picked/client": "workspace:*",
@@ -64,7 +64,7 @@
64
64
  "main": "./dist/cjs/index.js",
65
65
  "module": "./dist/esm/index.js",
66
66
  "peerDependencies": {
67
- "@picked/client": "0.0.116-next.1"
67
+ "@picked/client": "0.0.116-next.2"
68
68
  },
69
69
  "private": false,
70
70
  "publishConfig": {