@aws-sdk/client-frauddetector 3.28.0 → 3.32.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.
@@ -1814,6 +1814,49 @@ export declare namespace GetEventPredictionRequest {
1814
1814
  */
1815
1815
  const filterSensitiveLog: (obj: GetEventPredictionRequest) => any;
1816
1816
  }
1817
+ export declare enum ModelSource {
1818
+ SAGEMAKER = "SAGEMAKER"
1819
+ }
1820
+ /**
1821
+ * <p>The Amazon SageMaker model.</p>
1822
+ */
1823
+ export interface ExternalModelSummary {
1824
+ /**
1825
+ * <p>The endpoint of the Amazon SageMaker model.</p>
1826
+ */
1827
+ modelEndpoint?: string;
1828
+ /**
1829
+ * <p>The source of the model.</p>
1830
+ */
1831
+ modelSource?: ModelSource | string;
1832
+ }
1833
+ export declare namespace ExternalModelSummary {
1834
+ /**
1835
+ * @internal
1836
+ */
1837
+ const filterSensitiveLog: (obj: ExternalModelSummary) => any;
1838
+ }
1839
+ /**
1840
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
1841
+ */
1842
+ export interface ExternalModelOutputs {
1843
+ /**
1844
+ * <p>The Amazon SageMaker model.</p>
1845
+ */
1846
+ externalModel?: ExternalModelSummary;
1847
+ /**
1848
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
1849
+ */
1850
+ outputs?: {
1851
+ [key: string]: string;
1852
+ };
1853
+ }
1854
+ export declare namespace ExternalModelOutputs {
1855
+ /**
1856
+ * @internal
1857
+ */
1858
+ const filterSensitiveLog: (obj: ExternalModelOutputs) => any;
1859
+ }
1817
1860
  /**
1818
1861
  * <p>The fraud prediction scores.</p>
1819
1862
  */
@@ -1863,6 +1906,10 @@ export interface GetEventPredictionResult {
1863
1906
  * <p>The results from the rules.</p>
1864
1907
  */
1865
1908
  ruleResults?: RuleResult[];
1909
+ /**
1910
+ * <p>The model scores for Amazon SageMaker models.</p>
1911
+ */
1912
+ externalModelOutputs?: ExternalModelOutputs[];
1866
1913
  }
1867
1914
  export declare namespace GetEventPredictionResult {
1868
1915
  /**
@@ -2029,9 +2076,6 @@ export declare enum ModelEndpointStatus {
2029
2076
  ASSOCIATED = "ASSOCIATED",
2030
2077
  DISSOCIATED = "DISSOCIATED"
2031
2078
  }
2032
- export declare enum ModelSource {
2033
- SAGEMAKER = "SAGEMAKER"
2034
- }
2035
2079
  export declare enum ModelOutputDataFormat {
2036
2080
  CSV = "TEXT_CSV",
2037
2081
  JSONLINES = "APPLICATION_JSONLINES"
@@ -1814,6 +1814,49 @@ export declare namespace GetEventPredictionRequest {
1814
1814
  */
1815
1815
  const filterSensitiveLog: (obj: GetEventPredictionRequest) => any;
1816
1816
  }
1817
+ export declare enum ModelSource {
1818
+ SAGEMAKER = "SAGEMAKER"
1819
+ }
1820
+ /**
1821
+ * <p>The Amazon SageMaker model.</p>
1822
+ */
1823
+ export interface ExternalModelSummary {
1824
+ /**
1825
+ * <p>The endpoint of the Amazon SageMaker model.</p>
1826
+ */
1827
+ modelEndpoint?: string;
1828
+ /**
1829
+ * <p>The source of the model.</p>
1830
+ */
1831
+ modelSource?: ModelSource | string;
1832
+ }
1833
+ export declare namespace ExternalModelSummary {
1834
+ /**
1835
+ * @internal
1836
+ */
1837
+ const filterSensitiveLog: (obj: ExternalModelSummary) => any;
1838
+ }
1839
+ /**
1840
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
1841
+ */
1842
+ export interface ExternalModelOutputs {
1843
+ /**
1844
+ * <p>The Amazon SageMaker model.</p>
1845
+ */
1846
+ externalModel?: ExternalModelSummary;
1847
+ /**
1848
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
1849
+ */
1850
+ outputs?: {
1851
+ [key: string]: string;
1852
+ };
1853
+ }
1854
+ export declare namespace ExternalModelOutputs {
1855
+ /**
1856
+ * @internal
1857
+ */
1858
+ const filterSensitiveLog: (obj: ExternalModelOutputs) => any;
1859
+ }
1817
1860
  /**
1818
1861
  * <p>The fraud prediction scores.</p>
1819
1862
  */
@@ -1863,6 +1906,10 @@ export interface GetEventPredictionResult {
1863
1906
  * <p>The results from the rules.</p>
1864
1907
  */
1865
1908
  ruleResults?: RuleResult[];
1909
+ /**
1910
+ * <p>The model scores for Amazon SageMaker models.</p>
1911
+ */
1912
+ externalModelOutputs?: ExternalModelOutputs[];
1866
1913
  }
1867
1914
  export declare namespace GetEventPredictionResult {
1868
1915
  /**
@@ -2029,9 +2076,6 @@ export declare enum ModelEndpointStatus {
2029
2076
  ASSOCIATED = "ASSOCIATED",
2030
2077
  DISSOCIATED = "DISSOCIATED"
2031
2078
  }
2032
- export declare enum ModelSource {
2033
- SAGEMAKER = "SAGEMAKER"
2034
- }
2035
2079
  export declare enum ModelOutputDataFormat {
2036
2080
  CSV = "TEXT_CSV",
2037
2081
  JSONLINES = "APPLICATION_JSONLINES"
@@ -2318,6 +2318,58 @@ export namespace GetEventPredictionRequest {
2318
2318
  });
2319
2319
  }
2320
2320
 
2321
+ export enum ModelSource {
2322
+ SAGEMAKER = "SAGEMAKER",
2323
+ }
2324
+
2325
+ /**
2326
+ * <p>The Amazon SageMaker model.</p>
2327
+ */
2328
+ export interface ExternalModelSummary {
2329
+ /**
2330
+ * <p>The endpoint of the Amazon SageMaker model.</p>
2331
+ */
2332
+ modelEndpoint?: string;
2333
+
2334
+ /**
2335
+ * <p>The source of the model.</p>
2336
+ */
2337
+ modelSource?: ModelSource | string;
2338
+ }
2339
+
2340
+ export namespace ExternalModelSummary {
2341
+ /**
2342
+ * @internal
2343
+ */
2344
+ export const filterSensitiveLog = (obj: ExternalModelSummary): any => ({
2345
+ ...obj,
2346
+ });
2347
+ }
2348
+
2349
+ /**
2350
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
2351
+ */
2352
+ export interface ExternalModelOutputs {
2353
+ /**
2354
+ * <p>The Amazon SageMaker model.</p>
2355
+ */
2356
+ externalModel?: ExternalModelSummary;
2357
+
2358
+ /**
2359
+ * <p>The fraud prediction scores from Amazon SageMaker model.</p>
2360
+ */
2361
+ outputs?: { [key: string]: string };
2362
+ }
2363
+
2364
+ export namespace ExternalModelOutputs {
2365
+ /**
2366
+ * @internal
2367
+ */
2368
+ export const filterSensitiveLog = (obj: ExternalModelOutputs): any => ({
2369
+ ...obj,
2370
+ });
2371
+ }
2372
+
2321
2373
  /**
2322
2374
  * <p>The fraud prediction scores.</p>
2323
2375
  */
@@ -2376,6 +2428,11 @@ export interface GetEventPredictionResult {
2376
2428
  * <p>The results from the rules.</p>
2377
2429
  */
2378
2430
  ruleResults?: RuleResult[];
2431
+
2432
+ /**
2433
+ * <p>The model scores for Amazon SageMaker models.</p>
2434
+ */
2435
+ externalModelOutputs?: ExternalModelOutputs[];
2379
2436
  }
2380
2437
 
2381
2438
  export namespace GetEventPredictionResult {
@@ -2589,10 +2646,6 @@ export enum ModelEndpointStatus {
2589
2646
  DISSOCIATED = "DISSOCIATED",
2590
2647
  }
2591
2648
 
2592
- export enum ModelSource {
2593
- SAGEMAKER = "SAGEMAKER",
2594
- }
2595
-
2596
2649
  export enum ModelOutputDataFormat {
2597
2650
  CSV = "TEXT_CSV",
2598
2651
  JSONLINES = "APPLICATION_JSONLINES",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-frauddetector",
3
3
  "description": "AWS SDK for JavaScript Frauddetector Client for Node.js, Browser and React Native",
4
- "version": "3.28.0",
4
+ "version": "3.32.0",
5
5
  "scripts": {
6
6
  "clean": "yarn remove-definitions && yarn remove-dist && yarn remove-documentation",
7
7
  "build-documentation": "yarn remove-documentation && typedoc ./",
@@ -27,45 +27,45 @@
27
27
  "dependencies": {
28
28
  "@aws-crypto/sha256-browser": "^1.0.0",
29
29
  "@aws-crypto/sha256-js": "^1.0.0",
30
- "@aws-sdk/client-sts": "3.28.0",
31
- "@aws-sdk/config-resolver": "3.28.0",
32
- "@aws-sdk/credential-provider-node": "3.28.0",
33
- "@aws-sdk/fetch-http-handler": "3.25.0",
34
- "@aws-sdk/hash-node": "3.25.0",
35
- "@aws-sdk/invalid-dependency": "3.25.0",
36
- "@aws-sdk/middleware-content-length": "3.25.0",
37
- "@aws-sdk/middleware-host-header": "3.25.0",
38
- "@aws-sdk/middleware-logger": "3.25.0",
39
- "@aws-sdk/middleware-retry": "3.28.0",
40
- "@aws-sdk/middleware-serde": "3.25.0",
41
- "@aws-sdk/middleware-signing": "3.28.0",
42
- "@aws-sdk/middleware-stack": "3.25.0",
43
- "@aws-sdk/middleware-user-agent": "3.25.0",
44
- "@aws-sdk/node-config-provider": "3.28.0",
45
- "@aws-sdk/node-http-handler": "3.25.0",
46
- "@aws-sdk/protocol-http": "3.25.0",
47
- "@aws-sdk/smithy-client": "3.28.0",
48
- "@aws-sdk/types": "3.25.0",
49
- "@aws-sdk/url-parser": "3.25.0",
50
- "@aws-sdk/util-base64-browser": "3.23.0",
51
- "@aws-sdk/util-base64-node": "3.23.0",
52
- "@aws-sdk/util-body-length-browser": "3.23.0",
53
- "@aws-sdk/util-body-length-node": "3.23.0",
54
- "@aws-sdk/util-user-agent-browser": "3.25.0",
55
- "@aws-sdk/util-user-agent-node": "3.28.0",
56
- "@aws-sdk/util-utf8-browser": "3.23.0",
57
- "@aws-sdk/util-utf8-node": "3.23.0",
30
+ "@aws-sdk/client-sts": "3.32.0",
31
+ "@aws-sdk/config-resolver": "3.32.0",
32
+ "@aws-sdk/credential-provider-node": "3.32.0",
33
+ "@aws-sdk/fetch-http-handler": "3.32.0",
34
+ "@aws-sdk/hash-node": "3.32.0",
35
+ "@aws-sdk/invalid-dependency": "3.32.0",
36
+ "@aws-sdk/middleware-content-length": "3.32.0",
37
+ "@aws-sdk/middleware-host-header": "3.32.0",
38
+ "@aws-sdk/middleware-logger": "3.32.0",
39
+ "@aws-sdk/middleware-retry": "3.32.0",
40
+ "@aws-sdk/middleware-serde": "3.32.0",
41
+ "@aws-sdk/middleware-signing": "3.32.0",
42
+ "@aws-sdk/middleware-stack": "3.32.0",
43
+ "@aws-sdk/middleware-user-agent": "3.32.0",
44
+ "@aws-sdk/node-config-provider": "3.32.0",
45
+ "@aws-sdk/node-http-handler": "3.32.0",
46
+ "@aws-sdk/protocol-http": "3.32.0",
47
+ "@aws-sdk/smithy-client": "3.32.0",
48
+ "@aws-sdk/types": "3.32.0",
49
+ "@aws-sdk/url-parser": "3.32.0",
50
+ "@aws-sdk/util-base64-browser": "3.32.0",
51
+ "@aws-sdk/util-base64-node": "3.32.0",
52
+ "@aws-sdk/util-body-length-browser": "3.32.0",
53
+ "@aws-sdk/util-body-length-node": "3.32.0",
54
+ "@aws-sdk/util-user-agent-browser": "3.32.0",
55
+ "@aws-sdk/util-user-agent-node": "3.32.0",
56
+ "@aws-sdk/util-utf8-browser": "3.32.0",
57
+ "@aws-sdk/util-utf8-node": "3.32.0",
58
58
  "tslib": "^2.3.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@aws-sdk/client-documentation-generator": "3.23.0",
61
+ "@aws-sdk/client-documentation-generator": "3.32.0",
62
62
  "@types/node": "^12.7.5",
63
63
  "downlevel-dts": "0.7.0",
64
64
  "jest": "^26.1.0",
65
65
  "rimraf": "^3.0.0",
66
66
  "ts-jest": "^26.4.1",
67
67
  "typedoc": "^0.19.2",
68
- "typescript": "~4.3.2"
68
+ "typescript": "~4.3.5"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=10.0.0"
@@ -165,6 +165,8 @@ import {
165
165
  EventType,
166
166
  ExternalEventsDetail,
167
167
  ExternalModel,
168
+ ExternalModelOutputs,
169
+ ExternalModelSummary,
168
170
  FieldValidationMessage,
169
171
  FileValidationMessage,
170
172
  GetBatchPredictionJobsRequest,
@@ -264,9 +266,9 @@ import {
264
266
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
265
267
  import {
266
268
  expectBoolean as __expectBoolean,
267
- expectInt as __expectInt,
269
+ expectInt32 as __expectInt32,
268
270
  expectString as __expectString,
269
- limitedParseFloat as __limitedParseFloat,
271
+ limitedParseFloat32 as __limitedParseFloat32,
270
272
  } from "@aws-sdk/smithy-client";
271
273
  import {
272
274
  Endpoint as __Endpoint,
@@ -6920,7 +6922,7 @@ const deserializeAws_json1_1BatchCreateVariableError = (
6920
6922
  context: __SerdeContext
6921
6923
  ): BatchCreateVariableError => {
6922
6924
  return {
6923
- code: __expectInt(output.code),
6925
+ code: __expectInt32(output.code),
6924
6926
  message: __expectString(output.message),
6925
6927
  name: __expectString(output.name),
6926
6928
  } as any;
@@ -6954,7 +6956,7 @@ const deserializeAws_json1_1BatchCreateVariableResult = (
6954
6956
 
6955
6957
  const deserializeAws_json1_1BatchGetVariableError = (output: any, context: __SerdeContext): BatchGetVariableError => {
6956
6958
  return {
6957
- code: __expectInt(output.code),
6959
+ code: __expectInt32(output.code),
6958
6960
  message: __expectString(output.message),
6959
6961
  name: __expectString(output.name),
6960
6962
  } as any;
@@ -7000,10 +7002,10 @@ const deserializeAws_json1_1BatchPrediction = (output: any, context: __SerdeCont
7000
7002
  jobId: __expectString(output.jobId),
7001
7003
  lastHeartbeatTime: __expectString(output.lastHeartbeatTime),
7002
7004
  outputPath: __expectString(output.outputPath),
7003
- processedRecordsCount: __expectInt(output.processedRecordsCount),
7005
+ processedRecordsCount: __expectInt32(output.processedRecordsCount),
7004
7006
  startTime: __expectString(output.startTime),
7005
7007
  status: __expectString(output.status),
7006
- totalRecordsCount: __expectInt(output.totalRecordsCount),
7008
+ totalRecordsCount: __expectInt32(output.totalRecordsCount),
7007
7009
  } as any;
7008
7010
  };
7009
7011
 
@@ -7330,6 +7332,41 @@ const deserializeAws_json1_1ExternalModelList = (output: any, context: __SerdeCo
7330
7332
  });
7331
7333
  };
7332
7334
 
7335
+ const deserializeAws_json1_1ExternalModelOutputs = (output: any, context: __SerdeContext): ExternalModelOutputs => {
7336
+ return {
7337
+ externalModel:
7338
+ output.externalModel !== undefined && output.externalModel !== null
7339
+ ? deserializeAws_json1_1ExternalModelSummary(output.externalModel, context)
7340
+ : undefined,
7341
+ outputs:
7342
+ output.outputs !== undefined && output.outputs !== null
7343
+ ? deserializeAws_json1_1ExternalModelPredictionMap(output.outputs, context)
7344
+ : undefined,
7345
+ } as any;
7346
+ };
7347
+
7348
+ const deserializeAws_json1_1ExternalModelPredictionMap = (
7349
+ output: any,
7350
+ context: __SerdeContext
7351
+ ): { [key: string]: string } => {
7352
+ return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
7353
+ if (value === null) {
7354
+ return acc;
7355
+ }
7356
+ return {
7357
+ ...acc,
7358
+ [key]: __expectString(value) as any,
7359
+ };
7360
+ }, {});
7361
+ };
7362
+
7363
+ const deserializeAws_json1_1ExternalModelSummary = (output: any, context: __SerdeContext): ExternalModelSummary => {
7364
+ return {
7365
+ modelEndpoint: __expectString(output.modelEndpoint),
7366
+ modelSource: __expectString(output.modelSource),
7367
+ } as any;
7368
+ };
7369
+
7333
7370
  const deserializeAws_json1_1FieldValidationMessage = (output: any, context: __SerdeContext): FieldValidationMessage => {
7334
7371
  return {
7335
7372
  content: __expectString(output.content),
@@ -7442,6 +7479,10 @@ const deserializeAws_json1_1GetEventPredictionResult = (
7442
7479
  context: __SerdeContext
7443
7480
  ): GetEventPredictionResult => {
7444
7481
  return {
7482
+ externalModelOutputs:
7483
+ output.externalModelOutputs !== undefined && output.externalModelOutputs !== null
7484
+ ? deserializeAws_json1_1ListOfExternalModelOutputs(output.externalModelOutputs, context)
7485
+ : undefined,
7445
7486
  modelScores:
7446
7487
  output.modelScores !== undefined && output.modelScores !== null
7447
7488
  ? deserializeAws_json1_1ListOfModelScores(output.modelScores, context)
@@ -7629,6 +7670,20 @@ const deserializeAws_json1_1LabelSchema = (output: any, context: __SerdeContext)
7629
7670
  } as any;
7630
7671
  };
7631
7672
 
7673
+ const deserializeAws_json1_1ListOfExternalModelOutputs = (
7674
+ output: any,
7675
+ context: __SerdeContext
7676
+ ): ExternalModelOutputs[] => {
7677
+ return (output || [])
7678
+ .filter((e: any) => e != null)
7679
+ .map((entry: any) => {
7680
+ if (entry === null) {
7681
+ return null as any;
7682
+ }
7683
+ return deserializeAws_json1_1ExternalModelOutputs(entry, context);
7684
+ });
7685
+ };
7686
+
7632
7687
  const deserializeAws_json1_1ListOfLogOddsMetrics = (output: any, context: __SerdeContext): LogOddsMetric[] => {
7633
7688
  return (output || [])
7634
7689
  .filter((e: any) => e != null)
@@ -7699,7 +7754,7 @@ const deserializeAws_json1_1ListTagsForResourceResult = (
7699
7754
 
7700
7755
  const deserializeAws_json1_1LogOddsMetric = (output: any, context: __SerdeContext): LogOddsMetric => {
7701
7756
  return {
7702
- variableImportance: __limitedParseFloat(output.variableImportance),
7757
+ variableImportance: __limitedParseFloat32(output.variableImportance),
7703
7758
  variableName: __expectString(output.variableName),
7704
7759
  variableType: __expectString(output.variableType),
7705
7760
  } as any;
@@ -7707,10 +7762,10 @@ const deserializeAws_json1_1LogOddsMetric = (output: any, context: __SerdeContex
7707
7762
 
7708
7763
  const deserializeAws_json1_1MetricDataPoint = (output: any, context: __SerdeContext): MetricDataPoint => {
7709
7764
  return {
7710
- fpr: __limitedParseFloat(output.fpr),
7711
- precision: __limitedParseFloat(output.precision),
7712
- threshold: __limitedParseFloat(output.threshold),
7713
- tpr: __limitedParseFloat(output.tpr),
7765
+ fpr: __limitedParseFloat32(output.fpr),
7766
+ precision: __limitedParseFloat32(output.precision),
7767
+ threshold: __limitedParseFloat32(output.threshold),
7768
+ tpr: __limitedParseFloat32(output.tpr),
7714
7769
  } as any;
7715
7770
  };
7716
7771
 
@@ -7785,7 +7840,7 @@ const deserializeAws_json1_1ModelPredictionMap = (output: any, context: __SerdeC
7785
7840
  }
7786
7841
  return {
7787
7842
  ...acc,
7788
- [key]: __limitedParseFloat(value) as any,
7843
+ [key]: __limitedParseFloat32(value) as any,
7789
7844
  };
7790
7845
  }, {});
7791
7846
  };
@@ -8030,7 +8085,7 @@ const deserializeAws_json1_1TrainingDataSchema = (output: any, context: __SerdeC
8030
8085
 
8031
8086
  const deserializeAws_json1_1TrainingMetrics = (output: any, context: __SerdeContext): TrainingMetrics => {
8032
8087
  return {
8033
- auc: __limitedParseFloat(output.auc),
8088
+ auc: __limitedParseFloat32(output.auc),
8034
8089
  metricDataPoints:
8035
8090
  output.metricDataPoints !== undefined && output.metricDataPoints !== null
8036
8091
  ? deserializeAws_json1_1metricDataPointsList(output.metricDataPoints, context)