@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.
- package/build/browser.js +776 -33
- package/build/cjs/corpus/viya/operations.js +319 -1
- package/build/cjs/viya/overlay.js +35 -0
- package/build/cjs/viya/surface.js +7 -0
- package/build/cjs/viya/table.js +422 -9
- package/build/cjs/viya/unrecorded.js +0 -22
- package/build/esm/corpus/viya/operations.d.ts.map +1 -1
- package/build/esm/corpus/viya/operations.js +319 -1
- package/build/esm/viya/overlay.d.ts.map +1 -1
- package/build/esm/viya/overlay.js +35 -0
- package/build/esm/viya/surface.d.ts +11 -0
- package/build/esm/viya/surface.d.ts.map +1 -1
- package/build/esm/viya/surface.js +7 -0
- package/build/esm/viya/table.d.ts.map +1 -1
- package/build/esm/viya/table.js +422 -9
- package/build/esm/viya/unrecorded.d.ts.map +1 -1
- package/build/esm/viya/unrecorded.js +0 -22
- package/package.json +1 -1
|
@@ -209,6 +209,28 @@ exports.VIYA_CORPUS = [
|
|
|
209
209
|
expected: 200,
|
|
210
210
|
shape: undefined
|
|
211
211
|
},
|
|
212
|
+
{
|
|
213
|
+
route: 'GET /compute/sessions/{}/variables/{}',
|
|
214
|
+
step: 'compute/execute-script',
|
|
215
|
+
queries: [],
|
|
216
|
+
statuses: [200],
|
|
217
|
+
expected: 200,
|
|
218
|
+
shape: {
|
|
219
|
+
links: [
|
|
220
|
+
{
|
|
221
|
+
href: 'string',
|
|
222
|
+
method: 'string',
|
|
223
|
+
rel: 'string',
|
|
224
|
+
type: 'string',
|
|
225
|
+
uri: 'string'
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
name: 'string',
|
|
229
|
+
scope: 'string',
|
|
230
|
+
value: 'string',
|
|
231
|
+
version: 'number'
|
|
232
|
+
}
|
|
233
|
+
},
|
|
212
234
|
{
|
|
213
235
|
route: 'POST /files/files',
|
|
214
236
|
step: 'files/create',
|
|
@@ -617,6 +639,264 @@ exports.VIYA_CORPUS = [
|
|
|
617
639
|
version: 'number'
|
|
618
640
|
}
|
|
619
641
|
},
|
|
642
|
+
{
|
|
643
|
+
route: 'POST /jobDefinitions/definitions',
|
|
644
|
+
step: 'jobs/definition',
|
|
645
|
+
queries: ['parentFolderUri'],
|
|
646
|
+
statuses: [201],
|
|
647
|
+
expected: 201,
|
|
648
|
+
shape: {
|
|
649
|
+
code: 'string',
|
|
650
|
+
createdBy: 'string',
|
|
651
|
+
creationTimeStamp: 'string',
|
|
652
|
+
id: 'string',
|
|
653
|
+
links: [
|
|
654
|
+
{
|
|
655
|
+
href: 'string',
|
|
656
|
+
method: 'string',
|
|
657
|
+
rel: 'string',
|
|
658
|
+
type: 'string',
|
|
659
|
+
uri: 'string'
|
|
660
|
+
}
|
|
661
|
+
],
|
|
662
|
+
modifiedBy: 'string',
|
|
663
|
+
modifiedTimeStamp: 'string',
|
|
664
|
+
name: 'string',
|
|
665
|
+
parameters: [
|
|
666
|
+
{
|
|
667
|
+
defaultValue: 'string',
|
|
668
|
+
name: 'string',
|
|
669
|
+
required: 'boolean',
|
|
670
|
+
type: 'string',
|
|
671
|
+
version: 'number'
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
type: 'string',
|
|
675
|
+
version: 'number'
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
route: 'GET /jobDefinitions/definitions/{}',
|
|
680
|
+
step: 'jobs/execute',
|
|
681
|
+
queries: [],
|
|
682
|
+
statuses: [200],
|
|
683
|
+
expected: 200,
|
|
684
|
+
shape: {
|
|
685
|
+
code: 'string',
|
|
686
|
+
createdBy: 'string',
|
|
687
|
+
creationTimeStamp: 'string',
|
|
688
|
+
id: 'string',
|
|
689
|
+
links: [
|
|
690
|
+
{
|
|
691
|
+
href: 'string',
|
|
692
|
+
method: 'string',
|
|
693
|
+
rel: 'string',
|
|
694
|
+
type: 'string',
|
|
695
|
+
uri: 'string'
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
modifiedBy: 'string',
|
|
699
|
+
modifiedTimeStamp: 'string',
|
|
700
|
+
name: 'string',
|
|
701
|
+
parameters: [
|
|
702
|
+
{
|
|
703
|
+
defaultValue: 'string',
|
|
704
|
+
name: 'string',
|
|
705
|
+
required: 'boolean',
|
|
706
|
+
type: 'string',
|
|
707
|
+
version: 'number'
|
|
708
|
+
}
|
|
709
|
+
],
|
|
710
|
+
type: 'string',
|
|
711
|
+
version: 'number'
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
route: 'POST /jobExecution/jobs',
|
|
716
|
+
step: 'jobs/execute',
|
|
717
|
+
queries: ['_action'],
|
|
718
|
+
statuses: [201],
|
|
719
|
+
expected: 201,
|
|
720
|
+
shape: {
|
|
721
|
+
createdBy: 'string',
|
|
722
|
+
creationTimeStamp: 'string',
|
|
723
|
+
elapsedTime: 'number',
|
|
724
|
+
heartbeatInterval: 'number',
|
|
725
|
+
heartbeatTimeStamp: 'string',
|
|
726
|
+
id: 'string',
|
|
727
|
+
jobRequest: {
|
|
728
|
+
arguments: {
|
|
729
|
+
_DEBUG: 'string',
|
|
730
|
+
_OMITJSONLISTING: 'string',
|
|
731
|
+
_OMITJSONLOG: 'string',
|
|
732
|
+
_OMITTEXTLISTING: 'string',
|
|
733
|
+
_OMITTEXTLOG: 'string',
|
|
734
|
+
_addjesbeginendmacros: 'string',
|
|
735
|
+
_contextName: 'string',
|
|
736
|
+
_omitSessionResults: 'string',
|
|
737
|
+
_program: 'string',
|
|
738
|
+
_webin_file_count: 'string'
|
|
739
|
+
},
|
|
740
|
+
createdByApplication: 'string',
|
|
741
|
+
description: 'string',
|
|
742
|
+
jobDefinition: {
|
|
743
|
+
code: 'string',
|
|
744
|
+
createdBy: 'string',
|
|
745
|
+
creationTimeStamp: 'string',
|
|
746
|
+
id: 'string',
|
|
747
|
+
links: ['object'],
|
|
748
|
+
modifiedBy: 'string',
|
|
749
|
+
modifiedTimeStamp: 'string',
|
|
750
|
+
name: 'string',
|
|
751
|
+
parameters: ['object'],
|
|
752
|
+
type: 'string',
|
|
753
|
+
version: 'number'
|
|
754
|
+
},
|
|
755
|
+
name: 'string',
|
|
756
|
+
properties: 'array',
|
|
757
|
+
version: 'number'
|
|
758
|
+
},
|
|
759
|
+
links: [
|
|
760
|
+
{
|
|
761
|
+
href: 'string',
|
|
762
|
+
method: 'string',
|
|
763
|
+
rel: 'string',
|
|
764
|
+
type: 'string',
|
|
765
|
+
uri: 'string'
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
modifiedBy: 'string',
|
|
769
|
+
modifiedTimeStamp: 'string',
|
|
770
|
+
results: {},
|
|
771
|
+
state: 'string',
|
|
772
|
+
submittedByApplication: 'string',
|
|
773
|
+
version: 'number'
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
route: 'GET /jobExecution/jobs/{}',
|
|
778
|
+
step: 'jobs/execute',
|
|
779
|
+
queries: [],
|
|
780
|
+
statuses: [200],
|
|
781
|
+
expected: 200,
|
|
782
|
+
shape: {
|
|
783
|
+
createdBy: 'string',
|
|
784
|
+
creationTimeStamp: 'string',
|
|
785
|
+
elapsedTime: 'number',
|
|
786
|
+
endTimeStamp: 'string',
|
|
787
|
+
heartbeatInterval: 'number',
|
|
788
|
+
heartbeatTimeStamp: 'string',
|
|
789
|
+
id: 'string',
|
|
790
|
+
jobRequest: {
|
|
791
|
+
arguments: {
|
|
792
|
+
_DEBUG: 'string',
|
|
793
|
+
_OMITJSONLISTING: 'string',
|
|
794
|
+
_OMITJSONLOG: 'string',
|
|
795
|
+
_OMITTEXTLISTING: 'string',
|
|
796
|
+
_OMITTEXTLOG: 'string',
|
|
797
|
+
_addjesbeginendmacros: 'string',
|
|
798
|
+
_contextName: 'string',
|
|
799
|
+
_omitSessionResults: 'string',
|
|
800
|
+
_program: 'string',
|
|
801
|
+
_webin_file_count: 'string'
|
|
802
|
+
},
|
|
803
|
+
createdByApplication: 'string',
|
|
804
|
+
description: 'string',
|
|
805
|
+
jobDefinition: {
|
|
806
|
+
code: 'string',
|
|
807
|
+
createdBy: 'string',
|
|
808
|
+
creationTimeStamp: 'string',
|
|
809
|
+
id: 'string',
|
|
810
|
+
links: ['object'],
|
|
811
|
+
modifiedBy: 'string',
|
|
812
|
+
modifiedTimeStamp: 'string',
|
|
813
|
+
name: 'string',
|
|
814
|
+
parameters: ['object'],
|
|
815
|
+
type: 'string',
|
|
816
|
+
version: 'number'
|
|
817
|
+
},
|
|
818
|
+
name: 'string',
|
|
819
|
+
properties: 'array',
|
|
820
|
+
version: 'number'
|
|
821
|
+
},
|
|
822
|
+
links: [
|
|
823
|
+
{
|
|
824
|
+
href: 'string',
|
|
825
|
+
method: 'string',
|
|
826
|
+
rel: 'string',
|
|
827
|
+
type: 'string',
|
|
828
|
+
uri: 'string'
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
logLocation: 'string',
|
|
832
|
+
modifiedBy: 'string',
|
|
833
|
+
modifiedTimeStamp: 'string',
|
|
834
|
+
results: {
|
|
835
|
+
COMPUTE_CONTEXT: 'string',
|
|
836
|
+
COMPUTE_JOB: 'string',
|
|
837
|
+
COMPUTE_SESSION: 'string',
|
|
838
|
+
'{}.log': 'string',
|
|
839
|
+
'{}.log.txt': 'string'
|
|
840
|
+
},
|
|
841
|
+
state: 'string',
|
|
842
|
+
submittedByApplication: 'string',
|
|
843
|
+
version: 'number'
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
route: 'GET /jobExecution/jobs/{}/state',
|
|
848
|
+
step: 'jobs/execute',
|
|
849
|
+
queries: ['_action', 'wait'],
|
|
850
|
+
statuses: [200],
|
|
851
|
+
expected: 200,
|
|
852
|
+
shape: undefined
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
route: 'GET /launcher/contexts',
|
|
856
|
+
step: 'compute/launcher-contexts',
|
|
857
|
+
queries: ['limit'],
|
|
858
|
+
statuses: [200],
|
|
859
|
+
expected: 200,
|
|
860
|
+
shape: {
|
|
861
|
+
accept: 'string',
|
|
862
|
+
count: 'number',
|
|
863
|
+
items: [
|
|
864
|
+
{
|
|
865
|
+
createdBy: 'string',
|
|
866
|
+
creationTimeStamp: 'string',
|
|
867
|
+
description: 'string',
|
|
868
|
+
id: 'string',
|
|
869
|
+
links: [
|
|
870
|
+
{
|
|
871
|
+
href: 'string',
|
|
872
|
+
method: 'string',
|
|
873
|
+
rel: 'string',
|
|
874
|
+
type: 'string',
|
|
875
|
+
uri: 'string'
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
modifiedBy: 'string',
|
|
879
|
+
modifiedTimeStamp: 'string',
|
|
880
|
+
name: 'string',
|
|
881
|
+
type: 'string',
|
|
882
|
+
version: 'number'
|
|
883
|
+
}
|
|
884
|
+
],
|
|
885
|
+
limit: 'number',
|
|
886
|
+
links: [
|
|
887
|
+
{
|
|
888
|
+
href: 'string',
|
|
889
|
+
method: 'string',
|
|
890
|
+
rel: 'string',
|
|
891
|
+
type: 'string',
|
|
892
|
+
uri: 'string'
|
|
893
|
+
}
|
|
894
|
+
],
|
|
895
|
+
name: 'string',
|
|
896
|
+
start: 'number',
|
|
897
|
+
version: 'number'
|
|
898
|
+
}
|
|
899
|
+
},
|
|
620
900
|
{
|
|
621
901
|
route: 'POST /SASLogon/oauth/token',
|
|
622
902
|
step: 'auth/token-refresh',
|
|
@@ -642,6 +922,44 @@ exports.VIYA_CORPUS = [
|
|
|
642
922
|
queries: ['limit'],
|
|
643
923
|
statuses: [200],
|
|
644
924
|
expected: 200,
|
|
645
|
-
shape:
|
|
925
|
+
shape: {
|
|
926
|
+
accept: 'string',
|
|
927
|
+
count: 'number',
|
|
928
|
+
items: [
|
|
929
|
+
{
|
|
930
|
+
description: 'string',
|
|
931
|
+
iconUri: 'string',
|
|
932
|
+
label: 'string',
|
|
933
|
+
links: [
|
|
934
|
+
{
|
|
935
|
+
href: 'string',
|
|
936
|
+
method: 'string',
|
|
937
|
+
rel: 'string',
|
|
938
|
+
type: 'string',
|
|
939
|
+
uri: 'string'
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
mediaType: 'string',
|
|
943
|
+
name: 'string',
|
|
944
|
+
resourceUri: 'string',
|
|
945
|
+
tags: ['string'],
|
|
946
|
+
version: 'number'
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
limit: 'number',
|
|
950
|
+
links: [
|
|
951
|
+
{
|
|
952
|
+
href: 'string',
|
|
953
|
+
itemType: 'string',
|
|
954
|
+
method: 'string',
|
|
955
|
+
rel: 'string',
|
|
956
|
+
type: 'string',
|
|
957
|
+
uri: 'string'
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
name: 'string',
|
|
961
|
+
start: 'number',
|
|
962
|
+
version: 'number'
|
|
963
|
+
}
|
|
646
964
|
}
|
|
647
965
|
];
|
|
@@ -23,6 +23,15 @@ const declared_js_1 = require("./declared.js");
|
|
|
23
23
|
* a second answer to the same question.
|
|
24
24
|
*/
|
|
25
25
|
const NEEDS_AUTH = 'The token endpoint is answered by the host that mounts the emulator, which owns the token port.';
|
|
26
|
+
/**
|
|
27
|
+
* The job family is a capture without a handler.
|
|
28
|
+
*
|
|
29
|
+
* The deploy-and-run path is recorded - a service pack deploy creates a job
|
|
30
|
+
* definition and submits it - and this package answers the compute and content
|
|
31
|
+
* families, not that one. Saying so is the difference between a client learning
|
|
32
|
+
* what is missing and a client learning nothing.
|
|
33
|
+
*/
|
|
34
|
+
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.';
|
|
26
35
|
exports.VIYA_OVERLAY = {
|
|
27
36
|
// answered here
|
|
28
37
|
'POST /folders/folders': { implemented: true },
|
|
@@ -48,6 +57,32 @@ exports.VIYA_OVERLAY = {
|
|
|
48
57
|
'PATCH /files/files/{}': { implemented: true },
|
|
49
58
|
'GET /files/files/{}/content': { implemented: true },
|
|
50
59
|
'PUT /files/files/{}/content': { implemented: true },
|
|
60
|
+
// declined: the job family needs a job service
|
|
61
|
+
//
|
|
62
|
+
// A capture describes what the estate answers on the deploy-and-run path, and
|
|
63
|
+
// the emulator does not answer that path yet: a client that deploys a service
|
|
64
|
+
// pack against an emulated estate stops here, with a reason rather than a 404.
|
|
65
|
+
'POST /jobDefinitions/definitions': {
|
|
66
|
+
implemented: false,
|
|
67
|
+
reason: NEEDS_JOBS
|
|
68
|
+
},
|
|
69
|
+
'GET /jobDefinitions/definitions/{}': {
|
|
70
|
+
implemented: false,
|
|
71
|
+
reason: NEEDS_JOBS
|
|
72
|
+
},
|
|
73
|
+
'POST /jobExecution/jobs': { implemented: false, reason: NEEDS_JOBS },
|
|
74
|
+
'GET /jobExecution/jobs/{}': { implemented: false, reason: NEEDS_JOBS },
|
|
75
|
+
'GET /jobExecution/jobs/{}/state': { implemented: false, reason: NEEDS_JOBS },
|
|
76
|
+
// declined: contexts come from the seed, not from the launcher
|
|
77
|
+
'GET /launcher/contexts': {
|
|
78
|
+
implemented: false,
|
|
79
|
+
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.'
|
|
80
|
+
},
|
|
81
|
+
// declined: session variables are not modelled
|
|
82
|
+
'GET /compute/sessions/{}/variables/{}': {
|
|
83
|
+
implemented: false,
|
|
84
|
+
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.'
|
|
85
|
+
},
|
|
51
86
|
// declined: the host owns the token port
|
|
52
87
|
'POST /SASLogon/oauth/token': { implemented: false, reason: NEEDS_AUTH },
|
|
53
88
|
// declared, not captured: the webout an application's service returns
|
|
@@ -282,6 +282,13 @@ exports.SURFACE = [
|
|
|
282
282
|
decision: 'in',
|
|
283
283
|
reason: 'the job path a deployed service runs through'
|
|
284
284
|
},
|
|
285
|
+
{
|
|
286
|
+
path: '/jobDefinitions/definitions/{}',
|
|
287
|
+
family: 'viya-jobs',
|
|
288
|
+
decision: 'in',
|
|
289
|
+
source: 'capture',
|
|
290
|
+
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'
|
|
291
|
+
},
|
|
285
292
|
{
|
|
286
293
|
path: '/jobExecution/jobs',
|
|
287
294
|
family: 'viya-jobs',
|