File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "matches" : {
88 "sourceType" : {
99 "type" : " equals" ,
10- "value" : " Sanity Project "
10+ "value" : " Sanity Dataset "
1111 }
1212 },
1313 "config" : {
14- "baseUrl" : " https://{{object.rawId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
14+ "baseUrl" : " https://{{object.projectId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
1515 "httpMethod" : " get" ,
1616 "paging" : {
1717 "mode" : " none"
1818 },
19- "endpointPath" : " data/history/{{dataset }}/transactions" ,
19+ "endpointPath" : " data/history/{{object.datasetId }}/transactions" ,
2020 "getArgs" : [
2121 { "key" : " excludeContent" , "value" : " true" },
2222 { "key" : " reverse" , "value" : " true" },
2727 "headers" : [
2828 {
2929 "key" : " Authorization" ,
30- "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.rawId ) || {}).value }}"
30+ "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.projectId ) || {}).value }}"
3131 }
3232 ],
3333 "postRequestScript" : " changeHistory.js"
3434 },
35- "ui" : [
36- {
37- "type" : " text" ,
38- "name" : " dataset" ,
39- "label" : " Dataset" ,
40- "defaultValue" : " production" ,
41- "validation" : { "required" : true },
42- "help" : " The dataset to read change history from (e.g. production)."
43- }
44- ],
35+
4536 "metadata" : [
4637 {
4738 "name" : " timestamp" ,
Original file line number Diff line number Diff line change 77 "matches" : {
88 "sourceType" : {
99 "type" : " equals" ,
10- "value" : " Sanity Project "
10+ "value" : " Sanity Dataset "
1111 }
1212 },
13+ "providesPluginDiagnostics" : true ,
1314 "config" : {
14- "baseUrl" : " https://{{object.rawId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
15+ "baseUrl" : " https://{{object.projectId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
1516 "httpMethod" : " get" ,
1617 "paging" : {
1718 "mode" : " none"
1819 },
1920 "expandInnerObjects" : true ,
20- "endpointPath" : " data/query/{{dataset }}" ,
21+ "endpointPath" : " data/query/{{object.datasetId }}" ,
2122 "pathToData" : " result" ,
2223 "getArgs" : [
2324 {
3233 "headers" : [
3334 {
3435 "key" : " Authorization" ,
35- "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.rawId ) || {}).value }}"
36+ "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.projectId ) || {}).value }}"
3637 }
3738 ]
3839 },
3940 "ui" : [
40- {
41- "type" : " text" ,
42- "name" : " dataset" ,
43- "label" : " Dataset" ,
44- "defaultValue" : " production" ,
45- "validation" : { "required" : true },
46- "help" : " The dataset to query."
47- },
4841 {
4942 "type" : " code" ,
5043 "name" : " query" ,
Original file line number Diff line number Diff line change 77 "matches" : {
88 "sourceType" : {
99 "type" : " equals" ,
10- "value" : " Sanity Project "
10+ "value" : " Sanity Dataset "
1111 }
1212 },
1313 "config" : {
14- "baseUrl" : " https://{{object.rawId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
14+ "baseUrl" : " https://{{object.projectId }}.api.sanity.io/{{dataSource.apiVersion}}/" ,
1515 "httpMethod" : " get" ,
1616 "paging" : {
1717 "mode" : " none"
1818 },
19- "endpointPath" : " data/query/{{dataset }}" ,
19+ "endpointPath" : " data/query/{{object.datasetId }}" ,
2020 "getArgs" : [
2121 {
2222 "key" : " query" ,
2626 "headers" : [
2727 {
2828 "key" : " Authorization" ,
29- "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.rawId ) || {}).value }}"
29+ "value" : " Bearer {{ ((dataSource.projects || []).find(p => p.key === object.projectId ) || {}).value }}"
3030 }
3131 ],
3232 "postRequestScript" : " documentTypeCounts.js"
3333 },
34- "ui" : [
35- {
36- "type" : " text" ,
37- "name" : " dataset" ,
38- "label" : " Dataset" ,
39- "defaultValue" : " production" ,
40- "validation" : { "required" : true },
41- "help" : " The dataset to analyse (e.g. production)."
42- }
43- ],
34+ "ui" : [],
4435 "metadata" : [
4536 {
4637 "name" : " documentType" ,
Original file line number Diff line number Diff line change 1010 "default" : " none" ,
1111 "type" : " object"
1212 }
13+ },
14+ {
15+ "name" : " Sanity Datasets" ,
16+ "matches" : {
17+ "sourceType" : { "type" : " oneOf" , "values" : [" Sanity Dataset" ] }
18+ },
19+ "variable" : {
20+ "name" : " Sanity Project" ,
21+ "allowMultipleSelection" : false ,
22+ "default" : " none" ,
23+ "type" : " object"
24+ }
1325 }
1426]
You can’t perform that action at this time.
0 commit comments