@tier0/sdk-v2 0.8.0 → 0.9.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.
Files changed (106) hide show
  1. package/NOTICE.md +3 -1
  2. package/README.md +45 -11
  3. package/dist/cjs/capabilities.d.ts +8 -17
  4. package/dist/cjs/capabilities.js +17 -28
  5. package/dist/cjs/capabilities.js.map +1 -1
  6. package/dist/cjs/client.d.ts +524 -3
  7. package/dist/cjs/client.js +29 -6
  8. package/dist/cjs/client.js.map +1 -1
  9. package/dist/cjs/cloud-transport.d.ts +4 -2
  10. package/dist/cjs/cloud-transport.js +27 -18
  11. package/dist/cjs/cloud-transport.js.map +1 -1
  12. package/dist/cjs/files.d.ts +26 -6
  13. package/dist/cjs/files.js +151 -28
  14. package/dist/cjs/files.js.map +1 -1
  15. package/dist/cjs/index.d.ts +2 -1
  16. package/dist/cjs/index.js +3 -1
  17. package/dist/cjs/index.js.map +1 -1
  18. package/dist/cjs/openapi/api.generated.d.ts +1 -1
  19. package/dist/cjs/openapi/codecs.generated.d.ts +30 -161
  20. package/dist/cjs/openapi/codecs.generated.js +1 -1
  21. package/dist/cjs/openapi/codecs.generated.js.map +1 -1
  22. package/dist/cjs/openapi/types.generated.d.ts +33 -85
  23. package/dist/cjs/openapi/types.generated.js.map +1 -1
  24. package/dist/cjs/runtime.d.ts +13 -0
  25. package/dist/cjs/runtime.js +51 -0
  26. package/dist/cjs/runtime.js.map +1 -0
  27. package/dist/cjs/streams/capabilities.d.ts +8 -0
  28. package/dist/cjs/streams/capabilities.js +19 -0
  29. package/dist/cjs/streams/capabilities.js.map +1 -0
  30. package/dist/cjs/streams/contract.generated.d.ts +802 -0
  31. package/dist/cjs/streams/contract.generated.js +7 -0
  32. package/dist/cjs/streams/contract.generated.js.map +1 -0
  33. package/dist/cjs/streams/index.d.ts +3 -0
  34. package/dist/cjs/streams/index.js +20 -0
  35. package/dist/cjs/streams/index.js.map +1 -0
  36. package/dist/cjs/streams/messages.d.ts +42 -0
  37. package/dist/cjs/streams/messages.js +514 -0
  38. package/dist/cjs/streams/messages.js.map +1 -0
  39. package/dist/cjs/streams/requests.d.ts +93 -0
  40. package/dist/cjs/streams/requests.js +167 -0
  41. package/dist/cjs/streams/requests.js.map +1 -0
  42. package/dist/cjs/streams/transport.d.ts +16 -0
  43. package/dist/cjs/streams/transport.js +24 -0
  44. package/dist/cjs/streams/transport.js.map +1 -0
  45. package/dist/cjs/uns-v2/generated.d.ts +87 -22
  46. package/dist/cjs/uns-v2/generated.js +43 -8
  47. package/dist/cjs/uns-v2/generated.js.map +1 -1
  48. package/dist/esm/capabilities.d.ts +8 -17
  49. package/dist/esm/capabilities.js +17 -28
  50. package/dist/esm/capabilities.js.map +1 -1
  51. package/dist/esm/client.d.ts +524 -3
  52. package/dist/esm/client.js +27 -5
  53. package/dist/esm/client.js.map +1 -1
  54. package/dist/esm/cloud-transport.d.ts +4 -2
  55. package/dist/esm/cloud-transport.js +27 -18
  56. package/dist/esm/cloud-transport.js.map +1 -1
  57. package/dist/esm/files.d.ts +26 -6
  58. package/dist/esm/files.js +151 -28
  59. package/dist/esm/files.js.map +1 -1
  60. package/dist/esm/index.d.ts +2 -1
  61. package/dist/esm/index.js +2 -1
  62. package/dist/esm/index.js.map +1 -1
  63. package/dist/esm/openapi/api.generated.d.ts +1 -1
  64. package/dist/esm/openapi/codecs.generated.d.ts +30 -161
  65. package/dist/esm/openapi/codecs.generated.js +1 -1
  66. package/dist/esm/openapi/codecs.generated.js.map +1 -1
  67. package/dist/esm/openapi/types.generated.d.ts +33 -85
  68. package/dist/esm/openapi/types.generated.js.map +1 -1
  69. package/dist/esm/runtime.d.ts +13 -0
  70. package/dist/esm/runtime.js +46 -0
  71. package/dist/esm/runtime.js.map +1 -0
  72. package/dist/esm/streams/capabilities.d.ts +8 -0
  73. package/dist/esm/streams/capabilities.js +15 -0
  74. package/dist/esm/streams/capabilities.js.map +1 -0
  75. package/dist/esm/streams/contract.generated.d.ts +802 -0
  76. package/dist/esm/streams/contract.generated.js +6 -0
  77. package/dist/esm/streams/contract.generated.js.map +1 -0
  78. package/dist/esm/streams/index.d.ts +3 -0
  79. package/dist/esm/streams/index.js +4 -0
  80. package/dist/esm/streams/index.js.map +1 -0
  81. package/dist/esm/streams/messages.d.ts +42 -0
  82. package/dist/esm/streams/messages.js +475 -0
  83. package/dist/esm/streams/messages.js.map +1 -0
  84. package/dist/esm/streams/requests.d.ts +93 -0
  85. package/dist/esm/streams/requests.js +161 -0
  86. package/dist/esm/streams/requests.js.map +1 -0
  87. package/dist/esm/streams/transport.d.ts +16 -0
  88. package/dist/esm/streams/transport.js +20 -0
  89. package/dist/esm/streams/transport.js.map +1 -0
  90. package/dist/esm/uns-v2/generated.d.ts +87 -22
  91. package/dist/esm/uns-v2/generated.js +43 -8
  92. package/dist/esm/uns-v2/generated.js.map +1 -1
  93. package/package.json +46 -12
  94. package/skills/tier0-sdk-v2/SKILL.md +3 -2
  95. package/skills/tier0-sdk-v2/tier0-sdk-v2-files/references/multipart.md +23 -8
  96. package/skills/tier0-sdk-v2/tier0-sdk-v2-source/SKILL.md +3 -3
  97. package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/create.md +9 -3
  98. package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/state.md +1 -1
  99. package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/update.md +1 -1
  100. package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/SKILL.md +2 -1
  101. package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/create.md +13 -4
  102. package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/deploy.md +1 -1
  103. package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/update.md +1 -1
  104. package/skills/tier0-sdk-v2/tier0-sdk-v2-streams/SKILL.md +67 -0
  105. package/skills/tier0-sdk-v2/tier0-sdk-v2-system/SKILL.md +5 -9
  106. package/skills/tier0-sdk-v2/tier0-sdk-v2-system/references/info.md +1 -1
@@ -29,8 +29,10 @@ export type UnsV2FieldOperation = ({
29
29
  }) | ({
30
30
  "op"?: "append" | "addToSet";
31
31
  "value"?: Array<UnsV2JSONValue>;
32
- }) | ({
32
+ }) | (({
33
33
  "op"?: "unset";
34
+ }) & {
35
+ "value"?: never;
34
36
  }));
35
37
  export type UnsV2ResultBinding = {
36
38
  "path": string;
@@ -64,8 +66,10 @@ export type UnsV2PipelinePage = ({
64
66
  "mode"?: "offset" | "cursor";
65
67
  "page"?: UnsV2Integer;
66
68
  "cursor"?: string;
67
- }) & ((({
69
+ }) & (((({
68
70
  "mode": "cursor";
71
+ }) & {
72
+ "page"?: never;
69
73
  }) | ({
70
74
  "mode"?: "offset";
71
75
  })));
@@ -392,7 +396,7 @@ export type TransactionQueryResult = {
392
396
  };
393
397
  export type UnsV2SourceStateUpdateReq = {
394
398
  "idempotencyKey"?: string;
395
- "dryRun": boolean;
399
+ "dryRun"?: boolean;
396
400
  "allowPartial"?: false;
397
401
  "mode"?: "auto" | "sync";
398
402
  "items": (Array<({
@@ -508,7 +512,7 @@ export type UnsV2StreamProgramVersionsListResponse = {
508
512
  };
509
513
  export type UnsV2StreamProgramDeployReq = {
510
514
  "idempotencyKey"?: string;
511
- "dryRun": boolean;
515
+ "dryRun"?: boolean;
512
516
  "id": string;
513
517
  "expectedRevision"?: UnsV2Integer;
514
518
  "expectedSourceRevision"?: UnsV2Integer;
@@ -722,8 +726,10 @@ export type UnsV2RecordChange = ({
722
726
  "conditions"?: UnsV2JSONValue;
723
727
  }))) & ((({
724
728
  "selection": "first";
725
- }) | ({
729
+ }) | (({
726
730
  "selection"?: "exactOne";
731
+ }) & {
732
+ "sort"?: never;
727
733
  }))) & ((({
728
734
  "upsert"?: false;
729
735
  }) | ({
@@ -908,8 +914,10 @@ export type UnsV2PipelineStage = (({
908
914
  "pipeline"?: Array<UnsV2PipelineStage>;
909
915
  }) & (({
910
916
  "kind": "samples";
911
- }) | ({
917
+ }) | (({
912
918
  "kind"?: "records";
919
+ }) & {
920
+ "recordId"?: never;
913
921
  })));
914
922
  }) | ({
915
923
  "$unwind": ((string | ({
@@ -1395,7 +1403,7 @@ export type CloudSourceConfig = (({
1395
1403
  export type CloudSourceDocument = ({
1396
1404
  "name": string;
1397
1405
  "description"?: string;
1398
- "protocol": "http-api" | "modbus" | "mqtt" | "opcua" | "sap" | "teamcenter" | "mqtt_device" | "sql";
1406
+ "protocol": "http-api" | "modbus" | "mqtt" | "opcua" | "sap" | "teamcenter" | "mqtt_device" | "sql" | "edge";
1399
1407
  "config": CloudSourceConfig;
1400
1408
  });
1401
1409
  export type CloudStreamRequestDefinition = {
@@ -1528,7 +1536,7 @@ export type CloudSourceDocumentGetResponse = {
1528
1536
  "data": ((CloudSourceDocumentView | CloudSourceDocumentSummary));
1529
1537
  };
1530
1538
  export type CloudSourceDocumentCreateReq = ({
1531
- "dryRun": boolean;
1539
+ "dryRun"?: boolean;
1532
1540
  "idempotencyKey"?: string;
1533
1541
  "document"?: CloudSourceDocument;
1534
1542
  "credentials"?: CloudSourceCreateCredentials;
@@ -1544,7 +1552,7 @@ export type CloudSourceDocumentCreateResponse = {
1544
1552
  "data": ((CloudSourceDocumentView | CloudPreviewResult | Outcome));
1545
1553
  };
1546
1554
  export type CloudSourceDocumentUpdateReq = ({
1547
- "dryRun": boolean;
1555
+ "dryRun"?: boolean;
1548
1556
  "idempotencyKey"?: string;
1549
1557
  "id"?: string;
1550
1558
  "expectedRevision"?: UnsV2Integer;
@@ -1576,7 +1584,7 @@ export type CloudStreamDocumentGetResponse = {
1576
1584
  "data": ((CloudStreamDocumentView | CloudStreamDocumentSummary));
1577
1585
  };
1578
1586
  export type CloudStreamDocumentCreateReq = ({
1579
- "dryRun": boolean;
1587
+ "dryRun"?: boolean;
1580
1588
  "idempotencyKey"?: string;
1581
1589
  "document"?: CloudStreamDocument;
1582
1590
  "program"?: RuntimeStreamDefinition;
@@ -1589,7 +1597,7 @@ export type CloudStreamDocumentCreateResponse = {
1589
1597
  "data": ((CloudStreamDocumentView | CloudPreviewResult));
1590
1598
  };
1591
1599
  export type CloudStreamDocumentUpdateReq = ({
1592
- "dryRun": boolean;
1600
+ "dryRun"?: boolean;
1593
1601
  "idempotencyKey"?: string;
1594
1602
  "id": string;
1595
1603
  "expectedRevision"?: UnsV2Integer;
@@ -1611,7 +1619,7 @@ export type CloudSourceDocumentListReq = {
1611
1619
  "page"?: UnsV2Integer;
1612
1620
  "size"?: UnsV2Integer;
1613
1621
  "search"?: string;
1614
- "protocol"?: "http-api" | "modbus" | "mqtt" | "opcua" | "sap" | "teamcenter" | "mqtt_device" | "sql";
1622
+ "protocol"?: "http-api" | "modbus" | "mqtt" | "opcua" | "sap" | "teamcenter" | "mqtt_device" | "sql" | "edge";
1615
1623
  "desiredState"?: "enabled" | "disabled";
1616
1624
  "health"?: string;
1617
1625
  "archived"?: boolean;
@@ -2354,10 +2362,14 @@ export type UnsV2RecordUnlockReq = ({
2354
2362
  })>);
2355
2363
  "ids"?: Array<string>;
2356
2364
  "force"?: boolean;
2357
- }) & (({
2365
+ }) & ((({
2358
2366
  "force"?: false;
2359
- }) | ({
2367
+ }) & {
2368
+ "ids"?: never;
2369
+ }) | (({
2360
2370
  "force": true;
2371
+ }) & {
2372
+ "locks"?: never;
2361
2373
  }));
2362
2374
  export type UnsV2RecordUnlockResponse = {
2363
2375
  "code": UnsV2Integer;
@@ -2576,7 +2588,7 @@ export type CloudStreamRunError = {
2576
2588
  };
2577
2589
  export type CloudSourceCreateCredentials = ({
2578
2590
  "method"?: "GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "REQUEST";
2579
- "kind": "basic" | "bearer" | "apiKey" | "oauth2ClientCredentials";
2591
+ "kind": "basic" | "bearer" | "apiKey" | "oauth2ClientCredentials" | "usernamePassword";
2580
2592
  "material": {};
2581
2593
  }) & (({
2582
2594
  "kind"?: "basic";
@@ -2606,6 +2618,14 @@ export type CloudSourceCreateCredentials = ({
2606
2618
  "scope"?: string;
2607
2619
  "clientAuthentication"?: "client_secret_post" | "client_secret_basic";
2608
2620
  });
2621
+ }) | (({
2622
+ "kind"?: "usernamePassword";
2623
+ "material"?: ({
2624
+ "username": string;
2625
+ "password": string;
2626
+ });
2627
+ }) & {
2628
+ "method"?: never;
2609
2629
  }));
2610
2630
  export type UnsV2MetadataFindReq = ((({
2611
2631
  "kind": "directory" | "topic" | "collection";
@@ -7085,6 +7105,9 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
7085
7105
  readonly a: readonly [{
7086
7106
  readonly k: "o";
7087
7107
  readonly p: {
7108
+ readonly credentials: {
7109
+ readonly k: "o";
7110
+ };
7088
7111
  readonly document: {
7089
7112
  readonly k: "o";
7090
7113
  readonly p: {
@@ -7094,6 +7117,16 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
7094
7117
  };
7095
7118
  };
7096
7119
  };
7120
+ }, {
7121
+ readonly k: "o";
7122
+ readonly p: {
7123
+ readonly credentials: {
7124
+ readonly k: "o";
7125
+ };
7126
+ readonly document: {
7127
+ readonly k: "o";
7128
+ };
7129
+ };
7097
7130
  }];
7098
7131
  }];
7099
7132
  };
@@ -8879,6 +8912,13 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
8879
8912
  readonly k: "o";
8880
8913
  };
8881
8914
  };
8915
+ }, {
8916
+ readonly k: "o";
8917
+ readonly p: {
8918
+ readonly material: {
8919
+ readonly k: "o";
8920
+ };
8921
+ };
8882
8922
  }];
8883
8923
  };
8884
8924
  readonly UnsV2MetadataFindReq: {
@@ -9774,11 +9814,11 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
9774
9814
  };
9775
9815
  export declare const UNS_V2_CONTRACT_PROVENANCE: {
9776
9816
  readonly repository: "FREEZONEX/Tier0-Backend";
9777
- readonly revision: "7af1912802294d2f4cbe8c92fb0a303a8abda2cf";
9817
+ readonly revision: "5ba6c3af432d5200674f7cb1a3edd31b255ef64b";
9778
9818
  readonly version: "5.0.0";
9779
9819
  readonly source: "service/unssvr/internal/domain/unsv2/contract_generated.go#ContractJSON";
9780
- readonly cloudRevision: "7af1912802294d2f4cbe8c92fb0a303a8abda2cf";
9781
- readonly cloudContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+app-collection/2+collection-ownership/1+metadata/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+api-surface/2+source-stream-single-model+app-data/2+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/1+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9820
+ readonly cloudRevision: "5ba6c3af432d5200674f7cb1a3edd31b255ef64b";
9821
+ readonly cloudContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+app-data/2+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/1+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9782
9822
  readonly resolvedCloudContract: true;
9783
9823
  readonly enterpriseBase: {
9784
9824
  readonly repository: "FREEZONEX/Tier0-Enterprise-New";
@@ -9794,12 +9834,37 @@ export declare const UNS_V2_CONTRACT_PROVENANCE: {
9794
9834
  readonly capability: "x-tier0-opcua-server: static available=false; online availability is workspace/registry authoritative";
9795
9835
  };
9796
9836
  };
9797
- readonly sourceDerivedContractSHA256: "71fd08f483a46d0673389552418a6ca23983ff2a6957803ddba6b71fa9385064";
9837
+ readonly sourceDerivedContractSHA256: "a8c280d90b9d865a80637d7b563bd72611aead54bf0422a0cf83e05feaacd724";
9838
+ readonly schemaUpdates: readonly [{
9839
+ readonly scope: "source-stream-acquisition";
9840
+ readonly repository: "FREEZONEX/Tier0-Backend";
9841
+ readonly revision: "5ba6c3af432d5200674f7cb1a3edd31b255ef64b";
9842
+ readonly sourceKind: "committed";
9843
+ readonly source: "share/unscontract/manifest.json";
9844
+ readonly sourceSHA256: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9845
+ readonly sourceContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+app-data/2+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/1+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9846
+ readonly schemas: readonly ["CloudSourceCreateCredentials", "CloudSourceDocumentCreateReq", "CloudSourceDocumentUpdateReq", "UnsV2SourceStateUpdateReq", "CloudStreamDocumentCreateReq", "CloudStreamDocumentUpdateReq", "UnsV2StreamProgramDeployReq"];
9847
+ readonly inputs: {
9848
+ readonly "contracts/uns-v2/manifest.json": {
9849
+ readonly path: "share/unscontract/manifest.json";
9850
+ readonly sourceSHA256: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9851
+ readonly baseSHA256: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9852
+ readonly resultSHA256: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9853
+ };
9854
+ readonly "contracts/uns-v2/contract.json": {
9855
+ readonly path: "share/unscontract/manifest.json";
9856
+ readonly sourceSHA256: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9857
+ readonly baseSHA256: "a8c280d90b9d865a80637d7b563bd72611aead54bf0422a0cf83e05feaacd724";
9858
+ readonly resultSHA256: "a8c280d90b9d865a80637d7b563bd72611aead54bf0422a0cf83e05feaacd724";
9859
+ };
9860
+ };
9861
+ }];
9862
+ readonly note: "Pinned base with reviewed acquisition schema updates; schemaUpdates records the exact source revision and hashes. Other data-model inputs remain pinned.";
9798
9863
  readonly hashes: {
9799
- readonly contract: "71fd08f483a46d0673389552418a6ca23983ff2a6957803ddba6b71fa9385064";
9864
+ readonly contract: "a8c280d90b9d865a80637d7b563bd72611aead54bf0422a0cf83e05feaacd724";
9800
9865
  readonly cloudSupport: "4ff9d5ff69e35e38459287cf15df45ab627684e2e2294dfd1e076ebc4fc34b46";
9801
- readonly manifest: "f44de4fc45bb0868be9e6cedf5e68dfeca8c708146203830812f419ffc513fde";
9802
- readonly provenance: "2694eaa5c48671f5ca66abc790792094e363e9a765aace0b5aa312aef54f126f";
9866
+ readonly manifest: "c92e134799190fda29360a2983692ed47fb421a85fa7d92267ce091ac263dac8";
9867
+ readonly provenance: "5b80e631aaba726b90ef69845d95e798ff35163c3cf98352e23ee71e4e90bde0";
9803
9868
  readonly registry: "c74313c217742d50391a94c09e60d5c5bd1a89c305fa4145cbf23b35ba7dbcdb";
9804
9869
  };
9805
9870
  readonly publicOperationCount: 82;