|
| 1 | +// Jest Snapshot v1, https://goo.gl/fbAQLP |
| 2 | + |
| 3 | +exports[`PATCH /api/tenants/:tenantId — Response Schema Stability 400 validation error — error envelope shape matches the patch validation error envelope snapshot: patch-tenant-validation-error 1`] = ` |
| 4 | +{ |
| 5 | + "error": { |
| 6 | + "code": "VALIDATION_ERROR", |
| 7 | + "details": [ |
| 8 | + { |
| 9 | + "code": "CUSTOM", |
| 10 | + "field": "body", |
| 11 | + "message": "At least one tenant field must be provided", |
| 12 | + }, |
| 13 | + ], |
| 14 | + "message": "Request validation failed", |
| 15 | + }, |
| 16 | + "requestId": "req-schema-patch-invalid-snap", |
| 17 | + "success": false, |
| 18 | + "timestamp": "<TIMESTAMP>", |
| 19 | +} |
| 20 | +`; |
| 21 | + |
| 22 | +exports[`PATCH /api/tenants/:tenantId — Response Schema Stability snapshot — full PATCH /api/tenants/:tenantId response matches the stable full update-tenant response snapshot: patch-tenant-full-response 1`] = ` |
| 23 | +{ |
| 24 | + "data": { |
| 25 | + "contactEmail": "stadium@grantfox.test", |
| 26 | + "createdAt": "<CREATED_AT>", |
| 27 | + "createdBy": "dev-1", |
| 28 | + "id": "tenant-abc-001", |
| 29 | + "metadata": { |
| 30 | + "campaign": "fwc26", |
| 31 | + }, |
| 32 | + "name": "GrantFox Stadium Ops", |
| 33 | + "plan": "enterprise", |
| 34 | + "slug": "grantfox-ops", |
| 35 | + "updatedAt": "<UPDATED_AT>", |
| 36 | + }, |
| 37 | + "requestId": "req-schema-update-snap", |
| 38 | + "success": true, |
| 39 | + "timestamp": "<TIMESTAMP>", |
| 40 | +} |
| 41 | +`; |
| 42 | + |
| 43 | +exports[`PATCH /api/tenants/:tenantId — Response Schema Stability snapshot — full PATCH /api/tenants/:tenantId response matches the top-level shape snapshot: patch-tenant-shape 1`] = ` |
| 44 | +{ |
| 45 | + "dataKeys": [ |
| 46 | + "createdAt", |
| 47 | + "createdBy", |
| 48 | + "id", |
| 49 | + "name", |
| 50 | + "plan", |
| 51 | + "slug", |
| 52 | + "updatedAt", |
| 53 | + ], |
| 54 | + "successValue": true, |
| 55 | + "topLevelKeys": [ |
| 56 | + "data", |
| 57 | + "requestId", |
| 58 | + "success", |
| 59 | + "timestamp", |
| 60 | + ], |
| 61 | +} |
| 62 | +`; |
| 63 | + |
| 64 | +exports[`POST /api/tenants — Response Schema Stability 400 validation error — error envelope shape matches the validation error envelope snapshot: post-tenant-validation-error 1`] = ` |
| 65 | +{ |
| 66 | + "error": { |
| 67 | + "code": "VALIDATION_ERROR", |
| 68 | + "details": [ |
| 69 | + { |
| 70 | + "code": "INVALID_TYPE", |
| 71 | + "field": "body.name", |
| 72 | + "message": "Invalid input: expected string, received undefined", |
| 73 | + }, |
| 74 | + { |
| 75 | + "code": "INVALID_FORMAT", |
| 76 | + "field": "body.contactEmail", |
| 77 | + "message": "contactEmail must be a valid email address", |
| 78 | + }, |
| 79 | + ], |
| 80 | + "message": "Request validation failed", |
| 81 | + }, |
| 82 | + "requestId": "req-schema-invalid-snap", |
| 83 | + "success": false, |
| 84 | + "timestamp": "<TIMESTAMP>", |
| 85 | +} |
| 86 | +`; |
| 87 | + |
| 88 | +exports[`POST /api/tenants — Response Schema Stability snapshot — full POST /api/tenants response matches the stable full create-tenant response snapshot: post-tenant-full-response 1`] = ` |
| 89 | +{ |
| 90 | + "data": { |
| 91 | + "contactEmail": "ops@grantfox.test", |
| 92 | + "createdAt": "<CREATED_AT>", |
| 93 | + "createdBy": "dev-1", |
| 94 | + "id": "ten_fixture_001", |
| 95 | + "metadata": { |
| 96 | + "campaign": "fwc26", |
| 97 | + "priority": 1, |
| 98 | + }, |
| 99 | + "name": "GrantFox Ops", |
| 100 | + "plan": "growth", |
| 101 | + "slug": "grantfox-ops", |
| 102 | + "updatedAt": "<UPDATED_AT>", |
| 103 | + }, |
| 104 | + "requestId": "req-schema-snapshot", |
| 105 | + "success": true, |
| 106 | + "timestamp": "<TIMESTAMP>", |
| 107 | +} |
| 108 | +`; |
| 109 | + |
| 110 | +exports[`POST /api/tenants — Response Schema Stability snapshot — full POST /api/tenants response matches the top-level shape snapshot: post-tenant-shape 1`] = ` |
| 111 | +{ |
| 112 | + "dataKeys": [ |
| 113 | + "createdAt", |
| 114 | + "createdBy", |
| 115 | + "id", |
| 116 | + "name", |
| 117 | + "plan", |
| 118 | + "slug", |
| 119 | + "updatedAt", |
| 120 | + ], |
| 121 | + "successValue": true, |
| 122 | + "topLevelKeys": [ |
| 123 | + "data", |
| 124 | + "requestId", |
| 125 | + "success", |
| 126 | + "timestamp", |
| 127 | + ], |
| 128 | +} |
| 129 | +`; |
0 commit comments