@seamapi/http 1.12.0 → 1.13.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.
- package/dist/connect.cjs +5 -5
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +87 -30
- package/lib/seam/connect/error-interceptor.js +3 -1
- package/lib/seam/connect/error-interceptor.js.map +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +104 -28
- package/lib/seam/connect/routes/acs-encoders.d.ts +8 -8
- package/lib/seam/connect/routes/acs-encoders.js +4 -4
- package/lib/seam/connect/routes/acs-encoders.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/error-interceptor.ts +3 -1
- package/src/lib/seam/connect/routes/acs-encoders.ts +18 -18
- package/src/lib/version.ts +1 -1
|
@@ -51,12 +51,16 @@ export declare const resolveActionAttempt: <T extends {
|
|
|
51
51
|
status: "pending";
|
|
52
52
|
action_attempt_id: string;
|
|
53
53
|
result: null;
|
|
54
|
-
action_type: "
|
|
54
|
+
action_type: "SCAN_CREDENTIAL";
|
|
55
55
|
} | {
|
|
56
56
|
error: null;
|
|
57
57
|
status: "success";
|
|
58
58
|
action_attempt_id: string;
|
|
59
59
|
result: {
|
|
60
|
+
warnings: {
|
|
61
|
+
warning_code: "acs_credential_on_encoder_out_of_sync";
|
|
62
|
+
warning_message: string;
|
|
63
|
+
}[];
|
|
60
64
|
acs_credential_on_encoder: {
|
|
61
65
|
created_at: string | null;
|
|
62
66
|
starts_at: string | null;
|
|
@@ -160,22 +164,28 @@ export declare const resolveActionAttempt: <T extends {
|
|
|
160
164
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
161
165
|
} | null;
|
|
162
166
|
};
|
|
163
|
-
action_type: "
|
|
167
|
+
action_type: "SCAN_CREDENTIAL";
|
|
164
168
|
} | {
|
|
165
169
|
error: {
|
|
170
|
+
type: "uncategorized_error";
|
|
171
|
+
message: string;
|
|
172
|
+
} | {
|
|
173
|
+
type: "action_attempt_expired";
|
|
174
|
+
message: string;
|
|
175
|
+
} | {
|
|
166
176
|
type: "no_card_on_encoder";
|
|
167
177
|
message: string;
|
|
168
178
|
};
|
|
169
179
|
status: "error";
|
|
170
180
|
action_attempt_id: string;
|
|
171
181
|
result: null;
|
|
172
|
-
action_type: "
|
|
182
|
+
action_type: "SCAN_CREDENTIAL";
|
|
173
183
|
} | {
|
|
174
184
|
error: null;
|
|
175
185
|
status: "pending";
|
|
176
186
|
action_attempt_id: string;
|
|
177
187
|
result: null;
|
|
178
|
-
action_type: "
|
|
188
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
179
189
|
} | {
|
|
180
190
|
error: null;
|
|
181
191
|
status: "success";
|
|
@@ -261,16 +271,25 @@ export declare const resolveActionAttempt: <T extends {
|
|
|
261
271
|
is_latest_desired_state_synced_with_provider?: boolean | undefined;
|
|
262
272
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
263
273
|
};
|
|
264
|
-
action_type: "
|
|
274
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
265
275
|
} | {
|
|
266
276
|
error: {
|
|
267
|
-
type:
|
|
277
|
+
type: "uncategorized_error";
|
|
278
|
+
message: string;
|
|
279
|
+
} | {
|
|
280
|
+
type: "action_attempt_expired";
|
|
281
|
+
message: string;
|
|
282
|
+
} | {
|
|
283
|
+
type: "no_card_on_encoder";
|
|
284
|
+
message: string;
|
|
285
|
+
} | {
|
|
286
|
+
type: "incompatible_card_format";
|
|
268
287
|
message: string;
|
|
269
288
|
};
|
|
270
289
|
status: "error";
|
|
271
290
|
action_attempt_id: string;
|
|
272
291
|
result: null;
|
|
273
|
-
action_type: "
|
|
292
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
274
293
|
} | {
|
|
275
294
|
error: null;
|
|
276
295
|
status: "pending";
|
|
@@ -623,12 +642,16 @@ export declare const isSeamActionAttemptError: <T extends {
|
|
|
623
642
|
status: "pending";
|
|
624
643
|
action_attempt_id: string;
|
|
625
644
|
result: null;
|
|
626
|
-
action_type: "
|
|
645
|
+
action_type: "SCAN_CREDENTIAL";
|
|
627
646
|
} | {
|
|
628
647
|
error: null;
|
|
629
648
|
status: "success";
|
|
630
649
|
action_attempt_id: string;
|
|
631
650
|
result: {
|
|
651
|
+
warnings: {
|
|
652
|
+
warning_code: "acs_credential_on_encoder_out_of_sync";
|
|
653
|
+
warning_message: string;
|
|
654
|
+
}[];
|
|
632
655
|
acs_credential_on_encoder: {
|
|
633
656
|
created_at: string | null;
|
|
634
657
|
starts_at: string | null;
|
|
@@ -732,22 +755,28 @@ export declare const isSeamActionAttemptError: <T extends {
|
|
|
732
755
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
733
756
|
} | null;
|
|
734
757
|
};
|
|
735
|
-
action_type: "
|
|
758
|
+
action_type: "SCAN_CREDENTIAL";
|
|
736
759
|
} | {
|
|
737
760
|
error: {
|
|
761
|
+
type: "uncategorized_error";
|
|
762
|
+
message: string;
|
|
763
|
+
} | {
|
|
764
|
+
type: "action_attempt_expired";
|
|
765
|
+
message: string;
|
|
766
|
+
} | {
|
|
738
767
|
type: "no_card_on_encoder";
|
|
739
768
|
message: string;
|
|
740
769
|
};
|
|
741
770
|
status: "error";
|
|
742
771
|
action_attempt_id: string;
|
|
743
772
|
result: null;
|
|
744
|
-
action_type: "
|
|
773
|
+
action_type: "SCAN_CREDENTIAL";
|
|
745
774
|
} | {
|
|
746
775
|
error: null;
|
|
747
776
|
status: "pending";
|
|
748
777
|
action_attempt_id: string;
|
|
749
778
|
result: null;
|
|
750
|
-
action_type: "
|
|
779
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
751
780
|
} | {
|
|
752
781
|
error: null;
|
|
753
782
|
status: "success";
|
|
@@ -833,16 +862,25 @@ export declare const isSeamActionAttemptError: <T extends {
|
|
|
833
862
|
is_latest_desired_state_synced_with_provider?: boolean | undefined;
|
|
834
863
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
835
864
|
};
|
|
836
|
-
action_type: "
|
|
865
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
837
866
|
} | {
|
|
838
867
|
error: {
|
|
839
|
-
type:
|
|
868
|
+
type: "uncategorized_error";
|
|
869
|
+
message: string;
|
|
870
|
+
} | {
|
|
871
|
+
type: "action_attempt_expired";
|
|
872
|
+
message: string;
|
|
873
|
+
} | {
|
|
874
|
+
type: "no_card_on_encoder";
|
|
875
|
+
message: string;
|
|
876
|
+
} | {
|
|
877
|
+
type: "incompatible_card_format";
|
|
840
878
|
message: string;
|
|
841
879
|
};
|
|
842
880
|
status: "error";
|
|
843
881
|
action_attempt_id: string;
|
|
844
882
|
result: null;
|
|
845
|
-
action_type: "
|
|
883
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
846
884
|
} | {
|
|
847
885
|
error: null;
|
|
848
886
|
status: "pending";
|
|
@@ -1197,12 +1235,16 @@ export declare const isSeamActionAttemptFailedError: <T extends {
|
|
|
1197
1235
|
status: "pending";
|
|
1198
1236
|
action_attempt_id: string;
|
|
1199
1237
|
result: null;
|
|
1200
|
-
action_type: "
|
|
1238
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1201
1239
|
} | {
|
|
1202
1240
|
error: null;
|
|
1203
1241
|
status: "success";
|
|
1204
1242
|
action_attempt_id: string;
|
|
1205
1243
|
result: {
|
|
1244
|
+
warnings: {
|
|
1245
|
+
warning_code: "acs_credential_on_encoder_out_of_sync";
|
|
1246
|
+
warning_message: string;
|
|
1247
|
+
}[];
|
|
1206
1248
|
acs_credential_on_encoder: {
|
|
1207
1249
|
created_at: string | null;
|
|
1208
1250
|
starts_at: string | null;
|
|
@@ -1306,22 +1348,28 @@ export declare const isSeamActionAttemptFailedError: <T extends {
|
|
|
1306
1348
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
1307
1349
|
} | null;
|
|
1308
1350
|
};
|
|
1309
|
-
action_type: "
|
|
1351
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1310
1352
|
} | {
|
|
1311
1353
|
error: {
|
|
1354
|
+
type: "uncategorized_error";
|
|
1355
|
+
message: string;
|
|
1356
|
+
} | {
|
|
1357
|
+
type: "action_attempt_expired";
|
|
1358
|
+
message: string;
|
|
1359
|
+
} | {
|
|
1312
1360
|
type: "no_card_on_encoder";
|
|
1313
1361
|
message: string;
|
|
1314
1362
|
};
|
|
1315
1363
|
status: "error";
|
|
1316
1364
|
action_attempt_id: string;
|
|
1317
1365
|
result: null;
|
|
1318
|
-
action_type: "
|
|
1366
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1319
1367
|
} | {
|
|
1320
1368
|
error: null;
|
|
1321
1369
|
status: "pending";
|
|
1322
1370
|
action_attempt_id: string;
|
|
1323
1371
|
result: null;
|
|
1324
|
-
action_type: "
|
|
1372
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1325
1373
|
} | {
|
|
1326
1374
|
error: null;
|
|
1327
1375
|
status: "success";
|
|
@@ -1407,16 +1455,25 @@ export declare const isSeamActionAttemptFailedError: <T extends {
|
|
|
1407
1455
|
is_latest_desired_state_synced_with_provider?: boolean | undefined;
|
|
1408
1456
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
1409
1457
|
};
|
|
1410
|
-
action_type: "
|
|
1458
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1411
1459
|
} | {
|
|
1412
1460
|
error: {
|
|
1413
|
-
type:
|
|
1461
|
+
type: "uncategorized_error";
|
|
1462
|
+
message: string;
|
|
1463
|
+
} | {
|
|
1464
|
+
type: "action_attempt_expired";
|
|
1465
|
+
message: string;
|
|
1466
|
+
} | {
|
|
1467
|
+
type: "no_card_on_encoder";
|
|
1468
|
+
message: string;
|
|
1469
|
+
} | {
|
|
1470
|
+
type: "incompatible_card_format";
|
|
1414
1471
|
message: string;
|
|
1415
1472
|
};
|
|
1416
1473
|
status: "error";
|
|
1417
1474
|
action_attempt_id: string;
|
|
1418
1475
|
result: null;
|
|
1419
|
-
action_type: "
|
|
1476
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1420
1477
|
} | {
|
|
1421
1478
|
error: null;
|
|
1422
1479
|
status: "pending";
|
|
@@ -1771,12 +1828,16 @@ export declare const isSeamActionAttemptTimeoutError: <T extends {
|
|
|
1771
1828
|
status: "pending";
|
|
1772
1829
|
action_attempt_id: string;
|
|
1773
1830
|
result: null;
|
|
1774
|
-
action_type: "
|
|
1831
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1775
1832
|
} | {
|
|
1776
1833
|
error: null;
|
|
1777
1834
|
status: "success";
|
|
1778
1835
|
action_attempt_id: string;
|
|
1779
1836
|
result: {
|
|
1837
|
+
warnings: {
|
|
1838
|
+
warning_code: "acs_credential_on_encoder_out_of_sync";
|
|
1839
|
+
warning_message: string;
|
|
1840
|
+
}[];
|
|
1780
1841
|
acs_credential_on_encoder: {
|
|
1781
1842
|
created_at: string | null;
|
|
1782
1843
|
starts_at: string | null;
|
|
@@ -1880,22 +1941,28 @@ export declare const isSeamActionAttemptTimeoutError: <T extends {
|
|
|
1880
1941
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
1881
1942
|
} | null;
|
|
1882
1943
|
};
|
|
1883
|
-
action_type: "
|
|
1944
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1884
1945
|
} | {
|
|
1885
1946
|
error: {
|
|
1947
|
+
type: "uncategorized_error";
|
|
1948
|
+
message: string;
|
|
1949
|
+
} | {
|
|
1950
|
+
type: "action_attempt_expired";
|
|
1951
|
+
message: string;
|
|
1952
|
+
} | {
|
|
1886
1953
|
type: "no_card_on_encoder";
|
|
1887
1954
|
message: string;
|
|
1888
1955
|
};
|
|
1889
1956
|
status: "error";
|
|
1890
1957
|
action_attempt_id: string;
|
|
1891
1958
|
result: null;
|
|
1892
|
-
action_type: "
|
|
1959
|
+
action_type: "SCAN_CREDENTIAL";
|
|
1893
1960
|
} | {
|
|
1894
1961
|
error: null;
|
|
1895
1962
|
status: "pending";
|
|
1896
1963
|
action_attempt_id: string;
|
|
1897
1964
|
result: null;
|
|
1898
|
-
action_type: "
|
|
1965
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1899
1966
|
} | {
|
|
1900
1967
|
error: null;
|
|
1901
1968
|
status: "success";
|
|
@@ -1981,16 +2048,25 @@ export declare const isSeamActionAttemptTimeoutError: <T extends {
|
|
|
1981
2048
|
is_latest_desired_state_synced_with_provider?: boolean | undefined;
|
|
1982
2049
|
latest_desired_state_synced_with_provider_at?: string | undefined;
|
|
1983
2050
|
};
|
|
1984
|
-
action_type: "
|
|
2051
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1985
2052
|
} | {
|
|
1986
2053
|
error: {
|
|
1987
|
-
type:
|
|
2054
|
+
type: "uncategorized_error";
|
|
2055
|
+
message: string;
|
|
2056
|
+
} | {
|
|
2057
|
+
type: "action_attempt_expired";
|
|
2058
|
+
message: string;
|
|
2059
|
+
} | {
|
|
2060
|
+
type: "no_card_on_encoder";
|
|
2061
|
+
message: string;
|
|
2062
|
+
} | {
|
|
2063
|
+
type: "incompatible_card_format";
|
|
1988
2064
|
message: string;
|
|
1989
2065
|
};
|
|
1990
2066
|
status: "error";
|
|
1991
2067
|
action_attempt_id: string;
|
|
1992
2068
|
result: null;
|
|
1993
|
-
action_type: "
|
|
2069
|
+
action_type: "ENCODE_CREDENTIAL";
|
|
1994
2070
|
} | {
|
|
1995
2071
|
error: null;
|
|
1996
2072
|
status: "pending";
|
|
@@ -14,16 +14,16 @@ export declare class SeamHttpAcsEncoders {
|
|
|
14
14
|
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpAcsEncoders;
|
|
15
15
|
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpAcsEncoders;
|
|
16
16
|
updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
|
|
17
|
-
|
|
17
|
+
encodeCredential(body?: AcsEncodersEncodeCredentialBody, options?: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>): SeamHttpRequest<AcsEncodersEncodeCredentialResponse, 'action_attempt'>;
|
|
18
18
|
list(body?: AcsEncodersListParams): SeamHttpRequest<AcsEncodersListResponse, 'devices'>;
|
|
19
|
-
|
|
19
|
+
scanCredential(body?: AcsEncodersScanCredentialBody, options?: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>): SeamHttpRequest<AcsEncodersScanCredentialResponse, 'action_attempt'>;
|
|
20
20
|
}
|
|
21
|
-
export type
|
|
22
|
-
export type
|
|
23
|
-
export type
|
|
21
|
+
export type AcsEncodersEncodeCredentialBody = RouteRequestBody<'/acs/encoders/encode_credential'>;
|
|
22
|
+
export type AcsEncodersEncodeCredentialResponse = SetNonNullable<Required<RouteResponse<'/acs/encoders/encode_credential'>>>;
|
|
23
|
+
export type AcsEncodersEncodeCredentialOptions = Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>;
|
|
24
24
|
export type AcsEncodersListParams = RouteRequestBody<'/acs/encoders/list'>;
|
|
25
25
|
export type AcsEncodersListResponse = SetNonNullable<Required<RouteResponse<'/acs/encoders/list'>>>;
|
|
26
26
|
export type AcsEncodersListOptions = never;
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
27
|
+
export type AcsEncodersScanCredentialBody = RouteRequestBody<'/acs/encoders/scan_credential'>;
|
|
28
|
+
export type AcsEncodersScanCredentialResponse = SetNonNullable<Required<RouteResponse<'/acs/encoders/scan_credential'>>>;
|
|
29
|
+
export type AcsEncodersScanCredentialOptions = Pick<SeamHttpRequestOptions, 'waitForActionAttempt'>;
|
|
@@ -76,9 +76,9 @@ export class SeamHttpAcsEncoders {
|
|
|
76
76
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
77
77
|
await clientSessions.get();
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
encodeCredential(body, options = {}) {
|
|
80
80
|
return new SeamHttpRequest(this, {
|
|
81
|
-
path: '/acs/encoders/
|
|
81
|
+
path: '/acs/encoders/encode_credential',
|
|
82
82
|
method: 'post',
|
|
83
83
|
body,
|
|
84
84
|
responseKey: 'action_attempt',
|
|
@@ -93,9 +93,9 @@ export class SeamHttpAcsEncoders {
|
|
|
93
93
|
responseKey: 'devices',
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
scanCredential(body, options = {}) {
|
|
97
97
|
return new SeamHttpRequest(this, {
|
|
98
|
-
path: '/acs/encoders/
|
|
98
|
+
path: '/acs/encoders/scan_credential',
|
|
99
99
|
method: 'post',
|
|
100
100
|
body,
|
|
101
101
|
responseKey: 'action_attempt',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acs-encoders.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-encoders.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAGvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OA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;IAED,cAAc,CACZ,IAAoC,EACpC,UAAgE,EAAE;QAElE,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,+BAA+B;YACrC,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,gBAAgB;YAC7B,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiJavascriptHttpVersion = "1.
|
|
1
|
+
declare const seamapiJavascriptHttpVersion = "1.13.1";
|
|
2
2
|
export default seamapiJavascriptHttpVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/http",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "JavaScript HTTP client for the Seam API written in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"npm": ">= 9.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@seamapi/types": "^1.
|
|
87
|
+
"@seamapi/types": "^1.286.3"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"@seamapi/types": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@seamapi/fake-seam-connect": "1.71.0",
|
|
102
|
-
"@seamapi/types": "1.
|
|
102
|
+
"@seamapi/types": "1.286.3",
|
|
103
103
|
"@types/eslint": "^8.44.2",
|
|
104
104
|
"@types/node": "^20.8.10",
|
|
105
105
|
"ava": "^5.0.1",
|
|
@@ -53,7 +53,9 @@ const isApiErrorResponse = (
|
|
|
53
53
|
typeof data.error === 'object' &&
|
|
54
54
|
data.error != null &&
|
|
55
55
|
'type' in data.error &&
|
|
56
|
-
typeof data.error.type === 'string'
|
|
56
|
+
typeof data.error.type === 'string' &&
|
|
57
|
+
'message' in data.error &&
|
|
58
|
+
typeof data.error.message === 'string'
|
|
57
59
|
)
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -154,12 +154,12 @@ export class SeamHttpAcsEncoders {
|
|
|
154
154
|
await clientSessions.get()
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
body?:
|
|
157
|
+
encodeCredential(
|
|
158
|
+
body?: AcsEncodersEncodeCredentialBody,
|
|
159
159
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
160
|
-
): SeamHttpRequest<
|
|
160
|
+
): SeamHttpRequest<AcsEncodersEncodeCredentialResponse, 'action_attempt'> {
|
|
161
161
|
return new SeamHttpRequest(this, {
|
|
162
|
-
path: '/acs/encoders/
|
|
162
|
+
path: '/acs/encoders/encode_credential',
|
|
163
163
|
method: 'post',
|
|
164
164
|
body,
|
|
165
165
|
responseKey: 'action_attempt',
|
|
@@ -178,12 +178,12 @@ export class SeamHttpAcsEncoders {
|
|
|
178
178
|
})
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
body?:
|
|
181
|
+
scanCredential(
|
|
182
|
+
body?: AcsEncodersScanCredentialBody,
|
|
183
183
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
184
|
-
): SeamHttpRequest<
|
|
184
|
+
): SeamHttpRequest<AcsEncodersScanCredentialResponse, 'action_attempt'> {
|
|
185
185
|
return new SeamHttpRequest(this, {
|
|
186
|
-
path: '/acs/encoders/
|
|
186
|
+
path: '/acs/encoders/scan_credential',
|
|
187
187
|
method: 'post',
|
|
188
188
|
body,
|
|
189
189
|
responseKey: 'action_attempt',
|
|
@@ -192,14 +192,14 @@ export class SeamHttpAcsEncoders {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
export type
|
|
196
|
-
RouteRequestBody<'/acs/encoders/
|
|
195
|
+
export type AcsEncodersEncodeCredentialBody =
|
|
196
|
+
RouteRequestBody<'/acs/encoders/encode_credential'>
|
|
197
197
|
|
|
198
|
-
export type
|
|
199
|
-
Required<RouteResponse<'/acs/encoders/
|
|
198
|
+
export type AcsEncodersEncodeCredentialResponse = SetNonNullable<
|
|
199
|
+
Required<RouteResponse<'/acs/encoders/encode_credential'>>
|
|
200
200
|
>
|
|
201
201
|
|
|
202
|
-
export type
|
|
202
|
+
export type AcsEncodersEncodeCredentialOptions = Pick<
|
|
203
203
|
SeamHttpRequestOptions,
|
|
204
204
|
'waitForActionAttempt'
|
|
205
205
|
>
|
|
@@ -212,14 +212,14 @@ export type AcsEncodersListResponse = SetNonNullable<
|
|
|
212
212
|
|
|
213
213
|
export type AcsEncodersListOptions = never
|
|
214
214
|
|
|
215
|
-
export type
|
|
216
|
-
RouteRequestBody<'/acs/encoders/
|
|
215
|
+
export type AcsEncodersScanCredentialBody =
|
|
216
|
+
RouteRequestBody<'/acs/encoders/scan_credential'>
|
|
217
217
|
|
|
218
|
-
export type
|
|
219
|
-
Required<RouteResponse<'/acs/encoders/
|
|
218
|
+
export type AcsEncodersScanCredentialResponse = SetNonNullable<
|
|
219
|
+
Required<RouteResponse<'/acs/encoders/scan_credential'>>
|
|
220
220
|
>
|
|
221
221
|
|
|
222
|
-
export type
|
|
222
|
+
export type AcsEncodersScanCredentialOptions = Pick<
|
|
223
223
|
SeamHttpRequestOptions,
|
|
224
224
|
'waitForActionAttempt'
|
|
225
225
|
>
|
package/src/lib/version.ts
CHANGED