NewOrder
v53

Found on the "Serverlesspresso" Amazon EventBridge bus.

Matched rules for event

A Lambda function is invoked by a POST request to Amazon API Gateway. The Lambda function, Takes the token ID from the QR code scan and checks it against the valid token ID's stored in a DynamoDB database. If Valid, a new Step Functions Workflow is started, this workflow ochestrates various AWS services to move the order along to completion.

The event awsserverlessda.serverlesspresso@Validator.NewOrder has 1 matched rules on the event bus 'Serverlesspresso'.

RulesNumber Of TargetsTargetsMetrics
serverlesspresso-applicat-OrderProcessorStateMachi-1F6R26PR46GV51OrderProcessorStateMachine-wfATTEL8oZ5m (stateMachine)View

Targets and Rules

flowchart LR event>"awsserverlessda.serverlesspresso@Validator.NewOrder"]:::event-- fa:fa-filter rule -->serverlesspresso-applicat-OrderProcessorStateMachi-1F6R26PR46GV5:::rule classDef event stroke:#ed8ece,stroke-width: 2px, fill:#ffa7e2, color: #160505; classDef rule stroke:#7b7fcb,stroke-width: 2px, fill: #c0c3ff; classDef target stroke:#bec9c7,stroke-width: 2px, fill: #dbf3ef; serverlesspresso-applicat-OrderProcessorStateMachi-1F6R26PR46GV5{{serverlesspresso-applicat-OrderProcessorStateMachi-1F6R26PR46GV5}}:::rule-- fa:fa-cloud service:states, resource:stateMachine --> OrderProcessorStateMachine-wfATTEL8oZ5m:::target
NewOrder Schema (json)
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Validator.NewOrder",
    "definitions": {
        "Bucket": {
            "properties": {
                "PK": {
                    "type": "number"
                },
                "availableTokens": {
                    "type": "number"
                },
                "end_full": {
                    "type": "string"
                },
                "end_ts": {
                    "format": "int64",
                    "type": "integer"
                },
                "last_code": {
                    "type": "string"
                },
                "last_id": {
                    "type": "number"
                },
                "start_full": {
                    "type": "string"
                },
                "start_ts": {
                    "format": "int64",
                    "type": "integer"
                }
            },
            "required": [
                "end_full",
                "start_ts",
                "end_ts",
                "last_id",
                "start_full",
                "PK",
                "availableTokens",
                "last_code"
            ],
            "type": "object"
        },
        "Validator.NewOrder": {
            "properties": {
                "bucket": {
                    "$ref": "#/definitions/Bucket"
                },
                "orderId": {
                    "type": "string"
                },
                "userId": {
                    "type": "string"
                }
            },
            "required": [
                "bucket",
                "orderId",
                "userId"
            ],
            "type": "object"
        }
    },
    "properties": {
        "account": {
            "type": "string"
        },
        "detail": {
            "$ref": "#/definitions/Validator.NewOrder"
        },
        "detail-type": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "region": {
            "type": "string"
        },
        "resources": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "source": {
            "type": "string"
        },
        "time": {
            "format": "date-time",
            "type": "string"
        },
        "version": {
            "type": "string"
        }
    },
    "required": [
        "detail-type",
        "resources",
        "detail",
        "id",
        "source",
        "time",
        "region",
        "version",
        "account"
    ],
    "type": "object",
    "x-amazon-events-detail-type": "Validator.NewOrder",
    "x-amazon-events-source": "awsserverlessda.serverlesspresso"
}

Examples

1{
2    "openapi": "3.0.0",
3    "info": {
4        "version": "1.0.0",
5        "title": "Validator.NewOrder"
6    },
7    "paths": {},
8    "components": {
9        "schemas": {
10            "AWSEvent": {
11                "type": "object",
12                "required": [
13                    "detail-type",
14                    "resources",
15                    "detail",
16                    "id",
17                    "source",
18                    "time",
19                    "region",
20                    "version",
21                    "account"
22                ],
23                "x-amazon-events-detail-type": "Validator.NewOrder",
24                "x-amazon-events-source": "awsserverlessda.serverlesspresso",
25                "properties": {
26                    "detail": {
27                        "$ref": "#/components/schemas/Validator.NewOrder"
28                    },
29                    "account": {
30                        "type": "string"
31                    },
32                    "detail-type": {
33                        "type": "string"
34                    },
35                    "id": {
36                        "type": "string"
37                    },
38                    "region": {
39                        "type": "string"
40                    },
41                    "resources": {
42                        "type": "array",
43                        "items": {
44                            "type": "string"
45                        }
46                    },
47                    "source": {
48                        "type": "string"
49                    },
50                    "time": {
51                        "type": "string",
52                        "format": "date-time"
53                    },
54                    "version": {
55                        "type": "string"
56                    }
57                }
58            },
59            "Validator.NewOrder": {
60                "type": "object",
61                "required": [
62                    "bucket",
63                    "orderId",
64                    "userId"
65                ],
66                "properties": {
67                    "bucket": {
68                        "$ref": "#/components/schemas/Bucket"
69                    },
70                    "orderId": {
71                        "type": "string"
72                    },
73                    "userId": {
74                        "type": "string"
75                    }
76                }
77            },
78            "Bucket": {
79                "type": "object",
80                "required": [
81                    "end_full",
82                    "start_ts",
83                    "end_ts",
84                    "last_id",
85                    "start_full",
86                    "PK",
87                    "availableTokens",
88                    "last_code"
89                ],
90                "properties": {
91                    "PK": {
92                        "type": "number"
93                    },
94                    "availableTokens": {
95                        "type": "number"
96                    },
97                    "end_full": {
98                        "type": "string"
99                    },
100                    "end_ts": {
101                        "type": "integer",
102                        "format": "int64"
103                    },
104                    "last_code": {
105                        "type": "string"
106                    },
107                    "last_id": {
108                        "type": "number"
109                    },
110                    "start_full": {
111                        "type": "string"
112                    },
113                    "start_ts": {
114                        "type": "integer",
115                        "format": "int64"
116                    }
117                }
118            }
119        }
120    }
121}
Edit this pageLast updated on 2023/1/31