From 145c59ec40b9c2eaf4e7c0cf4ddf836bd453d835 Mon Sep 17 00:00:00 2001 From: Nick Wylynko Date: Thu, 19 Dec 2024 23:04:28 +0800 Subject: [PATCH 1/6] Add legalAcceptedAt and skipLegalChecks fields to user management methods --- docs/references/backend/user/create-user.mdx | 14 ++++++++++++++ docs/references/backend/user/get-user-list.mdx | 6 ++++-- docs/references/backend/user/get-user.mdx | 3 ++- docs/references/backend/user/update-user.mdx | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index 1da75cca6f..fd3ae85502 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -201,6 +201,20 @@ function createUser(params: CreateUserParams): Promise --- + - `legalAcceptedAt?` + - `string` + + A custom timestamp denoting when the user accepted legal requirements, specified in [RFC3339 format](https://datatracker.ietf.org/doc/html/rfc3339). For example: `2012-10-20T07:15:20.902Z`. + + --- + + - `skipLegalChecks?` + - `boolean` + + When set to true all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. + + --- + - `createdAt` - `string` diff --git a/docs/references/backend/user/get-user-list.mdx b/docs/references/backend/user/get-user-list.mdx index 8d9864e8bc..b0de35638e 100644 --- a/docs/references/backend/user/get-user-list.mdx +++ b/docs/references/backend/user/get-user-list.mdx @@ -140,7 +140,8 @@ console.log(response) web3Wallets: [], externalAccounts: [Array], lastActiveAt: 1707523200000, - createOrganizationEnabled: true + createOrganizationEnabled: true, + legalAcceptedAt: null }, _User { id: 'user_456', @@ -170,7 +171,8 @@ console.log(response) web3Wallets: [], externalAccounts: [Array], lastActiveAt: 1707523200000, - createOrganizationEnabled: true + createOrganizationEnabled: true, + legalAcceptedAt: null }, ... ], diff --git a/docs/references/backend/user/get-user.mdx b/docs/references/backend/user/get-user.mdx index 4122ea8d16..166b6a44e5 100644 --- a/docs/references/backend/user/get-user.mdx +++ b/docs/references/backend/user/get-user.mdx @@ -67,7 +67,8 @@ _User { web3Wallets: [], externalAccounts: [], lastActiveAt: null, - createOrganizationEnabled: true + createOrganizationEnabled: true, + legalAcceptedAt: null } */ ``` diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index b146c6f9cd..2fd8d539bf 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -186,6 +186,20 @@ function updateUser(userId: string, params: UpdateUserParams): Promise --- + - `legalAcceptedAt?` + - `string` + + A custom timestamp denoting when the user accepted legal requirements, specified in [RFC3339 format](https://datatracker.ietf.org/doc/html/rfc3339). For example: `2012-10-20T07:15:20.902Z`. + + --- + + - `skipLegalChecks?` + - `boolean` + + When set to true all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. + + --- + - `createdAt?` - `Date` From e7220a98c98a7a1b1e6892ad93ea9abb105e6d1e Mon Sep 17 00:00:00 2001 From: Nick Wylynko Date: Fri, 20 Dec 2024 00:40:19 +0800 Subject: [PATCH 2/6] Update the response models for createUser and updateUser to reflect inclusion of `legalAcceptedAt` --- docs/references/backend/user/create-user.mdx | 3 ++- docs/references/backend/user/update-user.mdx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index fd3ae85502..743624804b 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -273,7 +273,8 @@ _User { externalAccounts: [], samlAccounts: [], lastActiveAt: null, - createOrganizationEnabled: true + createOrganizationEnabled: true, + legalAcceptedAt: null } */ ``` diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index 2fd8d539bf..dac2895678 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -271,7 +271,8 @@ _User { ], samlAccounts: [], lastActiveAt: 1720205704451, - createOrganizationEnabled: true + createOrganizationEnabled: true, + legalAcceptedAt: null } */ ``` From 3134212d6132f920a7f049254f650936628b0869 Mon Sep 17 00:00:00 2001 From: Nick Wylynko Date: Fri, 20 Dec 2024 02:01:51 +0800 Subject: [PATCH 3/6] Updated user backend model to include the `legalAcceptedAt` property --- docs/references/backend/types/backend-user.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/references/backend/types/backend-user.mdx b/docs/references/backend/types/backend-user.mdx index dafe26a73a..db73255b40 100644 --- a/docs/references/backend/types/backend-user.mdx +++ b/docs/references/backend/types/backend-user.mdx @@ -208,6 +208,13 @@ The Backend `User` object is similar to the `User` object as it holds informatio - `number` An integer indicating the number of organizations that can be created by the user. If the value is `0`, then the user can create unlimited organizations. Default is `null`. + + --- + + - `legalAcceptedAt?` + - `number` + + Unix timestamp of when the user accepted the legal requirements. [web3-ref]: /docs/references/javascript/web3-wallet/web3-wallet From c8f4b722d41bfd0f899f5db893cdc4c8e9c95c7a Mon Sep 17 00:00:00 2001 From: Nick Wylynko Date: Fri, 20 Dec 2024 02:09:16 +0800 Subject: [PATCH 4/6] Update `legalAcceptedAt` type to reflect backend sdk auto parsing the string --- docs/references/backend/types/backend-user.mdx | 2 +- docs/references/backend/user/create-user.mdx | 4 ++-- docs/references/backend/user/update-user.mdx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/backend/types/backend-user.mdx b/docs/references/backend/types/backend-user.mdx index db73255b40..fefe4224b5 100644 --- a/docs/references/backend/types/backend-user.mdx +++ b/docs/references/backend/types/backend-user.mdx @@ -214,7 +214,7 @@ The Backend `User` object is similar to the `User` object as it holds informatio - `legalAcceptedAt?` - `number` - Unix timestamp of when the user accepted the legal requirements. + Unix timestamp of when the user accepted the legal requirements. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. [web3-ref]: /docs/references/javascript/web3-wallet/web3-wallet diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index 743624804b..ddc59de91e 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -202,9 +202,9 @@ function createUser(params: CreateUserParams): Promise --- - `legalAcceptedAt?` - - `string` + - `Date` - A custom timestamp denoting when the user accepted legal requirements, specified in [RFC3339 format](https://datatracker.ietf.org/doc/html/rfc3339). For example: `2012-10-20T07:15:20.902Z`. + Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. --- diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index dac2895678..804eb480de 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -187,9 +187,9 @@ function updateUser(userId: string, params: UpdateUserParams): Promise --- - `legalAcceptedAt?` - - `string` + - `Date` - A custom timestamp denoting when the user accepted legal requirements, specified in [RFC3339 format](https://datatracker.ietf.org/doc/html/rfc3339). For example: `2012-10-20T07:15:20.902Z`. + Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. --- From 005789e21bbcfecebbacafbdf166a692a910e1ad Mon Sep 17 00:00:00 2001 From: Nick Wylynko Date: Fri, 20 Dec 2024 02:11:46 +0800 Subject: [PATCH 5/6] Indicate to devs that `true` is a possible value of `skipLegalChecks` --- docs/references/backend/user/create-user.mdx | 2 +- docs/references/backend/user/update-user.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index ddc59de91e..02c809618c 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -211,7 +211,7 @@ function createUser(params: CreateUserParams): Promise - `skipLegalChecks?` - `boolean` - When set to true all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. + When set to `true` all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. --- diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index 804eb480de..51f3fd79c7 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -196,7 +196,7 @@ function updateUser(userId: string, params: UpdateUserParams): Promise - `skipLegalChecks?` - `boolean` - When set to true all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. + When set to `true` all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. --- From 542b39975ad8176e32534bf4ae09a2a0f7149dff Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:51:46 -0500 Subject: [PATCH 6/6] description updates --- docs/references/backend/types/backend-user.mdx | 4 ++-- docs/references/backend/user/create-user.mdx | 2 +- docs/references/backend/user/update-user.mdx | 2 +- docs/references/javascript/user/user.mdx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/backend/types/backend-user.mdx b/docs/references/backend/types/backend-user.mdx index fefe4224b5..70fb019b9e 100644 --- a/docs/references/backend/types/backend-user.mdx +++ b/docs/references/backend/types/backend-user.mdx @@ -212,9 +212,9 @@ The Backend `User` object is similar to the `User` object as it holds informatio --- - `legalAcceptedAt?` - - `number` + - `number | null` - Unix timestamp of when the user accepted the legal requirements. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + The unix timestamp of when the user accepted the legal requirements. `null` if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. [web3-ref]: /docs/references/javascript/web3-wallet/web3-wallet diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index 02c809618c..d912e6615b 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -204,7 +204,7 @@ function createUser(params: CreateUserParams): Promise - `legalAcceptedAt?` - `Date` - Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + The date when the user accepted the legal documents. `null` if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. --- diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index 51f3fd79c7..4675846a50 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -189,7 +189,7 @@ function updateUser(userId: string, params: UpdateUserParams): Promise - `legalAcceptedAt?` - `Date` - Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + The date when the user accepted the legal documents. `null` if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. --- diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index e536085839..69b3927afa 100644 --- a/docs/references/javascript/user/user.mdx +++ b/docs/references/javascript/user/user.mdx @@ -255,7 +255,7 @@ The ClerkJS SDK provides some helper [methods](#methods) on the `User` object to - `legalAcceptedAt` - `Date` - Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + The date when the user accepted the legal documents. `null` if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. ---