picked 0.0.110-next.1 → 0.0.111-next.1

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.
@@ -227,6 +227,16 @@ Some mutations do not require organization-level scopes because they operate on
227
227
  mutation removes every authenticator of a user and signs the user out everywhere, so
228
228
  their next sign-in starts at the setup.
229
229
 
230
+ You set the analytics scopes of a client manager in the `scopes` of `staffMemberInvite` or
231
+ `staffMemberUpdate`. To change them, you also need the root-level scope `analytics/admin`
232
+ (`ANALYTICS_ADMIN`). You cannot change your own analytics scopes.
233
+
234
+ A client manager with `ANALYTICS_ADMIN` signs in to Picked Analytics in the `Administrators`
235
+ group. A client manager with `ANALYTICS_DATA_ENGINEER` signs in to Picked Analytics in the
236
+ `Data Engineers` group. A staff member with the `ADMIN` role always signs in to Picked
237
+ Analytics in the `Administrators` group. The API ignores the analytics scopes that you give
238
+ for this staff member.
239
+
230
240
  ## Read your scopes
231
241
 
232
242
  ### Root-level scopes
@@ -209,6 +209,13 @@ enum Scope {
209
209
  USERS_RESET_MFA
210
210
  """Sign in to Picked Chat."""
211
211
  CHAT_USE
212
+ """
213
+ Administer Picked Analytics: sign in to Metabase in its `Administrators` group, and change
214
+ which analytics scopes other staff members hold.
215
+ """
216
+ ANALYTICS_ADMIN
217
+ """Sign in to Picked Analytics in its `Data Engineers` group."""
218
+ ANALYTICS_DATA_ENGINEER
212
219
  """Read a workspace's preview configuration."""
213
220
  ORGANIZATION_WORKSPACE_VERSION_READ
214
221
  """Read what a project serves to visitors, and run its actions."""
@@ -439,14 +439,88 @@ Gives the number of leads that match a search, and a link to the leads list in t
439
439
  dashboard. It does not give the leads. Use `list_lead_fields` first to get the fields
440
440
  that you can search by.
441
441
 
442
- ### Analytics reports
442
+ ### Analytics
443
+
444
+ The analytics tools read and save Picked Analytics data as your own analytics user. Each
445
+ tool takes a `project_id`. The project sets the organization. You see the data that
446
+ your analytics user can see, which is not only the data of that project. Filter your
447
+ queries by `project_id`. You must have the reports read permission on the organization.
443
448
 
444
449
  #### `list_analytics_reports`
445
450
 
446
- Lists the Metabase reports of a project: the Leads and Sessions dashboards, and the reports
447
- that you added to the project. Each report has its Metabase ID and the parameters that
448
- limit it to the project, for example `project_id`. To read the data, use the Metabase MCP
449
- server with the ID, and filter by all these parameters.
451
+ Lists the analytics reports of a project: the Leads and Sessions dashboards, and the
452
+ reports that you added to the project. Each report has its ID and the parameters that
453
+ limit it to the project, for example `project_id`. To read the data, use
454
+ `run_analytics_question` with the ID, and set all these parameters.
455
+
456
+ #### `search_analytics`
457
+
458
+ Finds tables, models, metrics, saved questions, dashboards, and collections. Give
459
+ search terms, a description in plain words, or both.
460
+
461
+ #### `browse_analytics_data`
462
+
463
+ Lists the databases, their schemas, tables, and models, and the fields of tables. A
464
+ query uses the names of tables and fields exactly as this tool gives them.
465
+
466
+ #### `browse_analytics_collections`
467
+
468
+ Lists the contents of a collection, or the tree of all the collections that you can
469
+ see.
470
+
471
+ #### `get_analytics_content`
472
+
473
+ Reads saved questions, models, metrics, dashboards, collections, and tables by their
474
+ IDs. Set `include_definition` to also get the query and parameters of a question, or
475
+ the parameters and cards of a dashboard.
476
+
477
+ #### `query_analytics`
478
+
479
+ Runs a structured query and gives the rows, 200 rows on each page. When there are more
480
+ rows, the result has a `continuation_token`. Send only this token to get the next page.
481
+ Read `get_schema_info` with the topic `analytics_query` for the query format.
482
+
483
+ #### `run_analytics_sql`
484
+
485
+ Runs SQL on a database and gives the rows. Use it only when `query_analytics` cannot
486
+ do the query. Your analytics user must have permission to write SQL on that database.
487
+
488
+ #### `run_analytics_question`
489
+
490
+ Runs a saved question and gives the rows. To run a card of a dashboard with the
491
+ filters of the dashboard, give `dashboard_id` and `dashcard_id`. You can set the value
492
+ of each parameter, but not the field that the parameter filters.
493
+
494
+ #### `get_analytics_parameter_values`
495
+
496
+ Gives the values that a parameter of a question or dashboard accepts.
497
+
498
+ #### `create_analytics_question`
499
+
500
+ Saves a structured query, or SQL with its `database_id`, as a question. If you do not
501
+ give a `collection_id`, the question goes in your personal collection.
502
+
503
+ #### `update_analytics_question`
504
+
505
+ Changes the fields of a saved question that you give. Set `archived` to `true` to
506
+ archive it, or to `false` to restore it.
507
+
508
+ #### `create_analytics_metric`
509
+
510
+ Saves a metric: a structured query with one aggregation. The query can have a maximum
511
+ of one date column that divides the result.
512
+
513
+ #### `update_analytics_metric`
514
+
515
+ Changes the fields of a saved metric that you give, or archives it.
516
+
517
+ #### `create_analytics_dashboard`
518
+
519
+ Makes a dashboard from saved questions, with headings and text.
520
+
521
+ #### `update_analytics_dashboard`
522
+
523
+ Changes the name, description, collection, or cards of a dashboard, or archives it.
450
524
 
451
525
  ### Publish
452
526
 
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.110-next.1",
4
+ "version": "0.0.111-next.1",
5
5
  "bin": {
6
6
  "picked": "dist/esm/bin.js"
7
7
  },
8
8
  "dependencies": {
9
- "@picked/cli": "0.0.110-next.1",
10
- "@picked/config": "0.0.110-next.1"
9
+ "@picked/cli": "0.0.111-next.1",
10
+ "@picked/config": "0.0.111-next.1"
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.110-next.1"
67
+ "@picked/client": "0.0.111-next.1"
68
68
  },
69
69
  "private": false,
70
70
  "publishConfig": {