From f7fc869e52526372e948018ce176be2a2c702fba Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 13 Aug 2026 11:37:06 +0200 Subject: [PATCH] :books: Unify doc added for nitrate apis (#11231) --- backend/src/app/rpc/commands/nitrate.clj | 24 +++++------ backend/src/app/rpc/management/nitrate.clj | 46 +++++++++++----------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/backend/src/app/rpc/commands/nitrate.clj b/backend/src/app/rpc/commands/nitrate.clj index af993ea179..c7ea974a66 100644 --- a/backend/src/app/rpc/commands/nitrate.clj +++ b/backend/src/app/rpc/commands/nitrate.clj @@ -48,7 +48,7 @@ (sv/defmethod ::get-nitrate-connectivity {::rpc/auth true - ::doc/added "2.14" + ::doc/added "2.18" ::sm/params [:map] ::sm/result schema:connectivity} [cfg _params] @@ -64,7 +64,7 @@ (sv/defmethod ::get-subscription-warning {::rpc/auth true - ::doc/added "2.14" + ::doc/added "2.18" ::sm/params [:map] ::sm/result schema:subscription-warning} [cfg {:keys [::rpc/profile-id]}] @@ -80,7 +80,7 @@ (sv/defmethod ::redeem-nitrate-activation-code {::rpc/auth true - ::doc/added "2.14" + ::doc/added "2.18" ::sm/params schema:redeem-activation-code-params ::sm/result schema:redeem-activation-code-result} [cfg {:keys [::rpc/profile-id activation-code]}] @@ -112,7 +112,7 @@ "Returns a Base64-encoded JSON file requesting a Nitrate activation code. Payload includes nitrateId, publicKey, email and iat." {::rpc/auth true - ::doc/added "2.20" + ::doc/added "2.18" ::sm/params [:map] ::sm/result ::sm/text} [cfg {:keys [::rpc/profile-id]}] @@ -360,7 +360,7 @@ (sv/defmethod ::leave-organization {::rpc/auth true - ::doc/added "2.15" + ::doc/added "2.18" ::sm/params schema:leave-organization ::db/transaction true} [cfg {:keys [::rpc/profile-id] :as params}] @@ -404,7 +404,7 @@ [:organization-name ::sm/text]]) (sv/defmethod ::remove-team-from-organization - {::doc/added "2.17" + {::doc/added "2.18" ::sm/params schema:remove-team-from-organization} [cfg {:keys [::rpc/profile-id team-id organization-id organization-name]}] @@ -473,7 +473,7 @@ (sv/defmethod ::add-team-to-organization {::rpc/auth true - ::doc/added "2.17" + ::doc/added "2.18" ::sm/params schema:add-team-to-organization ::db/transaction true} [cfg {:keys [::rpc/profile-id team-id organization-id]}] @@ -558,7 +558,7 @@ (sv/defmethod ::check-organization-members {::rpc/auth true - ::doc/added "2.17" + ::doc/added "2.18" ::sm/params schema:check-organization-members-params ::sm/result [:map-of :string :boolean] ::db/transaction true} @@ -583,7 +583,7 @@ (sv/defmethod ::all-organization-members-in-team {::rpc/auth true - ::doc/added "2.17" + ::doc/added "2.18" ::sm/params schema:all-organization-members-in-team-params ::sm/result ::sm/boolean} [cfg {:keys [::rpc/profile-id team-id organization-id]}] @@ -607,7 +607,7 @@ (sv/defmethod ::all-team-members-in-organizations {::rpc/auth true - ::doc/added "2.17" + ::doc/added "2.18" ::sm/params schema:all-team-members-in-organizations-params ::sm/result [:map-of ::sm/uuid ::sm/boolean]} [cfg {:keys [::rpc/profile-id team-id organization-ids]}] @@ -643,7 +643,7 @@ (sv/defmethod ::check-team-external-invitations {::rpc/auth true - ::doc/added "2.17" + ::doc/added "2.18" ::sm/params schema:check-team-external-invitations-params ::sm/result schema:check-team-external-invitations-result ::db/transaction true} @@ -677,7 +677,7 @@ the client must redirect there. The OIDC provider itself handles re-authentication transparently if the user already has an active SSO session." {::rpc/auth true - ::doc/added "2.19" + ::doc/added "2.18" ::sm/params schema:check-nitrate-sso ::nitrate/sso false} [cfg {:keys [::rpc/profile-id team-id organization-id url] :as params}] diff --git a/backend/src/app/rpc/management/nitrate.clj b/backend/src/app/rpc/management/nitrate.clj index ca334ffb79..d888308dde 100644 --- a/backend/src/app/rpc/management/nitrate.clj +++ b/backend/src/app/rpc/management/nitrate.clj @@ -54,7 +54,7 @@ (sv/defmethod ::authenticate "Authenticate the current user" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params [:map] ::sm/result schema:profile ::nitrate/sso false} @@ -94,7 +94,7 @@ (sv/defmethod ::get-penpot-version "Get the current Penpot version" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params [:map] ::sm/result schema:get-penpot-version-result ::rpc/auth false} @@ -106,7 +106,7 @@ (sv/defmethod ::get-teams "List teams for which current user is owner" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params [:map] ::sm/result schema:get-teams-result ::nitrate/sso false} @@ -130,7 +130,7 @@ "Store an organization logo in penpot storage and return its ID. Accepts an optional previous-id to mark the old logo for garbage collection when replacing an existing one." - {::doc/added "2.17" + {::doc/added "2.18" ::sm/params schema:upload-organization-logo ::sm/result schema:upload-organization-logo-result ::nitrate/sso false} @@ -151,7 +151,7 @@ (sv/defmethod ::notify-team-change "Notify to Penpot a team change from nitrate" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params cto/schema:team-with-organization ::rpc/auth false} [cfg team] @@ -168,7 +168,7 @@ (sv/defmethod ::notify-user-added-to-organization "Notify to Penpot that an user has joined an organization from nitrate" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params schema:notify-user-added-to-organization ::rpc/auth false} [cfg {:keys [profile-id organization-id]}] @@ -199,7 +199,7 @@ (sv/defmethod ::get-managed-profiles "List profiles that belong to teams for which current user is owner" - {::doc/added "2.14" + {::doc/added "2.18" ::sm/params [:map] ::sm/result schema:managed-profile-result ::nitrate/sso false} @@ -239,7 +239,7 @@ (sv/defmethod ::get-teams-summary "Get summary information for a list of teams" - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params schema:get-teams-summary-params ::sm/result schema:get-teams-summary-result ::nitrate/sso false} @@ -360,7 +360,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::notify-organization-deletion "For a deleted organization, preserve organization teams and only prefix or delete imported Your Penpot teams before notifying connected users." - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params schema:notify-organization-deletion ::rpc/auth false} [cfg {:keys [organization-id]}] @@ -406,7 +406,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-profile-by-email "Get profile by email" - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params [:map [:email ::sm/email]] ::sm/result schema:profile ::nitrate/sso false} @@ -430,7 +430,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-profile-by-id "Get profile by email" - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params [:map [:id ::sm/uuid]] ::sm/result schema:profile ::nitrate/sso false} @@ -465,7 +465,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-organization-member-team-counts "Get the number of non-default teams each profile belongs to within a set of teams." - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params schema:get-organization-member-team-counts-params ::sm/result schema:get-organization-member-team-counts-result ::rpc/auth false} @@ -505,7 +505,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::invite-to-organization "Invite to organization" - {::doc/added "2.15" + {::doc/added "2.18" ::sm/params [:map [:email ::sm/email] [:organization cto/schema:organization-with-avatar]] @@ -537,7 +537,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-organization-invitations "Get valid invitations for an organization, returning at most one invitation per email." - {::doc/added "2.16" + {::doc/added "2.18" ::sm/params schema:get-organization-invitations-params ::sm/result schema:get-organization-invitations-result ::nitrate/sso false} @@ -565,7 +565,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::delete-organization-invitations "Delete all invitations for one email in an organization scope (organization + organization teams)." - {::doc/added "2.16" + {::doc/added "2.18" ::sm/params schema:delete-organization-invitations-params ::nitrate/sso false} [cfg {:keys [organization-id email]}] @@ -630,7 +630,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::remove-from-organization "Remove an user from an organization" - {::doc/added "2.17" + {::doc/added "2.18" ::sm/params [:map [:profile-id ::sm/uuid] [:organization-id ::sm/uuid] @@ -675,7 +675,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-remove-from-organization-summary "Get a summary of the teams that would be deleted, transferred, or exited if the user were removed from the organization" - {::doc/added "2.17" + {::doc/added "2.18" ::sm/params [:map [:profile-id ::sm/uuid] [:organization-id ::sm/uuid] @@ -710,7 +710,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::send-renewal-email "Send an Enterprise subscription renewal notice email to a user." - {::doc/added "2.17" + {::doc/added "2.18" ::sm/params schema:send-renewal-email-params ::rpc/auth false} [cfg {:keys [profile-id user-email user-name renewal-date estimated-amount organizations]}] @@ -823,7 +823,7 @@ RETURNING id, deleted_at;") "Push audit events from nitrate (strictly for nitrate backend events)" - {::doc/added "2.19" + {::doc/added "2.18" ::audit/skip true ::sm/params schema:push-audit-events-params ::rpc/auth false} @@ -930,7 +930,7 @@ RETURNING id, deleted_at;") (sv/defmethod ::get-teams-detail "Get detailed information for all non-deleted teams in an organization, including owner info and project/file/member counts." - {::doc/added "2.20" + {::doc/added "2.18" ::sm/params schema:get-teams-detail-params ::sm/result schema:get-teams-detail-result ::nitrate/sso false} @@ -958,7 +958,7 @@ RETURNING id, deleted_at;") "Validate an organization SSO configuration by generating a login redirect URL. Nitrate calls this while configuring SSO to verify client credentials and OIDC discovery before saving the settings." - {::doc/added "2.20" + {::doc/added "2.18" ::sm/params cto/schema:nitrate-sso ::sm/result schema:check-organization-sso-result ::rpc/auth false} @@ -968,7 +968,7 @@ RETURNING id, deleted_at;") ;; ---- API: notify-organization-sso-change (sv/defmethod ::notify-organization-sso-change "Nitrate notifies that an organization sso values have changed" - {::doc/added "2.19" + {::doc/added "2.18" ::sm/params [:map [:organization-id ::sm/uuid] [:updated-props ::sm/boolean] @@ -1017,7 +1017,7 @@ RETURNING id, deleted_at;") bulk-creation screen; access is gated by the shared key and, in Nitrate, an email allow-list. Requires the `admin-console-bulk-create-profiles` flag, disabled by default so it is only available on test environments." - {::doc/added "2.19" + {::doc/added "2.18" ::sm/params schema:bulk-create-profiles-params ::sm/result schema:bulk-create-profiles-result ::rpc/auth false}