zinkee 0.1.63 → 0.1.65

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/README.md CHANGED
@@ -486,6 +486,8 @@ zinkee records clear projects
486
486
 
487
487
  Option values are written as numbers (`--set status=1`) but returned as strings (`"1"`). Number values are stored and returned as strings.
488
488
 
489
+ Every record returned by `records get`, `list`, `query` and `update` carries `url`, its permanent link in the Zinkee web app (whoever opens it must sign in and be a member of the workspace); `records create` returns the links of the created records in `createdRecords`, in the order of `created`. Quote the link as is instead of building it.
490
+
489
491
  `records clear` removes every record from the schema's table. Heritage rules
490
492
  (`CASCADE` / `SET NULL`) propagate to child schemas asynchronously through the
491
493
  CDC pipeline, so related tables converge eventually. A `RESTRICT` reference that
@@ -501,9 +503,16 @@ refuses `records delete` of a record it points at; nothing is deleted. Blocked b
501
503
  (comma-separated values), `between` (exactly two comma-separated values `from,to`,
502
504
  both included), `is_empty`, `is_not_empty`.
503
505
 
506
+ On a reference field, `eq`, `neq` and `in` take the target record id (a UUID in any
507
+ letter case) and match the records that point at it, or whose visible value is that
508
+ same text. Any other value, the compound `recordId::label` that reads return included,
509
+ is compared with the visible value, so records pointing at different records with the
510
+ same visible value match together. `in` can mix ids and visible values.
511
+
504
512
  ```bash
505
513
  zinkee --json records query contacts --where "contact-name not_contains test"
506
514
  zinkee --json records query contacts --where "due-date between 2026-10-01,2026-10-31"
515
+ zinkee --json records query deals --where "customer-ref eq 8ad602a1-f6e3-43f6-9ab2-f1c5afc99621"
507
516
  ```
508
517
 
509
518
  For OR, pass the API's native `where` with `--where-json`: a JSON array of conditions
@@ -554,6 +563,8 @@ zinkee --json records aggregate deals --where "status eq OPEN" --metric count --
554
563
  `--json` prints `{"data": [<groups>], "meta": {"command", "configPath", "aggregate"}}`.
555
564
  Each group is `{"key": {<slug>: {"value", "label"}}, "metrics": {<alias>: <value>}}`;
556
565
  records with an empty value share one group whose key is `{"value": null, "label": null}`.
566
+ The `value` of a reference key is the target record id in lower case: reuse it in
567
+ `--where "<field> eq <value>"` (or `in`) to list the records of that group.
557
568
  `meta.aggregate` holds `count`, `total`, `limit`, `truncated` and `timezone`: when
558
569
  `truncated` is true, raise `--limit` or narrow the filters. The request is a read:
559
570
  it works with `--read-only` and never sends an `Idempotency-Key`. See
@@ -639,6 +639,7 @@ var specificExamples = {
639
639
  "records": [
640
640
  {
641
641
  "recordId": "550e8400-e29b-41d4-a716-446655440000",
642
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000",
642
643
  "values": {
643
644
  "contact-name": "Ada Lovelace",
644
645
  "status": 2,
@@ -653,6 +654,26 @@ var specificExamples = {
653
654
  "count": 1,
654
655
  "hasMore": false
655
656
  }
657
+ }`
658
+ },
659
+ {
660
+ description: "Records whose reference field points at a given record. On a reference field, eq, neq and in take the target record id (a UUID in any letter case) and match the records that point at it (or whose visible value is that same text). Any other value, the compound 'recordId::label' that reads return included, is compared with the visible value, so records pointing at different records with the same visible value match together.",
661
+ command: 'zinkee --json records query deals --select id,deal-name,customer-ref --where "customer-ref eq 8ad602a1-f6e3-43f6-9ab2-f1c5afc99621"',
662
+ raw: `{
663
+ "select": ["id", "deal-name", "customer-ref"],
664
+ "where": [
665
+ { "field": "customer-ref", "op": "eq", "value": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621" }
666
+ ]
667
+ }`
668
+ },
669
+ {
670
+ description: "Records whose reference field points at any of several records: in takes a comma-separated list and can mix target record ids and visible values.",
671
+ command: 'zinkee --json records query deals --select id,deal-name,customer-ref --where "customer-ref in 8ad602a1-f6e3-43f6-9ab2-f1c5afc99621,3f2b7c1e-9d4a-4e8b-b6a5-0c1d2e3f4a5b"',
672
+ raw: `{
673
+ "select": ["id", "deal-name", "customer-ref"],
674
+ "where": [
675
+ { "field": "customer-ref", "op": "in", "value": ["8ad602a1-f6e3-43f6-9ab2-f1c5afc99621", "3f2b7c1e-9d4a-4e8b-b6a5-0c1d2e3f4a5b"] }
676
+ ]
656
677
  }`
657
678
  },
658
679
  {
@@ -987,6 +1008,12 @@ var specificExamples = {
987
1008
  "created": [
988
1009
  "550e8400-e29b-41d4-a716-446655440000"
989
1010
  ],
1011
+ "createdRecords": [
1012
+ {
1013
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1014
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000"
1015
+ }
1016
+ ],
990
1017
  "errors": []
991
1018
  }`
992
1019
  },
@@ -1014,6 +1041,12 @@ var specificExamples = {
1014
1041
  "created": [
1015
1042
  "550e8400-e29b-41d4-a716-446655440000"
1016
1043
  ],
1044
+ "createdRecords": [
1045
+ {
1046
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1047
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000"
1048
+ }
1049
+ ],
1017
1050
  "errors": [
1018
1051
  {
1019
1052
  "index": 1,
@@ -1037,6 +1070,7 @@ var specificExamples = {
1037
1070
  }`,
1038
1071
  response: `{
1039
1072
  "created": [],
1073
+ "createdRecords": [],
1040
1074
  "errors": [
1041
1075
  {
1042
1076
  "index": 0,
@@ -1061,6 +1095,12 @@ var specificExamples = {
1061
1095
  "created": [
1062
1096
  "550e8400-e29b-41d4-a716-446655440000"
1063
1097
  ],
1098
+ "createdRecords": [
1099
+ {
1100
+ "recordId": "550e8400-e29b-41d4-a716-446655440000",
1101
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000"
1102
+ }
1103
+ ],
1064
1104
  "errors": []
1065
1105
  }`
1066
1106
  }
@@ -1077,6 +1117,7 @@ var specificExamples = {
1077
1117
  }`,
1078
1118
  response: `{
1079
1119
  "recordId": "550e8400-e29b-41d4-a716-446655440000",
1120
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000",
1080
1121
  "values": {
1081
1122
  "contact-name": "Ada Lovelace Updated",
1082
1123
  "status": 2,
@@ -1115,6 +1156,7 @@ var specificExamples = {
1115
1156
  }`,
1116
1157
  response: `{
1117
1158
  "recordId": "550e8400-e29b-41d4-a716-446655440000",
1159
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000",
1118
1160
  "values": {
1119
1161
  "deal-name": "Acme renewal",
1120
1162
  "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621::Acme Corp"
@@ -2838,6 +2880,7 @@ var specificExamples = {
2838
2880
  "records": [
2839
2881
  {
2840
2882
  "recordId": "550e8400-e29b-41d4-a716-446655440000",
2883
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000",
2841
2884
  "values": {
2842
2885
  "contact-name": "Ada Lovelace",
2843
2886
  "contact-email": "ada@example.com",
@@ -2849,6 +2892,7 @@ var specificExamples = {
2849
2892
  },
2850
2893
  {
2851
2894
  "recordId": "7c9a4b31-e85d-42f7-8b6a-123456789abc",
2895
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/7c9a4b31-e85d-42f7-8b6a-123456789abc",
2852
2896
  "values": {
2853
2897
  "contact-name": "Alan Turing",
2854
2898
  "contact-email": "alan@example.com",
@@ -2877,6 +2921,7 @@ var specificExamples = {
2877
2921
  command: `zinkee --json records get contacts ${SAMPLE_UUID}`,
2878
2922
  response: `{
2879
2923
  "recordId": "550e8400-e29b-41d4-a716-446655440000",
2924
+ "url": "https://z2.zinkee.com/r/3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d/2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e/550e8400-e29b-41d4-a716-446655440000",
2880
2925
  "values": {
2881
2926
  "contact-name": "Ada Lovelace",
2882
2927
  "contact-email": "ada@example.com",
@@ -4723,4 +4768,4 @@ function withResponseEnvelope({ responseMeta, ...example }, commandName) {
4723
4768
  export {
4724
4769
  getCommandExamples
4725
4770
  };
4726
- //# sourceMappingURL=examples-MPBE5OXQ.js.map
4771
+ //# sourceMappingURL=examples-SC6U5M4S.js.map