@mongoui/skills 0.1.8 → 0.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.
@@ -0,0 +1,47 @@
1
+ # TMC Auth And Calling
2
+
3
+ ## Signing
4
+
5
+ Use the Open Platform signature for every TMC call. Sign the exact runtime path, not only the short customer-facing path.
6
+
7
+ Canonical string lines:
8
+
9
+ ```text
10
+ METHOD
11
+ /openapi/v1/tmc/<path>
12
+ canonicalQueryString
13
+ sha256(rawBodyBytes)
14
+ X-OP-Timestamp
15
+ X-OP-Nonce
16
+ X-OP-App-Key
17
+ ```
18
+
19
+ Headers:
20
+
21
+ - `X-OP-App-Key`: Open Platform app key.
22
+ - `X-OP-Timestamp`: Unix timestamp; keep clock skew within the platform tolerance.
23
+ - `X-OP-Nonce`: unique nonce; do not replay.
24
+ - `X-OP-Sign`: HMAC-SHA256 signature.
25
+ - `token`: TMC login token for business interfaces after `/auth/token`.
26
+ - `Content-Type: application/json`: JSON request bodies. `/attachments/upload` may use the swagger content type in `endpoint-details.md`.
27
+
28
+ ## Token Flow
29
+
30
+ 1. Call `POST /auth/token` with the customer's `externalUserId`.
31
+ 2. Store the returned token by employee/user identity and enterprise context.
32
+ 3. Pass that token on subsequent organization, employee, approval, policy, flight, hotel, payment, attachment, and certificate APIs.
33
+ 4. For isolation tests, never reuse a token across enterprises or roles.
34
+
35
+ ## Runtime Path Examples
36
+
37
+ - Customer-facing path: `/flight/search`
38
+ - Signed runtime path: `/openapi/v1/tmc/flight/search`
39
+ - Customer-facing path: `/hotel/order`
40
+ - Signed runtime path: `/openapi/v1/tmc/hotel/order`
41
+
42
+ ## Validation Rules
43
+
44
+ - Check HTTP status and response `code`.
45
+ - Treat non-zero business `code` as business failure even when HTTP is 200.
46
+ - Keep all request fields aligned with swagger; do not invent fields.
47
+ - For customer docs, show the short path, then mention the runtime prefix only in signing or SDK guidance.