Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Oct 6, 2023
1 parent 094bf52 commit 8a2ef0e
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api-specs/api/resources/customers.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}'] }]
Expand Down
17 changes: 17 additions & 0 deletions api-specs/api/types/message/CustomerEmailTokenCreatedMessage.raml
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions api-specs/api/types/types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions api-specs/graphql/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}
Expand Down Expand Up @@ -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!
Expand Down

0 comments on commit 8a2ef0e

Please sign in to comment.