Explorar el Código

docs: Add docs on the rememberMe option for login

Michael Bromley hace 1 año
padre
commit
c2eae7ad83

+ 7 - 1
docs/docs/reference/graphql-api/admin/mutations.md

@@ -1167,7 +1167,13 @@ import MemberDescription from '@site/src/components/MemberDescription';
 ## login
 ## login
 <div class="graphql-code-block">
 <div class="graphql-code-block">
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level comment">"""</div>
-<div class="graphql-code-line top-level comment">Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate(&#123; native: &#123; ... &#125;&#125;)`</div>
+<div class="graphql-code-line top-level comment">Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate(&#123; native: &#123; ... &#125;&#125;)</div>
+
+<div class="graphql-code-line top-level comment"></div>
+
+<div class="graphql-code-line top-level comment">The <code>rememberMe</code> option applies when using cookie-based sessions, and if <code>true</code> it will set the maxAge of the session cookie</div>
+
+<div class="graphql-code-line top-level comment">to 1 year.</div>
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Mutation</span> &#123;</div>
 <div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Mutation</span> &#123;</div>
 <div class="graphql-code-line ">login(username: <a href="/reference/graphql-api/admin/object-types#string">String</a>!, password: <a href="/reference/graphql-api/admin/object-types#string">String</a>!, rememberMe: <a href="/reference/graphql-api/admin/object-types#boolean">Boolean</a>): <a href="/reference/graphql-api/admin/object-types#nativeauthenticationresult">NativeAuthenticationResult</a>!</div>
 <div class="graphql-code-line ">login(username: <a href="/reference/graphql-api/admin/object-types#string">String</a>!, password: <a href="/reference/graphql-api/admin/object-types#string">String</a>!, rememberMe: <a href="/reference/graphql-api/admin/object-types#boolean">Boolean</a>): <a href="/reference/graphql-api/admin/object-types#nativeauthenticationresult">NativeAuthenticationResult</a>!</div>

+ 7 - 1
docs/docs/reference/graphql-api/shop/mutations.md

@@ -97,7 +97,13 @@ import MemberDescription from '@site/src/components/MemberDescription';
 ## login
 ## login
 <div class="graphql-code-block">
 <div class="graphql-code-block">
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level comment">"""</div>
-<div class="graphql-code-line top-level comment">Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate(&#123; native: &#123; ... &#125;&#125;)`</div>
+<div class="graphql-code-line top-level comment">Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate(&#123; native: &#123; ... &#125;&#125;)</div>
+
+<div class="graphql-code-line top-level comment"></div>
+
+<div class="graphql-code-line top-level comment">The <code>rememberMe</code> option applies when using cookie-based sessions, and if <code>true</code> it will set the maxAge of the session cookie</div>
+
+<div class="graphql-code-line top-level comment">to 1 year.</div>
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level comment">"""</div>
 <div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Mutation</span> &#123;</div>
 <div class="graphql-code-line top-level">type <span class="graphql-code-identifier">Mutation</span> &#123;</div>
 <div class="graphql-code-line ">login(username: <a href="/reference/graphql-api/shop/object-types#string">String</a>!, password: <a href="/reference/graphql-api/shop/object-types#string">String</a>!, rememberMe: <a href="/reference/graphql-api/shop/object-types#boolean">Boolean</a>): <a href="/reference/graphql-api/shop/object-types#nativeauthenticationresult">NativeAuthenticationResult</a>!</div>
 <div class="graphql-code-line ">login(username: <a href="/reference/graphql-api/shop/object-types#string">String</a>!, password: <a href="/reference/graphql-api/shop/object-types#string">String</a>!, rememberMe: <a href="/reference/graphql-api/shop/object-types#boolean">Boolean</a>): <a href="/reference/graphql-api/shop/object-types#nativeauthenticationresult">NativeAuthenticationResult</a>!</div>

+ 6 - 1
packages/admin-ui/src/lib/core/src/common/generated-types.ts

@@ -2865,7 +2865,12 @@ export type Mutation = {
   duplicateEntity: DuplicateEntityResult;
   duplicateEntity: DuplicateEntityResult;
   flushBufferedJobs: Success;
   flushBufferedJobs: Success;
   importProducts?: Maybe<ImportInfo>;
   importProducts?: Maybe<ImportInfo>;
-  /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+  /**
+   * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+   *
+   * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+   * to 1 year.
+   */
   login: NativeAuthenticationResult;
   login: NativeAuthenticationResult;
   logout: Success;
   logout: Success;
   /**
   /**

+ 6 - 1
packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts

@@ -2805,7 +2805,12 @@ export type Mutation = {
     duplicateEntity: DuplicateEntityResult;
     duplicateEntity: DuplicateEntityResult;
     flushBufferedJobs: Success;
     flushBufferedJobs: Success;
     importProducts?: Maybe<ImportInfo>;
     importProducts?: Maybe<ImportInfo>;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     logout: Success;
     logout: Success;
     /**
     /**

+ 6 - 1
packages/common/src/generated-shop-types.ts

@@ -1700,7 +1700,12 @@ export type Mutation = {
     createCustomerAddress: Address;
     createCustomerAddress: Address;
     /** Delete an existing Address */
     /** Delete an existing Address */
     deleteCustomerAddress: Success;
     deleteCustomerAddress: Success;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     /** End the current authenticated session */
     /** End the current authenticated session */
     logout: Success;
     logout: Success;

+ 6 - 1
packages/common/src/generated-types.ts

@@ -2853,7 +2853,12 @@ export type Mutation = {
   duplicateEntity: DuplicateEntityResult;
   duplicateEntity: DuplicateEntityResult;
   flushBufferedJobs: Success;
   flushBufferedJobs: Success;
   importProducts?: Maybe<ImportInfo>;
   importProducts?: Maybe<ImportInfo>;
-  /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+  /**
+   * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+   *
+   * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+   * to 1 year.
+   */
   login: NativeAuthenticationResult;
   login: NativeAuthenticationResult;
   logout: Success;
   logout: Success;
   /**
   /**

+ 6 - 1
packages/core/e2e/graphql/generated-e2e-admin-types.ts

@@ -2805,7 +2805,12 @@ export type Mutation = {
     duplicateEntity: DuplicateEntityResult;
     duplicateEntity: DuplicateEntityResult;
     flushBufferedJobs: Success;
     flushBufferedJobs: Success;
     importProducts?: Maybe<ImportInfo>;
     importProducts?: Maybe<ImportInfo>;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     logout: Success;
     logout: Success;
     /**
     /**

+ 6 - 1
packages/core/e2e/graphql/generated-e2e-shop-types.ts

@@ -1644,7 +1644,12 @@ export type Mutation = {
     createCustomerAddress: Address;
     createCustomerAddress: Address;
     /** Delete an existing Address */
     /** Delete an existing Address */
     deleteCustomerAddress: Success;
     deleteCustomerAddress: Success;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     /** End the current authenticated session */
     /** End the current authenticated session */
     logout: Success;
     logout: Success;

+ 6 - 1
packages/core/src/api/schema/admin-api/auth.api.graphql

@@ -3,7 +3,12 @@ type Query {
 }
 }
 
 
 type Mutation {
 type Mutation {
-    "Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})`"
+    """
+    Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+
+    The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+    to 1 year.
+    """
     login(username: String!, password: String!, rememberMe: Boolean): NativeAuthenticationResult!
     login(username: String!, password: String!, rememberMe: Boolean): NativeAuthenticationResult!
     "Authenticates the user using a named authentication strategy"
     "Authenticates the user using a named authentication strategy"
     authenticate(input: AuthenticationInput!, rememberMe: Boolean): AuthenticationResult!
     authenticate(input: AuthenticationInput!, rememberMe: Boolean): AuthenticationResult!

+ 6 - 1
packages/core/src/api/schema/shop-api/shop.api.graphql

@@ -79,7 +79,12 @@ type Mutation {
     addPaymentToOrder(input: PaymentInput!): AddPaymentToOrderResult!
     addPaymentToOrder(input: PaymentInput!): AddPaymentToOrderResult!
     "Set the Customer for the Order. Required only if the Customer is not currently logged in"
     "Set the Customer for the Order. Required only if the Customer is not currently logged in"
     setCustomerForOrder(input: CreateCustomerInput!): SetCustomerForOrderResult!
     setCustomerForOrder(input: CreateCustomerInput!): SetCustomerForOrderResult!
-    "Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})`"
+    """
+    Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+
+    The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+    to 1 year.
+    """
     login(username: String!, password: String!, rememberMe: Boolean): NativeAuthenticationResult!
     login(username: String!, password: String!, rememberMe: Boolean): NativeAuthenticationResult!
     "Authenticates the user using a named authentication strategy"
     "Authenticates the user using a named authentication strategy"
     authenticate(input: AuthenticationInput!, rememberMe: Boolean): AuthenticationResult!
     authenticate(input: AuthenticationInput!, rememberMe: Boolean): AuthenticationResult!

+ 6 - 1
packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts

@@ -2805,7 +2805,12 @@ export type Mutation = {
     duplicateEntity: DuplicateEntityResult;
     duplicateEntity: DuplicateEntityResult;
     flushBufferedJobs: Success;
     flushBufferedJobs: Success;
     importProducts?: Maybe<ImportInfo>;
     importProducts?: Maybe<ImportInfo>;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     logout: Success;
     logout: Success;
     /**
     /**

+ 6 - 1
packages/payments-plugin/e2e/graphql/generated-admin-types.ts

@@ -2805,7 +2805,12 @@ export type Mutation = {
     duplicateEntity: DuplicateEntityResult;
     duplicateEntity: DuplicateEntityResult;
     flushBufferedJobs: Success;
     flushBufferedJobs: Success;
     importProducts?: Maybe<ImportInfo>;
     importProducts?: Maybe<ImportInfo>;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     logout: Success;
     logout: Success;
     /**
     /**

+ 6 - 1
packages/payments-plugin/e2e/graphql/generated-shop-types.ts

@@ -1644,7 +1644,12 @@ export type Mutation = {
     createCustomerAddress: Address;
     createCustomerAddress: Address;
     /** Delete an existing Address */
     /** Delete an existing Address */
     deleteCustomerAddress: Success;
     deleteCustomerAddress: Success;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     /** End the current authenticated session */
     /** End the current authenticated session */
     logout: Success;
     logout: Success;

+ 26 - 63
packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts

@@ -15,13 +15,9 @@ export type Scalars = {
     Boolean: { input: boolean; output: boolean };
     Boolean: { input: boolean; output: boolean };
     Int: { input: number; output: number };
     Int: { input: number; output: number };
     Float: { input: number; output: number };
     Float: { input: number; output: number };
-    /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
     DateTime: { input: any; output: any };
     DateTime: { input: any; output: any };
-    /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
     JSON: { input: any; output: any };
     JSON: { input: any; output: any };
-    /** The `Money` scalar type represents monetary values and supports signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). */
     Money: { input: number; output: number };
     Money: { input: number; output: number };
-    /** The `Upload` scalar type represents a file upload. */
     Upload: { input: any; output: any };
     Upload: { input: any; output: any };
 };
 };
 
 
@@ -323,6 +319,12 @@ export type Coordinate = {
     y: Scalars['Float']['output'];
     y: Scalars['Float']['output'];
 };
 };
 
 
+/**
+ * A Country of the world which your shop operates in.
+ *
+ * The `code` field is typically a 2-character ISO code such as "GB", "US", "DE" etc. This code is used in certain inputs such as
+ * `UpdateAddressInput` and `CreateAddressInput` to specify the country.
+ */
 export type Country = Node &
 export type Country = Node &
     Region & {
     Region & {
         __typename?: 'Country';
         __typename?: 'Country';
@@ -371,6 +373,13 @@ export type CouponCodeLimitError = ErrorResult & {
     message: Scalars['String']['output'];
     message: Scalars['String']['output'];
 };
 };
 
 
+/**
+ * Input used to create an Address.
+ *
+ * The countryCode must correspond to a `code` property of a Country that has been defined in the
+ * Vendure server. The `code` property is typically a 2-character ISO code such as "GB", "US", "DE" etc.
+ * If an invalid code is passed, the mutation will fail.
+ */
 export type CreateAddressInput = {
 export type CreateAddressInput = {
     city?: InputMaybe<Scalars['String']['input']>;
     city?: InputMaybe<Scalars['String']['input']>;
     company?: InputMaybe<Scalars['String']['input']>;
     company?: InputMaybe<Scalars['String']['input']>;
@@ -1675,54 +1684,6 @@ export type MissingPasswordError = ErrorResult & {
     message: Scalars['String']['output'];
     message: Scalars['String']['output'];
 };
 };
 
 
-export type MollieAmount = {
-    __typename?: 'MollieAmount';
-    currency?: Maybe<Scalars['String']['output']>;
-    value?: Maybe<Scalars['String']['output']>;
-};
-
-export type MolliePaymentIntent = {
-    __typename?: 'MolliePaymentIntent';
-    url: Scalars['String']['output'];
-};
-
-export type MolliePaymentIntentError = ErrorResult & {
-    __typename?: 'MolliePaymentIntentError';
-    errorCode: ErrorCode;
-    message: Scalars['String']['output'];
-};
-
-export type MolliePaymentIntentInput = {
-    molliePaymentMethodCode?: InputMaybe<Scalars['String']['input']>;
-    paymentMethodCode?: InputMaybe<Scalars['String']['input']>;
-    redirectUrl?: InputMaybe<Scalars['String']['input']>;
-    orderId?: InputMaybe<Scalars['ID']['input']>;
-};
-
-export type MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError;
-
-export type MolliePaymentMethod = {
-    __typename?: 'MolliePaymentMethod';
-    code: Scalars['String']['output'];
-    description?: Maybe<Scalars['String']['output']>;
-    id: Scalars['ID']['output'];
-    image?: Maybe<MolliePaymentMethodImages>;
-    maximumAmount?: Maybe<MollieAmount>;
-    minimumAmount?: Maybe<MollieAmount>;
-    status?: Maybe<Scalars['String']['output']>;
-};
-
-export type MolliePaymentMethodImages = {
-    __typename?: 'MolliePaymentMethodImages';
-    size1x?: Maybe<Scalars['String']['output']>;
-    size2x?: Maybe<Scalars['String']['output']>;
-    svg?: Maybe<Scalars['String']['output']>;
-};
-
-export type MolliePaymentMethodsInput = {
-    paymentMethodCode: Scalars['String']['input'];
-};
-
 export type Mutation = {
 export type Mutation = {
     __typename?: 'Mutation';
     __typename?: 'Mutation';
     /** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */
     /** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */
@@ -1737,10 +1698,14 @@ export type Mutation = {
     authenticate: AuthenticationResult;
     authenticate: AuthenticationResult;
     /** Create a new Customer Address */
     /** Create a new Customer Address */
     createCustomerAddress: Address;
     createCustomerAddress: Address;
-    createMolliePaymentIntent: MolliePaymentIntentResult;
     /** Delete an existing Address */
     /** Delete an existing Address */
     deleteCustomerAddress: Success;
     deleteCustomerAddress: Success;
-    /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
+    /**
+     * Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
+     *
+     * The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
+     * to 1 year.
+     */
     login: NativeAuthenticationResult;
     login: NativeAuthenticationResult;
     /** End the current authenticated session */
     /** End the current authenticated session */
     logout: Success;
     logout: Success;
@@ -1844,10 +1809,6 @@ export type MutationCreateCustomerAddressArgs = {
     input: CreateAddressInput;
     input: CreateAddressInput;
 };
 };
 
 
-export type MutationCreateMolliePaymentIntentArgs = {
-    input: MolliePaymentIntentInput;
-};
-
 export type MutationDeleteCustomerAddressArgs = {
 export type MutationDeleteCustomerAddressArgs = {
     id: Scalars['ID']['input'];
     id: Scalars['ID']['input'];
 };
 };
@@ -2891,7 +2852,6 @@ export type Query = {
     facets: FacetList;
     facets: FacetList;
     /** Returns information about the current authenticated User */
     /** Returns information about the current authenticated User */
     me?: Maybe<CurrentUser>;
     me?: Maybe<CurrentUser>;
-    molliePaymentMethods: Array<MolliePaymentMethod>;
     /** Returns the possible next states that the activeOrder can transition to */
     /** Returns the possible next states that the activeOrder can transition to */
     nextOrderStates: Array<Scalars['String']['output']>;
     nextOrderStates: Array<Scalars['String']['output']>;
     /**
     /**
@@ -2931,10 +2891,6 @@ export type QueryFacetsArgs = {
     options?: InputMaybe<FacetListOptions>;
     options?: InputMaybe<FacetListOptions>;
 };
 };
 
 
-export type QueryMolliePaymentMethodsArgs = {
-    input: MolliePaymentMethodsInput;
-};
-
 export type QueryOrderArgs = {
 export type QueryOrderArgs = {
     id: Scalars['ID']['input'];
     id: Scalars['ID']['input'];
 };
 };
@@ -3353,6 +3309,13 @@ export type TextCustomFieldConfig = CustomField & {
 
 
 export type TransitionOrderToStateResult = Order | OrderStateTransitionError;
 export type TransitionOrderToStateResult = Order | OrderStateTransitionError;
 
 
+/**
+ * Input used to update an Address.
+ *
+ * The countryCode must correspond to a `code` property of a Country that has been defined in the
+ * Vendure server. The `code` property is typically a 2-character ISO code such as "GB", "US", "DE" etc.
+ * If an invalid code is passed, the mutation will fail.
+ */
 export type UpdateAddressInput = {
 export type UpdateAddressInput = {
     city?: InputMaybe<Scalars['String']['input']>;
     city?: InputMaybe<Scalars['String']['input']>;
     company?: InputMaybe<Scalars['String']['input']>;
     company?: InputMaybe<Scalars['String']['input']>;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
schema-admin.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
schema-shop.json


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio