@sasjs/api 0.45.0 → 0.46.0

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.
@@ -206,6 +206,28 @@ export const VIYA_CORPUS = [
206
206
  expected: 200,
207
207
  shape: undefined
208
208
  },
209
+ {
210
+ route: 'GET /compute/sessions/{}/variables/{}',
211
+ step: 'compute/execute-script',
212
+ queries: [],
213
+ statuses: [200],
214
+ expected: 200,
215
+ shape: {
216
+ links: [
217
+ {
218
+ href: 'string',
219
+ method: 'string',
220
+ rel: 'string',
221
+ type: 'string',
222
+ uri: 'string'
223
+ }
224
+ ],
225
+ name: 'string',
226
+ scope: 'string',
227
+ value: 'string',
228
+ version: 'number'
229
+ }
230
+ },
209
231
  {
210
232
  route: 'POST /files/files',
211
233
  step: 'files/create',
@@ -614,6 +636,264 @@ export const VIYA_CORPUS = [
614
636
  version: 'number'
615
637
  }
616
638
  },
639
+ {
640
+ route: 'POST /jobDefinitions/definitions',
641
+ step: 'jobs/definition',
642
+ queries: ['parentFolderUri'],
643
+ statuses: [201],
644
+ expected: 201,
645
+ shape: {
646
+ code: 'string',
647
+ createdBy: 'string',
648
+ creationTimeStamp: 'string',
649
+ id: 'string',
650
+ links: [
651
+ {
652
+ href: 'string',
653
+ method: 'string',
654
+ rel: 'string',
655
+ type: 'string',
656
+ uri: 'string'
657
+ }
658
+ ],
659
+ modifiedBy: 'string',
660
+ modifiedTimeStamp: 'string',
661
+ name: 'string',
662
+ parameters: [
663
+ {
664
+ defaultValue: 'string',
665
+ name: 'string',
666
+ required: 'boolean',
667
+ type: 'string',
668
+ version: 'number'
669
+ }
670
+ ],
671
+ type: 'string',
672
+ version: 'number'
673
+ }
674
+ },
675
+ {
676
+ route: 'GET /jobDefinitions/definitions/{}',
677
+ step: 'jobs/execute',
678
+ queries: [],
679
+ statuses: [200],
680
+ expected: 200,
681
+ shape: {
682
+ code: 'string',
683
+ createdBy: 'string',
684
+ creationTimeStamp: 'string',
685
+ id: 'string',
686
+ links: [
687
+ {
688
+ href: 'string',
689
+ method: 'string',
690
+ rel: 'string',
691
+ type: 'string',
692
+ uri: 'string'
693
+ }
694
+ ],
695
+ modifiedBy: 'string',
696
+ modifiedTimeStamp: 'string',
697
+ name: 'string',
698
+ parameters: [
699
+ {
700
+ defaultValue: 'string',
701
+ name: 'string',
702
+ required: 'boolean',
703
+ type: 'string',
704
+ version: 'number'
705
+ }
706
+ ],
707
+ type: 'string',
708
+ version: 'number'
709
+ }
710
+ },
711
+ {
712
+ route: 'POST /jobExecution/jobs',
713
+ step: 'jobs/execute',
714
+ queries: ['_action'],
715
+ statuses: [201],
716
+ expected: 201,
717
+ shape: {
718
+ createdBy: 'string',
719
+ creationTimeStamp: 'string',
720
+ elapsedTime: 'number',
721
+ heartbeatInterval: 'number',
722
+ heartbeatTimeStamp: 'string',
723
+ id: 'string',
724
+ jobRequest: {
725
+ arguments: {
726
+ _DEBUG: 'string',
727
+ _OMITJSONLISTING: 'string',
728
+ _OMITJSONLOG: 'string',
729
+ _OMITTEXTLISTING: 'string',
730
+ _OMITTEXTLOG: 'string',
731
+ _addjesbeginendmacros: 'string',
732
+ _contextName: 'string',
733
+ _omitSessionResults: 'string',
734
+ _program: 'string',
735
+ _webin_file_count: 'string'
736
+ },
737
+ createdByApplication: 'string',
738
+ description: 'string',
739
+ jobDefinition: {
740
+ code: 'string',
741
+ createdBy: 'string',
742
+ creationTimeStamp: 'string',
743
+ id: 'string',
744
+ links: ['object'],
745
+ modifiedBy: 'string',
746
+ modifiedTimeStamp: 'string',
747
+ name: 'string',
748
+ parameters: ['object'],
749
+ type: 'string',
750
+ version: 'number'
751
+ },
752
+ name: 'string',
753
+ properties: 'array',
754
+ version: 'number'
755
+ },
756
+ links: [
757
+ {
758
+ href: 'string',
759
+ method: 'string',
760
+ rel: 'string',
761
+ type: 'string',
762
+ uri: 'string'
763
+ }
764
+ ],
765
+ modifiedBy: 'string',
766
+ modifiedTimeStamp: 'string',
767
+ results: {},
768
+ state: 'string',
769
+ submittedByApplication: 'string',
770
+ version: 'number'
771
+ }
772
+ },
773
+ {
774
+ route: 'GET /jobExecution/jobs/{}',
775
+ step: 'jobs/execute',
776
+ queries: [],
777
+ statuses: [200],
778
+ expected: 200,
779
+ shape: {
780
+ createdBy: 'string',
781
+ creationTimeStamp: 'string',
782
+ elapsedTime: 'number',
783
+ endTimeStamp: 'string',
784
+ heartbeatInterval: 'number',
785
+ heartbeatTimeStamp: 'string',
786
+ id: 'string',
787
+ jobRequest: {
788
+ arguments: {
789
+ _DEBUG: 'string',
790
+ _OMITJSONLISTING: 'string',
791
+ _OMITJSONLOG: 'string',
792
+ _OMITTEXTLISTING: 'string',
793
+ _OMITTEXTLOG: 'string',
794
+ _addjesbeginendmacros: 'string',
795
+ _contextName: 'string',
796
+ _omitSessionResults: 'string',
797
+ _program: 'string',
798
+ _webin_file_count: 'string'
799
+ },
800
+ createdByApplication: 'string',
801
+ description: 'string',
802
+ jobDefinition: {
803
+ code: 'string',
804
+ createdBy: 'string',
805
+ creationTimeStamp: 'string',
806
+ id: 'string',
807
+ links: ['object'],
808
+ modifiedBy: 'string',
809
+ modifiedTimeStamp: 'string',
810
+ name: 'string',
811
+ parameters: ['object'],
812
+ type: 'string',
813
+ version: 'number'
814
+ },
815
+ name: 'string',
816
+ properties: 'array',
817
+ version: 'number'
818
+ },
819
+ links: [
820
+ {
821
+ href: 'string',
822
+ method: 'string',
823
+ rel: 'string',
824
+ type: 'string',
825
+ uri: 'string'
826
+ }
827
+ ],
828
+ logLocation: 'string',
829
+ modifiedBy: 'string',
830
+ modifiedTimeStamp: 'string',
831
+ results: {
832
+ COMPUTE_CONTEXT: 'string',
833
+ COMPUTE_JOB: 'string',
834
+ COMPUTE_SESSION: 'string',
835
+ '{}.log': 'string',
836
+ '{}.log.txt': 'string'
837
+ },
838
+ state: 'string',
839
+ submittedByApplication: 'string',
840
+ version: 'number'
841
+ }
842
+ },
843
+ {
844
+ route: 'GET /jobExecution/jobs/{}/state',
845
+ step: 'jobs/execute',
846
+ queries: ['_action', 'wait'],
847
+ statuses: [200],
848
+ expected: 200,
849
+ shape: undefined
850
+ },
851
+ {
852
+ route: 'GET /launcher/contexts',
853
+ step: 'compute/launcher-contexts',
854
+ queries: ['limit'],
855
+ statuses: [200],
856
+ expected: 200,
857
+ shape: {
858
+ accept: 'string',
859
+ count: 'number',
860
+ items: [
861
+ {
862
+ createdBy: 'string',
863
+ creationTimeStamp: 'string',
864
+ description: 'string',
865
+ id: 'string',
866
+ links: [
867
+ {
868
+ href: 'string',
869
+ method: 'string',
870
+ rel: 'string',
871
+ type: 'string',
872
+ uri: 'string'
873
+ }
874
+ ],
875
+ modifiedBy: 'string',
876
+ modifiedTimeStamp: 'string',
877
+ name: 'string',
878
+ type: 'string',
879
+ version: 'number'
880
+ }
881
+ ],
882
+ limit: 'number',
883
+ links: [
884
+ {
885
+ href: 'string',
886
+ method: 'string',
887
+ rel: 'string',
888
+ type: 'string',
889
+ uri: 'string'
890
+ }
891
+ ],
892
+ name: 'string',
893
+ start: 'number',
894
+ version: 'number'
895
+ }
896
+ },
617
897
  {
618
898
  route: 'POST /SASLogon/oauth/token',
619
899
  step: 'auth/token-refresh',
@@ -639,6 +919,44 @@ export const VIYA_CORPUS = [
639
919
  queries: ['limit'],
640
920
  statuses: [200],
641
921
  expected: 200,
642
- shape: undefined
922
+ shape: {
923
+ accept: 'string',
924
+ count: 'number',
925
+ items: [
926
+ {
927
+ description: 'string',
928
+ iconUri: 'string',
929
+ label: 'string',
930
+ links: [
931
+ {
932
+ href: 'string',
933
+ method: 'string',
934
+ rel: 'string',
935
+ type: 'string',
936
+ uri: 'string'
937
+ }
938
+ ],
939
+ mediaType: 'string',
940
+ name: 'string',
941
+ resourceUri: 'string',
942
+ tags: ['string'],
943
+ version: 'number'
944
+ }
945
+ ],
946
+ limit: 'number',
947
+ links: [
948
+ {
949
+ href: 'string',
950
+ itemType: 'string',
951
+ method: 'string',
952
+ rel: 'string',
953
+ type: 'string',
954
+ uri: 'string'
955
+ }
956
+ ],
957
+ name: 'string',
958
+ start: 'number',
959
+ version: 'number'
960
+ }
643
961
  }
644
962
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/viya/overlay.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAYD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAiCzD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACzC,aAAY,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAmB,KAClD,IAcF,CAAA"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/viya/overlay.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAuBD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAgEzD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACzC,aAAY,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAmB,KAClD,IAcF,CAAA"}
@@ -20,6 +20,15 @@ import { VIYA_OPERATIONS } from './declared.js';
20
20
  * a second answer to the same question.
21
21
  */
22
22
  const NEEDS_AUTH = 'The token endpoint is answered by the host that mounts the emulator, which owns the token port.';
23
+ /**
24
+ * The job family is a capture without a handler.
25
+ *
26
+ * The deploy-and-run path is recorded - a service pack deploy creates a job
27
+ * definition and submits it - and this package answers the compute and content
28
+ * families, not that one. Saying so is the difference between a client learning
29
+ * what is missing and a client learning nothing.
30
+ */
31
+ const NEEDS_JOBS = 'The emulator answers the compute and content families; the job definitions a deploy creates and the executions a run submits are not modelled yet.';
23
32
  export const VIYA_OVERLAY = {
24
33
  // answered here
25
34
  'POST /folders/folders': { implemented: true },
@@ -45,6 +54,32 @@ export const VIYA_OVERLAY = {
45
54
  'PATCH /files/files/{}': { implemented: true },
46
55
  'GET /files/files/{}/content': { implemented: true },
47
56
  'PUT /files/files/{}/content': { implemented: true },
57
+ // declined: the job family needs a job service
58
+ //
59
+ // A capture describes what the estate answers on the deploy-and-run path, and
60
+ // the emulator does not answer that path yet: a client that deploys a service
61
+ // pack against an emulated estate stops here, with a reason rather than a 404.
62
+ 'POST /jobDefinitions/definitions': {
63
+ implemented: false,
64
+ reason: NEEDS_JOBS
65
+ },
66
+ 'GET /jobDefinitions/definitions/{}': {
67
+ implemented: false,
68
+ reason: NEEDS_JOBS
69
+ },
70
+ 'POST /jobExecution/jobs': { implemented: false, reason: NEEDS_JOBS },
71
+ 'GET /jobExecution/jobs/{}': { implemented: false, reason: NEEDS_JOBS },
72
+ 'GET /jobExecution/jobs/{}/state': { implemented: false, reason: NEEDS_JOBS },
73
+ // declined: contexts come from the seed, not from the launcher
74
+ 'GET /launcher/contexts': {
75
+ implemented: false,
76
+ reason: 'The emulator answers compute contexts from its seed; the launcher list a client falls back to is not modelled, and nothing on the emulated path asks for it.'
77
+ },
78
+ // declined: session variables are not modelled
79
+ 'GET /compute/sessions/{}/variables/{}': {
80
+ implemented: false,
81
+ reason: 'The emulator does not model session variables; the client reads these only to log the pid of a job it is about to submit (SYSJOBID), and any name it asks for is refused here rather than answered with a value the emulator did not run.'
82
+ },
48
83
  // declined: the host owns the token port
49
84
  'POST /SASLogon/oauth/token': { implemented: false, reason: NEEDS_AUTH },
50
85
  // declared, not captured: the webout an application's service returns
@@ -35,6 +35,17 @@ export interface SurfaceEntry {
35
35
  decision: 'in' | 'declined';
36
36
  /** What the emulator answers, or why it does not answer this at all. */
37
37
  reason: string;
38
+ /**
39
+ * Where the claim that the client calls this came from.
40
+ *
41
+ * Absent means a literal in the adapter, which is what the inventory
42
+ * extracts and what `npm run check:scope` re-extracts. `capture` means a
43
+ * route the recorder watched the adapter call but no literal states, because
44
+ * the adapter got the URL as data - a link inside a response - so no
45
+ * extraction over source text can see it. A capture-sourced entry must be
46
+ * absent from the inventory, and the spec holds both directions.
47
+ */
48
+ source?: 'capture';
38
49
  }
39
50
  /** Pinned to the adapter the inventory was extracted from. */
40
51
  export declare const SURFACE_ADAPTER_VERSION = "6.1.2";
@@ -1 +1 @@
1
- {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/viya/surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,WAAW,GACX,WAAW,GACX,cAAc,GACd,YAAY,GACZ,cAAc,GACd,eAAe,GACf,WAAW,CAAA;AAEf,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,IAAI,GAAG,UAAU,CAAA;IAC3B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,UAAU,CAAA;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAE1C,eAAO,MAAM,OAAO,EAAE,YAAY,EAwXjC,CAAA"}
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/viya/surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,WAAW,GACX,WAAW,GACX,cAAc,GACd,YAAY,GACZ,cAAc,GACd,eAAe,GACf,WAAW,CAAA;AAEf,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,IAAI,GAAG,UAAU,CAAA;IAC3B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,UAAU,CAAA;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAE1C,eAAO,MAAM,OAAO,EAAE,YAAY,EAgYjC,CAAA"}
@@ -279,6 +279,13 @@ export const SURFACE = [
279
279
  decision: 'in',
280
280
  reason: 'the job path a deployed service runs through'
281
281
  },
282
+ {
283
+ path: '/jobDefinitions/definitions/{}',
284
+ family: 'viya-jobs',
285
+ decision: 'in',
286
+ source: 'capture',
287
+ reason: 'the definition itself, which the client reads through the link a folder listing handed it - the URL arrives as data, so no literal in the adapter states it'
288
+ },
282
289
  {
283
290
  path: '/jobExecution/jobs',
284
291
  family: 'viya-jobs',
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/viya/table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,qEAAqE;IACrE,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/C,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,EAqxBrC,CAAA"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/viya/table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,qEAAqE;IACrE,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/C,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,EAkrCrC,CAAA"}