diff --git a/api-specs/api/resources/customers.raml b/api-specs/api/resources/customers.raml index a2ee5e721..2e8f822a4 100644 --- a/api-specs/api/resources/customers.raml +++ b/api-specs/api/resources/customers.raml @@ -64,6 +64,7 @@ post: type: base post: displayName: Create a Token for verifying the Customer's Email + description: Produces the [CustomerEmailTokenCreated](ctp:api:type:CustomerEmailTokenCreatedMessage) Message. securedBy: [oauth_2_0: { scopes: ['manage_customers:{projectKey}'] }] body: application/json: @@ -131,6 +132,7 @@ post: /password-token: type: base displayName: Create a Token for Resetting the Customer's Password + description: Produces the [CustomerPasswordTokenCreated](ctp:api:type:CustomerPasswordTokenCreatedMessage) Message. post: displayName: Create a Token for Resetting the Customer's Password securedBy: [oauth_2_0: { scopes: ['manage_customers:{projectKey}'] }] diff --git a/api-specs/api/types/message/CustomerEmailTokenCreatedMessage.raml b/api-specs/api/types/message/CustomerEmailTokenCreatedMessage.raml new file mode 100644 index 000000000..d38460733 --- /dev/null +++ b/api-specs/api/types/message/CustomerEmailTokenCreatedMessage.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): Message +(docs-uri): https://docs.commercetools.com/http-api-projects-messages.html#customeremailtoken-created +type: Message +displayName: CustomerEmailTokenCreatedMessage +discriminatorValue: CustomerEmailTokenCreated +description: | + Generated after a successful [Create email token for Customer](/../api/projects/customers#create-email-token-for-customer) request. +properties: + customerId: + type: string + description: | + Unique identifier of the Customer. + expiresAt: + type: datetime + description: | + Date and time (UTC) the email token expires. diff --git a/api-specs/api/types/message/CustomerPasswordTokenCreatedMessage.raml b/api-specs/api/types/message/CustomerPasswordTokenCreatedMessage.raml new file mode 100644 index 000000000..68f34ac84 --- /dev/null +++ b/api-specs/api/types/message/CustomerPasswordTokenCreatedMessage.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): Message +(docs-uri): https://docs.commercetools.com/http-api-projects-messages.html#customerpasswordtoken-created +type: Message +displayName: CustomerPasswordTokenCreatedMessage +discriminatorValue: CustomerPasswordTokenCreated +description: | + Generated after a successful [Create password reset token for Customer](/../api/projects/customers#create-password-reset-token-for-customer) request. +properties: + customerId: + type: string + description: | + Unique identifier of the Customer. + expiresAt: + type: datetime + description: | + Date and time (UTC) the password token expires. diff --git a/api-specs/api/types/message/payload/CustomerEmailTokenCreatedMessagePayload.raml b/api-specs/api/types/message/payload/CustomerEmailTokenCreatedMessagePayload.raml new file mode 100644 index 000000000..0ebfef686 --- /dev/null +++ b/api-specs/api/types/message/payload/CustomerEmailTokenCreatedMessagePayload.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): Message +(docs-uri): https://docs.commercetools.com/http-api-projects-messages.html#customeremailtoken-created +type: MessagePayload +displayName: CustomerEmailTokenCreatedMessagePayload +discriminatorValue: CustomerEmailTokenCreated +description: | + Generated after a successful [Create email token for Customer](/../api/projects/customers#create-email-token-for-customer) request. +properties: + customerId: + type: string + description: | + Unique identifier of the Customer. + expiresAt: + type: datetime + description: | + Date and time (UTC) the email token expires. diff --git a/api-specs/api/types/message/payload/CustomerPasswordTokenCreatedMessagePayload.raml b/api-specs/api/types/message/payload/CustomerPasswordTokenCreatedMessagePayload.raml new file mode 100644 index 000000000..85fa23370 --- /dev/null +++ b/api-specs/api/types/message/payload/CustomerPasswordTokenCreatedMessagePayload.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): Message +(docs-uri): https://docs.commercetools.com/http-api-projects-messages.html#customerpasswordtoken-created +type: MessagePayload +displayName: CustomerPasswordTokenCreatedMessagePayload +discriminatorValue: CustomerPasswordTokenCreated +description: | + Generated after a successful [Create password reset token for Customer](/../api/projects/customers#create-password-reset-token-for-customer) request. +properties: + customerId: + type: string + description: | + Unique identifier of the Customer. + expiresAt: + type: datetime + description: | + Date and time (UTC) the password token expires. diff --git a/api-specs/api/types/types.raml b/api-specs/api/types/types.raml index cc38c11a9..c510797af 100644 --- a/api-specs/api/types/types.raml +++ b/api-specs/api/types/types.raml @@ -878,6 +878,7 @@ CustomerCustomTypeSetMessage: !include message/CustomerCustomTypeSetMessage.raml CustomerDateOfBirthSetMessage: !include message/CustomerDateOfBirthSetMessage.raml CustomerDeletedMessage: !include message/CustomerDeletedMessage.raml CustomerEmailChangedMessage: !include message/CustomerEmailChangedMessage.raml +CustomerEmailTokenCreatedMessage: !include message/CustomerEmailTokenCreatedMessage.raml CustomerEmailVerifiedMessage: !include message/CustomerEmailVerifiedMessage.raml CustomerFirstNameSetMessage: !include message/CustomerFirstNameSetMessage.raml CustomerGroupCustomFieldAddedMessage: !include message/CustomerGroupCustomFieldAddedMessage.raml @@ -887,6 +888,7 @@ CustomerGroupCustomTypeRemovedMessage: !include message/CustomerGroupCustomTypeR CustomerGroupCustomTypeSetMessage: !include message/CustomerGroupCustomTypeSetMessage.raml CustomerGroupSetMessage: !include message/CustomerGroupSetMessage.raml CustomerLastNameSetMessage: !include message/CustomerLastNameSetMessage.raml +CustomerPasswordTokenCreatedMessage: !include message/CustomerPasswordTokenCreatedMessage.raml CustomerPasswordUpdatedMessage: !include message/CustomerPasswordUpdatedMessage.raml CustomerTitleSetMessage: !include message/CustomerTitleSetMessage.raml DeliveryAddedMessage: !include message/DeliveryAddedMessage.raml @@ -1113,6 +1115,7 @@ CustomerCustomTypeSetMessagePayload: !include message/payload/CustomerCustomType CustomerDateOfBirthSetMessagePayload: !include message/payload/CustomerDateOfBirthSetMessagePayload.raml CustomerDeletedMessagePayload: !include message/payload/CustomerDeletedMessagePayload.raml CustomerEmailChangedMessagePayload: !include message/payload/CustomerEmailChangedMessagePayload.raml +CustomerEmailTokenCreatedMessagePayload: !include message/payload/CustomerEmailTokenCreatedMessagePayload.raml CustomerEmailVerifiedMessagePayload: !include message/payload/CustomerEmailVerifiedMessagePayload.raml CustomerFirstNameSetMessagePayload: !include message/payload/CustomerFirstNameSetMessagePayload.raml CustomerGroupCustomFieldAddedMessagePayload: !include message/payload/CustomerGroupCustomFieldAddedMessagePayload.raml @@ -1124,6 +1127,7 @@ CustomerGroupCustomTypeRemovedMessagePayload: !include message/payload/CustomerG CustomerGroupCustomTypeSetMessagePayload: !include message/payload/CustomerGroupCustomTypeSetMessagePayload.raml CustomerGroupSetMessagePayload: !include message/payload/CustomerGroupSetMessagePayload.raml CustomerLastNameSetMessagePayload: !include message/payload/CustomerLastNameSetMessagePayload.raml +CustomerPasswordTokenCreatedMessagePayload: !include message/payload/CustomerPasswordTokenCreatedMessagePayload.raml CustomerPasswordUpdatedMessagePayload: !include message/payload/CustomerPasswordUpdatedMessagePayload.raml CustomerTitleSetMessagePayload: !include message/payload/CustomerTitleSetMessagePayload.raml DeliveryAddedMessagePayload: !include message/payload/DeliveryAddedMessagePayload.raml diff --git a/api-specs/graphql/schema.sdl b/api-specs/graphql/schema.sdl index 2c8d7f855..1f390f7e4 100644 --- a/api-specs/graphql/schema.sdl +++ b/api-specs/graphql/schema.sdl @@ -3499,6 +3499,12 @@ type CustomerEmailToken implements Versioned { lastModifiedBy: Initiator } +type CustomerEmailTokenCreated implements MessagePayload { + customerId: String! + expiresAt: DateTime! + type: String! +} + type CustomerEmailVerified implements MessagePayload { type: String! } @@ -3620,6 +3626,12 @@ type CustomerPasswordToken implements Versioned { lastModifiedBy: Initiator } +type CustomerPasswordTokenCreated implements MessagePayload { + customerId: String! + expiresAt: DateTime! + type: String! +} + type CustomerPasswordUpdated implements MessagePayload { reset: Boolean! type: String!