diff --git a/api-specs/api/examples/extension-update-response.example.json b/api-specs/api/examples/extension-update-response.example.json new file mode 100644 index 000000000..882edb539 --- /dev/null +++ b/api-specs/api/examples/extension-update-response.example.json @@ -0,0 +1,21 @@ +{ + "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "version": 2, + "createdAt": "2017-01-25T14:14:22.417Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z", + "destination": { + "type": "HTTP", + "url": "https://example.azurewebsites.net/api/extension", + "authentication": { + "type": "AzureFunctions", + "key": "****code" + } + }, + "triggers": [ + { + "resourceTypeId": "cart", + "actions": ["Create", "Update"] + } + ], + "key": "my-new-extension-key" +} diff --git a/api-specs/api/examples/extension-update.example.json b/api-specs/api/examples/extension-update.example.json index b0ca53aaf..392da2518 100644 --- a/api-specs/api/examples/extension-update.example.json +++ b/api-specs/api/examples/extension-update.example.json @@ -1,7 +1,9 @@ { "version": 1, - "actions": [{ - "action": "setKey", - "key": "my-new-extension-key" - }] + "actions": [ + { + "action": "setKey", + "key": "my-new-extension-key" + } + ] } diff --git a/api-specs/api/examples/extension.example.json b/api-specs/api/examples/extension.example.json index 54cccc5e0..2094a8b2a 100644 --- a/api-specs/api/examples/extension.example.json +++ b/api-specs/api/examples/extension.example.json @@ -8,12 +8,14 @@ "url": "https://example.azurewebsites.net/api/extension", "authentication": { "type": "AzureFunctions", - "key": "some-azure-function-code" + "key": "****code" } }, - "triggers": [{ - "resourceTypeId": "cart", - "actions": ["Create", "Update"] - }], + "triggers": [ + { + "resourceTypeId": "cart", + "actions": ["Create", "Update"] + } + ], "key": "my-extension" } diff --git a/api-specs/api/examples/state-create.example.json b/api-specs/api/examples/state-create.example.json index 210d50e19..7273d9e1f 100644 --- a/api-specs/api/examples/state-create.example.json +++ b/api-specs/api/examples/state-create.example.json @@ -1,6 +1,12 @@ { - "key": "test-state", - "type": "ProductState", + "key": "Initial", + "type": "LineItemState", "roles": [], + "name": { + "en": "Initial" + }, + "description": { + "en": "Initial is the first State that a (custom) Line Item gets after its creation." + }, "initial": true } diff --git a/api-specs/api/examples/state-update-response.example.json b/api-specs/api/examples/state-update-response.example.json new file mode 100644 index 000000000..91dcdfb0f --- /dev/null +++ b/api-specs/api/examples/state-update-response.example.json @@ -0,0 +1,17 @@ +{ + "id": "7c2e2694-aefe-43d7-888e-6a99514caaca", + "version": 2, + "key": "Initial", + "type": "LineItemState", + "roles": [], + "name": { + "en": "New Name" + }, + "description": { + "en": "Initial is the first State that a (custom) Line Item gets after its creation." + }, + "builtIn": true, + "initial": true, + "createdAt": "2015-01-21T09:22:03.906Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z" +} diff --git a/api-specs/api/examples/state-update.example.json b/api-specs/api/examples/state-update.example.json index f04710fc9..e94e27672 100644 --- a/api-specs/api/examples/state-update.example.json +++ b/api-specs/api/examples/state-update.example.json @@ -1,9 +1,11 @@ { "version": 1, - "actions": [{ - "action": "setName", - "name": { - "en": "New Name" + "actions": [ + { + "action": "setName", + "name": { + "en": "New Name" + } } - }] + ] } diff --git a/api-specs/api/examples/state.example.json b/api-specs/api/examples/state.example.json index d78765f90..dd808e617 100644 --- a/api-specs/api/examples/state.example.json +++ b/api-specs/api/examples/state.example.json @@ -8,7 +8,7 @@ "en": "Initial" }, "description": { - "en": "Initial is the first that (custom) line item gets after its creation" + "en": "Initial is the first State that a (custom) Line Item gets after its creation." }, "builtIn": true, "initial": true, diff --git a/api-specs/api/examples/states.example.json b/api-specs/api/examples/states.example.json index 9f78f89d8..6853e629c 100644 --- a/api-specs/api/examples/states.example.json +++ b/api-specs/api/examples/states.example.json @@ -14,7 +14,7 @@ "en": "Initial" }, "description": { - "en": "Initial is the first that (custom) line item gets after it's creation" + "en": "Initial is the first State that a (custom) Line Item gets after its creation." }, "builtIn": true, "initial": true, diff --git a/api-specs/api/examples/subscription-create.example.json b/api-specs/api/examples/subscription-create.example.json index a33540603..9b580a991 100644 --- a/api-specs/api/examples/subscription-create.example.json +++ b/api-specs/api/examples/subscription-create.example.json @@ -1,9 +1,9 @@ { "destination": { "type": "SQS", - "queueUrl": "", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", "authenticationMode": "IAM", - "region": "" + "region": "my-region" }, "messages": [ { diff --git a/api-specs/api/examples/subscription-update-response.example.json b/api-specs/api/examples/subscription-update-response.example.json new file mode 100644 index 000000000..8753bed65 --- /dev/null +++ b/api-specs/api/examples/subscription-update-response.example.json @@ -0,0 +1,24 @@ +{ + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", + "version": 2, + "destination": { + "type": "SQS", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", + "authenticationMode": "IAM", + "region": "my-region" + }, + "messages": [ + { + "resourceTypeId": "product", + "types": [] + } + ], + "changes": [], + "createdAt": "2017-01-25T14:14:22.417Z", + "key": "new-key", + "format": { + "type": "Platform" + }, + "lastModifiedAt": "2024-08-06T13:49:48.511Z", + "status": "Healthy" +} diff --git a/api-specs/api/examples/subscription-update.example.json b/api-specs/api/examples/subscription-update.example.json index e73755234..c6bc40482 100644 --- a/api-specs/api/examples/subscription-update.example.json +++ b/api-specs/api/examples/subscription-update.example.json @@ -1,7 +1,9 @@ { "version": 1, - "actions": [{ - "action": "setKey", - "key": "queue-key" - }] + "actions": [ + { + "action": "setKey", + "key": "new-key" + } + ] } diff --git a/api-specs/api/examples/subscription.example.json b/api-specs/api/examples/subscription.example.json index 19b703c58..1e01d75ee 100644 --- a/api-specs/api/examples/subscription.example.json +++ b/api-specs/api/examples/subscription.example.json @@ -1,11 +1,11 @@ { - "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", "version": 1, "destination": { "type": "SQS", - "queueUrl": "", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", "authenticationMode": "IAM", - "region": "" + "region": "my-region" }, "messages": [ { diff --git a/api-specs/api/examples/subscriptions.example.json b/api-specs/api/examples/subscriptions.example.json index 44364b179..e16bc159f 100644 --- a/api-specs/api/examples/subscriptions.example.json +++ b/api-specs/api/examples/subscriptions.example.json @@ -5,7 +5,7 @@ "total": 1, "results": [ { - "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", "version": 1, "destination": { "type": "SQS", diff --git a/api-specs/api/examples/type-update-response.example.json b/api-specs/api/examples/type-update-response.example.json new file mode 100644 index 000000000..0eeedc5da --- /dev/null +++ b/api-specs/api/examples/type-update-response.example.json @@ -0,0 +1,27 @@ +{ + "id": "3ae9bcca-df23-443e-bd22-0c592f9694fa", + "version": 2, + "key": "lineitemtype", + "name": { + "en": "New Name" + }, + "description": { + "en": "description" + }, + "resourceTypeIds": ["line-item"], + "fieldDefinitions": [ + { + "name": "offer_name", + "label": { + "en": "offer_name" + }, + "required": false, + "type": { + "name": "String" + }, + "inputHint": "SingleLine" + } + ], + "createdAt": "2015-10-07T06:56:19.217Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z" +} diff --git a/api-specs/api/examples/type-update.example.json b/api-specs/api/examples/type-update.example.json index 7cb405d23..d882d1149 100644 --- a/api-specs/api/examples/type-update.example.json +++ b/api-specs/api/examples/type-update.example.json @@ -1,9 +1,11 @@ { "version": 1, - "actions": [{ - "action": "changeName", - "name": { - "en": "New Name" + "actions": [ + { + "action": "changeName", + "name": { + "en": "New Name" + } } - }] + ] } diff --git a/api-specs/api/resources/extensions.raml b/api-specs/api/resources/extensions.raml index e89073b27..d72765d83 100644 --- a/api-specs/api/resources/extensions.raml +++ b/api-specs/api/resources/extensions.raml @@ -75,7 +75,7 @@ post: body: application/json: type: Extension - example: !include ../examples/extension.example.json + example: !include ../examples/extension-update-response.example.json delete: displayName: Delete Extension by key securedBy: [oauth_2_0: { scopes: ['manage_extensions:{projectKey}'] }] @@ -122,7 +122,7 @@ post: body: application/json: type: Extension - example: !include ../examples/extension.example.json + example: !include ../examples/extension-update-response.example.json delete: displayName: Delete Extension by ID securedBy: [oauth_2_0: { scopes: ['manage_extensions:{projectKey}'] }] diff --git a/api-specs/api/resources/states.raml b/api-specs/api/resources/states.raml index 1e1814bb0..bd71a69f2 100644 --- a/api-specs/api/resources/states.raml +++ b/api-specs/api/resources/states.raml @@ -66,7 +66,7 @@ post: 200: body: application/json: - example: !include ../examples/state.example.json + example: !include ../examples/state-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_states:{projectKey}'] }] responses: @@ -100,7 +100,7 @@ post: 200: body: application/json: - example: !include ../examples/state.example.json + example: !include ../examples/state-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_states:{projectKey}'] }] responses: diff --git a/api-specs/api/resources/subscriptions.raml b/api-specs/api/resources/subscriptions.raml index 454334a4f..d47658144 100644 --- a/api-specs/api/resources/subscriptions.raml +++ b/api-specs/api/resources/subscriptions.raml @@ -79,7 +79,7 @@ post: body: application/json: type: Subscription - example: !include ../examples/subscription.example.json + example: !include ../examples/subscription-update-response.example.json delete: displayName: Delete Subscription by key securedBy: [oauth_2_0: { scopes: ['manage_subscriptions:{projectKey}'] }] @@ -126,7 +126,7 @@ post: body: application/json: type: Subscription - example: !include ../examples/subscription.example.json + example: !include ../examples/subscription-update-response.example.json delete: displayName: Update Subscription by ID securedBy: [oauth_2_0: { scopes: ['manage_subscriptions:{projectKey}'] }] diff --git a/api-specs/api/resources/types.raml b/api-specs/api/resources/types.raml index 66869e6b7..becd085eb 100644 --- a/api-specs/api/resources/types.raml +++ b/api-specs/api/resources/types.raml @@ -63,7 +63,7 @@ post: 200: body: application/json: - example: !include ../examples/type.example.json + example: !include ../examples/type-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_types:{projectKey}'] }] responses: @@ -97,7 +97,7 @@ post: 200: body: application/json: - example: !include ../examples/type.example.json + example: !include ../examples/type-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_types:{projectKey}'] }] responses: