From 2bbffeed2dc5f30e64a636ea3efaec1d88062792 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Thu, 8 Oct 2026 23:22:36 +0200 Subject: [PATCH] feat(order): add private attributes for the PayPal order and its capture paypalOrderId is the PayPal order the checkout created for the order, paypalCaptureId and paymentCapturedAt record the verified capture. All three are private, so the content API never returns them. Strapi adds the columns when it syncs the schema at startup. types/generated/contentTypes.d.ts is the output of strapi ts:generate-types, run in the release image without network. Refs https://git.librete.ch/libretech/mp/issues/71 --- src/api/order/content-types/order/schema.json | 12 ++++++++++++ types/generated/contentTypes.d.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/api/order/content-types/order/schema.json b/src/api/order/content-types/order/schema.json index 5f783eb..a58fa3f 100644 --- a/src/api/order/content-types/order/schema.json +++ b/src/api/order/content-types/order/schema.json @@ -83,6 +83,18 @@ "paymentStatus": { "type": "string" }, + "paypalOrderId": { + "type": "string", + "private": true + }, + "paypalCaptureId": { + "type": "string", + "private": true + }, + "paymentCapturedAt": { + "type": "datetime", + "private": true + }, "emailSent": { "type": "boolean", "default": false diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index fbd56db..5f83aed 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -389,7 +389,10 @@ export interface ApiOrderOrder extends Schema.CollectionType { invoiceSent: Attribute.Boolean & Attribute.DefaultTo; payment: Attribute.Relation<"api::order.order", "oneToOne", "api::payment.payment">; paymentAuthorised: Attribute.Boolean & Attribute.DefaultTo; + paymentCapturedAt: Attribute.DateTime & Attribute.Private; paymentStatus: Attribute.String; + paypalCaptureId: Attribute.String & Attribute.Private; + paypalOrderId: Attribute.String & Attribute.Private; subtotal: Attribute.Decimal; total: Attribute.Decimal; updatedAt: Attribute.DateTime;