@go-labs-sg/event-tech 0.7.0 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +62 -0
  2. package/dist/index.js +2261 -15143
  3. package/package.json +7 -3
package/README.md CHANGED
@@ -63,10 +63,72 @@ et organization list
63
63
  et organization get --organization-id <id>
64
64
  et event list --organization-id <id>
65
65
  et event get --event-id <id>
66
+ et event appearance get --event-id <id>
67
+ et event appearance get --event-id <id> --public
68
+ et event appearance update --event-id <id> --appearance-version <n> --appearance '<json>'
69
+ et event appearance reset --event-id <id> --appearance-version <n>
70
+ et event appearance upload --event-id <id> --file ./background.mp4 --media-type video --content-type video/mp4
71
+ et event photo-wall display-items --event-id <id> --limit 30
66
72
  ```
67
73
 
68
74
  Commands emit deterministic JSON envelopes. Authentication credentials are never included in successful output, and bearer credentials are redacted from errors.
69
75
 
76
+ ### Event appearance and Photo Wall display
77
+
78
+ `event appearance get` returns the canonical appearance, its optimistic-lock
79
+ version, and resolved media URLs. It uses the authenticated event procedure by
80
+ default. Add `--public` for the same safe projection through the unauthenticated
81
+ public procedure; that read does not access the credential store or require CLI
82
+ login. Pass the authenticated result's version back unchanged when saving:
83
+
84
+ ```sh
85
+ et event appearance update \
86
+ --event-id <id> \
87
+ --appearance-version 3 \
88
+ --appearance '{"version":1,"theme":{"accentColor":"#f84404","backgroundColor":"#f6f7f9","textColor":"#20242a","fontFamily":"SYSTEM"},"guestBackground":{"type":"none","key":null},"displayBackground":{"type":"none","key":null},"photoWall":{"durationSeconds":18,"maxVisible":4,"motion":"gentle","showQrCode":true,"showEventName":true}}'
89
+ ```
90
+
91
+ Reset is an explicit, version-fenced null update:
92
+
93
+ ```sh
94
+ et event appearance reset --event-id <id> --appearance-version 3
95
+ ```
96
+
97
+ Upload appearance media before referencing its returned key in the appearance
98
+ JSON. The CLI requests the existing signed attachment URL with the event scope
99
+ and uploads with the declared content type. The server-bound expected size is
100
+ carried in the SDK-signed URL as `x-amz-meta-event-appearance-size`; the CLI and
101
+ browser use that URL unchanged and do not add duplicate metadata headers.
102
+ Before saving a new key, the API checks the event namespace and the actual
103
+ object size/content type, including its expected-size metadata.
104
+
105
+ The contract is covered by offline tests using the real AWS SDK presigner and
106
+ shared object validator, with only storage HEAD responses modelled. This is not
107
+ live AWS verification. See the [AWS presigner documentation](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/s3-request-presigner/README.md#get-presigned-url-with-headers-that-cannot-be-signed)
108
+ for the distinction between signed query parameters and required upload headers.
109
+
110
+ Example:
111
+
112
+ ```sh
113
+ et event appearance upload --event-id <id> --file ./background.jpg \
114
+ --media-type image --content-type image/jpeg
115
+ ```
116
+
117
+ Display pages are approved-only and newest-first. The cursor is JSON with an
118
+ ISO date string; the CLI decodes `createdAt` to a real `Date` before calling the
119
+ API. Retained IDs are sent separately so currently visible items can be
120
+ revalidated:
121
+
122
+ ```sh
123
+ et event photo-wall display-items --event-id <id> --limit 30 \
124
+ --cursor '{"createdAt":"2026-01-03T00:00:00.000Z","id":"photo-123"}' \
125
+ --retained-ids '["photo-121","photo-122"]'
126
+ ```
127
+
128
+ `--limit` is 1–60, `--retained-ids` accepts at most 100 non-empty strings, and
129
+ the success data preserves the API's `items`, `nextCursor`, and
130
+ `retainedItems` fields.
131
+
70
132
  ## Lucky draw pre-draw
71
133
 
72
134
  ```sh