@anweather/game-plugin-ssdk 1.2.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.
Files changed (88) hide show
  1. package/dist-cjs/runtime/defaultService.js +18 -0
  2. package/dist-cjs/runtime/express.js +39 -0
  3. package/dist-cjs/runtime/index.js +7 -0
  4. package/dist-cjs/src/endpoint/EndpointParameters.js +12 -0
  5. package/dist-cjs/src/endpoint/endpointResolver.js +16 -0
  6. package/dist-cjs/src/endpoint/ruleset.js +38 -0
  7. package/dist-cjs/src/index.js +7 -0
  8. package/dist-cjs/src/models/index.js +4 -0
  9. package/dist-cjs/src/models/models_0.js +860 -0
  10. package/dist-cjs/src/protocols/Aws_restJson1.js +1077 -0
  11. package/dist-cjs/src/server/GamePluginService.js +231 -0
  12. package/dist-cjs/src/server/index.js +5 -0
  13. package/dist-cjs/src/server/operations/ApplyMove.js +109 -0
  14. package/dist-cjs/src/server/operations/ApplySaveFileEdit.js +109 -0
  15. package/dist-cjs/src/server/operations/AssignParticipants.js +101 -0
  16. package/dist-cjs/src/server/operations/DescribeSaveFile.js +101 -0
  17. package/dist-cjs/src/server/operations/GetGameResult.js +101 -0
  18. package/dist-cjs/src/server/operations/GetGameStatus.js +101 -0
  19. package/dist-cjs/src/server/operations/GetMetadata.js +99 -0
  20. package/dist-cjs/src/server/operations/GetPlayerView.js +101 -0
  21. package/dist-cjs/src/server/operations/GetSaveFileEditorState.js +101 -0
  22. package/dist-cjs/src/server/operations/Health.js +99 -0
  23. package/dist-cjs/src/server/operations/InitializeGame.js +101 -0
  24. package/dist-cjs/src/server/operations/IsConfigMove.js +101 -0
  25. package/dist-cjs/src/server/operations/IsOutOfTurnMove.js +101 -0
  26. package/dist-cjs/src/server/operations/SelectBotMove.js +101 -0
  27. package/dist-cjs/src/server/operations/ValidateMove.js +101 -0
  28. package/dist-cjs/src/server/operations/index.js +18 -0
  29. package/dist-cjs/tsconfig.cjs.tsbuildinfo +1 -0
  30. package/dist-es/runtime/defaultService.js +15 -0
  31. package/dist-es/runtime/express.js +36 -0
  32. package/dist-es/runtime/index.js +2 -0
  33. package/dist-es/src/endpoint/EndpointParameters.js +8 -0
  34. package/dist-es/src/endpoint/endpointResolver.js +12 -0
  35. package/dist-es/src/endpoint/ruleset.js +35 -0
  36. package/dist-es/src/index.js +3 -0
  37. package/dist-es/src/models/index.js +1 -0
  38. package/dist-es/src/models/models_0.js +855 -0
  39. package/dist-es/src/protocols/Aws_restJson1.js +1041 -0
  40. package/dist-es/src/server/GamePluginService.js +226 -0
  41. package/dist-es/src/server/index.js +2 -0
  42. package/dist-es/src/server/operations/ApplyMove.js +103 -0
  43. package/dist-es/src/server/operations/ApplySaveFileEdit.js +103 -0
  44. package/dist-es/src/server/operations/AssignParticipants.js +95 -0
  45. package/dist-es/src/server/operations/DescribeSaveFile.js +95 -0
  46. package/dist-es/src/server/operations/GetGameResult.js +95 -0
  47. package/dist-es/src/server/operations/GetGameStatus.js +95 -0
  48. package/dist-es/src/server/operations/GetMetadata.js +93 -0
  49. package/dist-es/src/server/operations/GetPlayerView.js +95 -0
  50. package/dist-es/src/server/operations/GetSaveFileEditorState.js +95 -0
  51. package/dist-es/src/server/operations/Health.js +93 -0
  52. package/dist-es/src/server/operations/InitializeGame.js +95 -0
  53. package/dist-es/src/server/operations/IsConfigMove.js +95 -0
  54. package/dist-es/src/server/operations/IsOutOfTurnMove.js +95 -0
  55. package/dist-es/src/server/operations/SelectBotMove.js +95 -0
  56. package/dist-es/src/server/operations/ValidateMove.js +95 -0
  57. package/dist-es/src/server/operations/index.js +15 -0
  58. package/dist-es/tsconfig.es.tsbuildinfo +1 -0
  59. package/dist-types/runtime/defaultService.d.ts +9 -0
  60. package/dist-types/runtime/express.d.ts +12 -0
  61. package/dist-types/runtime/index.d.ts +3 -0
  62. package/dist-types/src/endpoint/EndpointParameters.d.ts +20 -0
  63. package/dist-types/src/endpoint/endpointResolver.d.ts +5 -0
  64. package/dist-types/src/endpoint/ruleset.d.ts +2 -0
  65. package/dist-types/src/index.d.ts +22 -0
  66. package/dist-types/src/models/index.d.ts +1 -0
  67. package/dist-types/src/models/models_0.d.ts +402 -0
  68. package/dist-types/src/protocols/Aws_restJson1.d.ts +52 -0
  69. package/dist-types/src/server/GamePluginService.d.ts +54 -0
  70. package/dist-types/src/server/index.d.ts +2 -0
  71. package/dist-types/src/server/operations/ApplyMove.d.ts +41 -0
  72. package/dist-types/src/server/operations/ApplySaveFileEdit.d.ts +41 -0
  73. package/dist-types/src/server/operations/AssignParticipants.d.ts +41 -0
  74. package/dist-types/src/server/operations/DescribeSaveFile.d.ts +41 -0
  75. package/dist-types/src/server/operations/GetGameResult.d.ts +41 -0
  76. package/dist-types/src/server/operations/GetGameStatus.d.ts +41 -0
  77. package/dist-types/src/server/operations/GetMetadata.d.ts +41 -0
  78. package/dist-types/src/server/operations/GetPlayerView.d.ts +41 -0
  79. package/dist-types/src/server/operations/GetSaveFileEditorState.d.ts +41 -0
  80. package/dist-types/src/server/operations/Health.d.ts +41 -0
  81. package/dist-types/src/server/operations/InitializeGame.d.ts +41 -0
  82. package/dist-types/src/server/operations/IsConfigMove.d.ts +41 -0
  83. package/dist-types/src/server/operations/IsOutOfTurnMove.d.ts +41 -0
  84. package/dist-types/src/server/operations/SelectBotMove.d.ts +41 -0
  85. package/dist-types/src/server/operations/ValidateMove.d.ts +41 -0
  86. package/dist-types/src/server/operations/index.d.ts +15 -0
  87. package/package.json +88 -0
  88. package/runtime/package.json +5 -0
@@ -0,0 +1,95 @@
1
+ import { IsConfigMoveInput, } from "../../models/models_0";
2
+ import { deserializeIsConfigMoveRequest, serializeFrameworkException, serializeIsConfigMoveResponse, } from "../../protocols/Aws_restJson1";
3
+ import { InternalFailureException as __InternalFailureException, SerializationException as __SerializationException, isFrameworkException as __isFrameworkException, httpbinding, } from "@aws-smithy/server-common";
4
+ import { NodeHttpHandler, streamCollector, } from "@smithy/node-http-handler";
5
+ import { fromBase64, toBase64, } from "@smithy/util-base64";
6
+ import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
7
+ export var IsConfigMoveServerInput;
8
+ (function (IsConfigMoveServerInput) {
9
+ IsConfigMoveServerInput.validate = IsConfigMoveInput.validate;
10
+ })(IsConfigMoveServerInput || (IsConfigMoveServerInput = {}));
11
+ export class IsConfigMoveSerializer {
12
+ serialize = serializeIsConfigMoveResponse;
13
+ deserialize = deserializeIsConfigMoveRequest;
14
+ isOperationError(error) {
15
+ return false;
16
+ }
17
+ ;
18
+ serializeError(error, ctx) {
19
+ throw error;
20
+ }
21
+ }
22
+ export const getIsConfigMoveHandler = (operation, customizer) => {
23
+ const mux = new httpbinding.HttpBindingMux([
24
+ new httpbinding.UriSpec('POST', [
25
+ { type: 'path_literal', value: "v1" },
26
+ { type: 'path_literal', value: "moves" },
27
+ { type: 'path_literal', value: "is-config" },
28
+ ], [], { service: "GamePlugin", operation: "IsConfigMove" }),
29
+ ]);
30
+ return new IsConfigMoveHandler(operation, mux, new IsConfigMoveSerializer(), serializeFrameworkException, customizer);
31
+ };
32
+ const serdeContextBase = {
33
+ base64Encoder: toBase64,
34
+ base64Decoder: fromBase64,
35
+ utf8Encoder: toUtf8,
36
+ utf8Decoder: fromUtf8,
37
+ streamCollector: streamCollector,
38
+ requestHandler: new NodeHttpHandler(),
39
+ disableHostPrefix: true
40
+ };
41
+ async function handle(request, context, operationName, serializer, operation, serializeFrameworkException, validationFn, validationCustomizer) {
42
+ let input;
43
+ try {
44
+ input = await serializer.deserialize(request, {
45
+ endpoint: () => Promise.resolve(request), ...serdeContextBase
46
+ });
47
+ }
48
+ catch (error) {
49
+ if (__isFrameworkException(error)) {
50
+ return serializeFrameworkException(error, serdeContextBase);
51
+ }
52
+ ;
53
+ return serializeFrameworkException(new __SerializationException(), serdeContextBase);
54
+ }
55
+ try {
56
+ let validationFailures = validationFn(input);
57
+ if (validationFailures && validationFailures.length > 0) {
58
+ let validationException = validationCustomizer({ operation: operationName }, validationFailures);
59
+ if (validationException) {
60
+ return serializer.serializeError(validationException, serdeContextBase);
61
+ }
62
+ }
63
+ let output = await operation(input, context);
64
+ return serializer.serialize(output, serdeContextBase);
65
+ }
66
+ catch (error) {
67
+ if (serializer.isOperationError(error)) {
68
+ return serializer.serializeError(error, serdeContextBase);
69
+ }
70
+ console.log('Received an unexpected error', error);
71
+ return serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
72
+ }
73
+ }
74
+ export class IsConfigMoveHandler {
75
+ operation;
76
+ mux;
77
+ serializer;
78
+ serializeFrameworkException;
79
+ validationCustomizer;
80
+ constructor(operation, mux, serializer, serializeFrameworkException, validationCustomizer) {
81
+ this.operation = operation;
82
+ this.mux = mux;
83
+ this.serializer = serializer;
84
+ this.serializeFrameworkException = serializeFrameworkException;
85
+ this.validationCustomizer = validationCustomizer;
86
+ }
87
+ async handle(request, context) {
88
+ const target = this.mux.match(request);
89
+ if (target === undefined) {
90
+ console.log('Received a request that did not match com.boardgame.plugin#GamePlugin.IsConfigMove. This indicates a misconfiguration.');
91
+ return this.serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
92
+ }
93
+ return handle(request, context, "IsConfigMove", this.serializer, this.operation, this.serializeFrameworkException, IsConfigMoveServerInput.validate, this.validationCustomizer);
94
+ }
95
+ }
@@ -0,0 +1,95 @@
1
+ import { IsOutOfTurnMoveInput, } from "../../models/models_0";
2
+ import { deserializeIsOutOfTurnMoveRequest, serializeFrameworkException, serializeIsOutOfTurnMoveResponse, } from "../../protocols/Aws_restJson1";
3
+ import { InternalFailureException as __InternalFailureException, SerializationException as __SerializationException, isFrameworkException as __isFrameworkException, httpbinding, } from "@aws-smithy/server-common";
4
+ import { NodeHttpHandler, streamCollector, } from "@smithy/node-http-handler";
5
+ import { fromBase64, toBase64, } from "@smithy/util-base64";
6
+ import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
7
+ export var IsOutOfTurnMoveServerInput;
8
+ (function (IsOutOfTurnMoveServerInput) {
9
+ IsOutOfTurnMoveServerInput.validate = IsOutOfTurnMoveInput.validate;
10
+ })(IsOutOfTurnMoveServerInput || (IsOutOfTurnMoveServerInput = {}));
11
+ export class IsOutOfTurnMoveSerializer {
12
+ serialize = serializeIsOutOfTurnMoveResponse;
13
+ deserialize = deserializeIsOutOfTurnMoveRequest;
14
+ isOperationError(error) {
15
+ return false;
16
+ }
17
+ ;
18
+ serializeError(error, ctx) {
19
+ throw error;
20
+ }
21
+ }
22
+ export const getIsOutOfTurnMoveHandler = (operation, customizer) => {
23
+ const mux = new httpbinding.HttpBindingMux([
24
+ new httpbinding.UriSpec('POST', [
25
+ { type: 'path_literal', value: "v1" },
26
+ { type: 'path_literal', value: "moves" },
27
+ { type: 'path_literal', value: "is-out-of-turn" },
28
+ ], [], { service: "GamePlugin", operation: "IsOutOfTurnMove" }),
29
+ ]);
30
+ return new IsOutOfTurnMoveHandler(operation, mux, new IsOutOfTurnMoveSerializer(), serializeFrameworkException, customizer);
31
+ };
32
+ const serdeContextBase = {
33
+ base64Encoder: toBase64,
34
+ base64Decoder: fromBase64,
35
+ utf8Encoder: toUtf8,
36
+ utf8Decoder: fromUtf8,
37
+ streamCollector: streamCollector,
38
+ requestHandler: new NodeHttpHandler(),
39
+ disableHostPrefix: true
40
+ };
41
+ async function handle(request, context, operationName, serializer, operation, serializeFrameworkException, validationFn, validationCustomizer) {
42
+ let input;
43
+ try {
44
+ input = await serializer.deserialize(request, {
45
+ endpoint: () => Promise.resolve(request), ...serdeContextBase
46
+ });
47
+ }
48
+ catch (error) {
49
+ if (__isFrameworkException(error)) {
50
+ return serializeFrameworkException(error, serdeContextBase);
51
+ }
52
+ ;
53
+ return serializeFrameworkException(new __SerializationException(), serdeContextBase);
54
+ }
55
+ try {
56
+ let validationFailures = validationFn(input);
57
+ if (validationFailures && validationFailures.length > 0) {
58
+ let validationException = validationCustomizer({ operation: operationName }, validationFailures);
59
+ if (validationException) {
60
+ return serializer.serializeError(validationException, serdeContextBase);
61
+ }
62
+ }
63
+ let output = await operation(input, context);
64
+ return serializer.serialize(output, serdeContextBase);
65
+ }
66
+ catch (error) {
67
+ if (serializer.isOperationError(error)) {
68
+ return serializer.serializeError(error, serdeContextBase);
69
+ }
70
+ console.log('Received an unexpected error', error);
71
+ return serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
72
+ }
73
+ }
74
+ export class IsOutOfTurnMoveHandler {
75
+ operation;
76
+ mux;
77
+ serializer;
78
+ serializeFrameworkException;
79
+ validationCustomizer;
80
+ constructor(operation, mux, serializer, serializeFrameworkException, validationCustomizer) {
81
+ this.operation = operation;
82
+ this.mux = mux;
83
+ this.serializer = serializer;
84
+ this.serializeFrameworkException = serializeFrameworkException;
85
+ this.validationCustomizer = validationCustomizer;
86
+ }
87
+ async handle(request, context) {
88
+ const target = this.mux.match(request);
89
+ if (target === undefined) {
90
+ console.log('Received a request that did not match com.boardgame.plugin#GamePlugin.IsOutOfTurnMove. This indicates a misconfiguration.');
91
+ return this.serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
92
+ }
93
+ return handle(request, context, "IsOutOfTurnMove", this.serializer, this.operation, this.serializeFrameworkException, IsOutOfTurnMoveServerInput.validate, this.validationCustomizer);
94
+ }
95
+ }
@@ -0,0 +1,95 @@
1
+ import { SelectBotMoveInput, } from "../../models/models_0";
2
+ import { deserializeSelectBotMoveRequest, serializeFrameworkException, serializeSelectBotMoveResponse, } from "../../protocols/Aws_restJson1";
3
+ import { InternalFailureException as __InternalFailureException, SerializationException as __SerializationException, isFrameworkException as __isFrameworkException, httpbinding, } from "@aws-smithy/server-common";
4
+ import { NodeHttpHandler, streamCollector, } from "@smithy/node-http-handler";
5
+ import { fromBase64, toBase64, } from "@smithy/util-base64";
6
+ import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
7
+ export var SelectBotMoveServerInput;
8
+ (function (SelectBotMoveServerInput) {
9
+ SelectBotMoveServerInput.validate = SelectBotMoveInput.validate;
10
+ })(SelectBotMoveServerInput || (SelectBotMoveServerInput = {}));
11
+ export class SelectBotMoveSerializer {
12
+ serialize = serializeSelectBotMoveResponse;
13
+ deserialize = deserializeSelectBotMoveRequest;
14
+ isOperationError(error) {
15
+ return false;
16
+ }
17
+ ;
18
+ serializeError(error, ctx) {
19
+ throw error;
20
+ }
21
+ }
22
+ export const getSelectBotMoveHandler = (operation, customizer) => {
23
+ const mux = new httpbinding.HttpBindingMux([
24
+ new httpbinding.UriSpec('POST', [
25
+ { type: 'path_literal', value: "v1" },
26
+ { type: 'path_literal', value: "bots" },
27
+ { type: 'path_literal', value: "select-move" },
28
+ ], [], { service: "GamePlugin", operation: "SelectBotMove" }),
29
+ ]);
30
+ return new SelectBotMoveHandler(operation, mux, new SelectBotMoveSerializer(), serializeFrameworkException, customizer);
31
+ };
32
+ const serdeContextBase = {
33
+ base64Encoder: toBase64,
34
+ base64Decoder: fromBase64,
35
+ utf8Encoder: toUtf8,
36
+ utf8Decoder: fromUtf8,
37
+ streamCollector: streamCollector,
38
+ requestHandler: new NodeHttpHandler(),
39
+ disableHostPrefix: true
40
+ };
41
+ async function handle(request, context, operationName, serializer, operation, serializeFrameworkException, validationFn, validationCustomizer) {
42
+ let input;
43
+ try {
44
+ input = await serializer.deserialize(request, {
45
+ endpoint: () => Promise.resolve(request), ...serdeContextBase
46
+ });
47
+ }
48
+ catch (error) {
49
+ if (__isFrameworkException(error)) {
50
+ return serializeFrameworkException(error, serdeContextBase);
51
+ }
52
+ ;
53
+ return serializeFrameworkException(new __SerializationException(), serdeContextBase);
54
+ }
55
+ try {
56
+ let validationFailures = validationFn(input);
57
+ if (validationFailures && validationFailures.length > 0) {
58
+ let validationException = validationCustomizer({ operation: operationName }, validationFailures);
59
+ if (validationException) {
60
+ return serializer.serializeError(validationException, serdeContextBase);
61
+ }
62
+ }
63
+ let output = await operation(input, context);
64
+ return serializer.serialize(output, serdeContextBase);
65
+ }
66
+ catch (error) {
67
+ if (serializer.isOperationError(error)) {
68
+ return serializer.serializeError(error, serdeContextBase);
69
+ }
70
+ console.log('Received an unexpected error', error);
71
+ return serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
72
+ }
73
+ }
74
+ export class SelectBotMoveHandler {
75
+ operation;
76
+ mux;
77
+ serializer;
78
+ serializeFrameworkException;
79
+ validationCustomizer;
80
+ constructor(operation, mux, serializer, serializeFrameworkException, validationCustomizer) {
81
+ this.operation = operation;
82
+ this.mux = mux;
83
+ this.serializer = serializer;
84
+ this.serializeFrameworkException = serializeFrameworkException;
85
+ this.validationCustomizer = validationCustomizer;
86
+ }
87
+ async handle(request, context) {
88
+ const target = this.mux.match(request);
89
+ if (target === undefined) {
90
+ console.log('Received a request that did not match com.boardgame.plugin#GamePlugin.SelectBotMove. This indicates a misconfiguration.');
91
+ return this.serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
92
+ }
93
+ return handle(request, context, "SelectBotMove", this.serializer, this.operation, this.serializeFrameworkException, SelectBotMoveServerInput.validate, this.validationCustomizer);
94
+ }
95
+ }
@@ -0,0 +1,95 @@
1
+ import { ValidateMoveInput, } from "../../models/models_0";
2
+ import { deserializeValidateMoveRequest, serializeFrameworkException, serializeValidateMoveResponse, } from "../../protocols/Aws_restJson1";
3
+ import { InternalFailureException as __InternalFailureException, SerializationException as __SerializationException, isFrameworkException as __isFrameworkException, httpbinding, } from "@aws-smithy/server-common";
4
+ import { NodeHttpHandler, streamCollector, } from "@smithy/node-http-handler";
5
+ import { fromBase64, toBase64, } from "@smithy/util-base64";
6
+ import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
7
+ export var ValidateMoveServerInput;
8
+ (function (ValidateMoveServerInput) {
9
+ ValidateMoveServerInput.validate = ValidateMoveInput.validate;
10
+ })(ValidateMoveServerInput || (ValidateMoveServerInput = {}));
11
+ export class ValidateMoveSerializer {
12
+ serialize = serializeValidateMoveResponse;
13
+ deserialize = deserializeValidateMoveRequest;
14
+ isOperationError(error) {
15
+ return false;
16
+ }
17
+ ;
18
+ serializeError(error, ctx) {
19
+ throw error;
20
+ }
21
+ }
22
+ export const getValidateMoveHandler = (operation, customizer) => {
23
+ const mux = new httpbinding.HttpBindingMux([
24
+ new httpbinding.UriSpec('POST', [
25
+ { type: 'path_literal', value: "v1" },
26
+ { type: 'path_literal', value: "moves" },
27
+ { type: 'path_literal', value: "validate" },
28
+ ], [], { service: "GamePlugin", operation: "ValidateMove" }),
29
+ ]);
30
+ return new ValidateMoveHandler(operation, mux, new ValidateMoveSerializer(), serializeFrameworkException, customizer);
31
+ };
32
+ const serdeContextBase = {
33
+ base64Encoder: toBase64,
34
+ base64Decoder: fromBase64,
35
+ utf8Encoder: toUtf8,
36
+ utf8Decoder: fromUtf8,
37
+ streamCollector: streamCollector,
38
+ requestHandler: new NodeHttpHandler(),
39
+ disableHostPrefix: true
40
+ };
41
+ async function handle(request, context, operationName, serializer, operation, serializeFrameworkException, validationFn, validationCustomizer) {
42
+ let input;
43
+ try {
44
+ input = await serializer.deserialize(request, {
45
+ endpoint: () => Promise.resolve(request), ...serdeContextBase
46
+ });
47
+ }
48
+ catch (error) {
49
+ if (__isFrameworkException(error)) {
50
+ return serializeFrameworkException(error, serdeContextBase);
51
+ }
52
+ ;
53
+ return serializeFrameworkException(new __SerializationException(), serdeContextBase);
54
+ }
55
+ try {
56
+ let validationFailures = validationFn(input);
57
+ if (validationFailures && validationFailures.length > 0) {
58
+ let validationException = validationCustomizer({ operation: operationName }, validationFailures);
59
+ if (validationException) {
60
+ return serializer.serializeError(validationException, serdeContextBase);
61
+ }
62
+ }
63
+ let output = await operation(input, context);
64
+ return serializer.serialize(output, serdeContextBase);
65
+ }
66
+ catch (error) {
67
+ if (serializer.isOperationError(error)) {
68
+ return serializer.serializeError(error, serdeContextBase);
69
+ }
70
+ console.log('Received an unexpected error', error);
71
+ return serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
72
+ }
73
+ }
74
+ export class ValidateMoveHandler {
75
+ operation;
76
+ mux;
77
+ serializer;
78
+ serializeFrameworkException;
79
+ validationCustomizer;
80
+ constructor(operation, mux, serializer, serializeFrameworkException, validationCustomizer) {
81
+ this.operation = operation;
82
+ this.mux = mux;
83
+ this.serializer = serializer;
84
+ this.serializeFrameworkException = serializeFrameworkException;
85
+ this.validationCustomizer = validationCustomizer;
86
+ }
87
+ async handle(request, context) {
88
+ const target = this.mux.match(request);
89
+ if (target === undefined) {
90
+ console.log('Received a request that did not match com.boardgame.plugin#GamePlugin.ValidateMove. This indicates a misconfiguration.');
91
+ return this.serializeFrameworkException(new __InternalFailureException(), serdeContextBase);
92
+ }
93
+ return handle(request, context, "ValidateMove", this.serializer, this.operation, this.serializeFrameworkException, ValidateMoveServerInput.validate, this.validationCustomizer);
94
+ }
95
+ }
@@ -0,0 +1,15 @@
1
+ export * from "./ApplyMove";
2
+ export * from "./ApplySaveFileEdit";
3
+ export * from "./AssignParticipants";
4
+ export * from "./DescribeSaveFile";
5
+ export * from "./GetGameResult";
6
+ export * from "./GetGameStatus";
7
+ export * from "./GetMetadata";
8
+ export * from "./GetPlayerView";
9
+ export * from "./GetSaveFileEditorState";
10
+ export * from "./Health";
11
+ export * from "./InitializeGame";
12
+ export * from "./IsConfigMove";
13
+ export * from "./IsOutOfTurnMove";
14
+ export * from "./SelectBotMove";
15
+ export * from "./ValidateMove";