Skip to content

Commit

Permalink
Updated api-reference from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Aug 9, 2024
1 parent fa7733f commit be68a5d
Show file tree
Hide file tree
Showing 60 changed files with 1,399 additions and 362 deletions.
21 changes: 21 additions & 0 deletions api-specs/api/examples/extension-update-response.example.json
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 6 additions & 4 deletions api-specs/api/examples/extension-update.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"version": 1,
"actions": [{
"action": "setKey",
"key": "my-new-extension-key"
}]
"actions": [
{
"action": "setKey",
"key": "my-new-extension-key"
}
]
}
12 changes: 7 additions & 5 deletions api-specs/api/examples/extension.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
10 changes: 8 additions & 2 deletions api-specs/api/examples/state-create.example.json
Original file line number Diff line number Diff line change
@@ -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
}
17 changes: 17 additions & 0 deletions api-specs/api/examples/state-update-response.example.json
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 7 additions & 5 deletions api-specs/api/examples/state-update.example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"version": 1,
"actions": [{
"action": "setName",
"name": {
"en": "New Name"
"actions": [
{
"action": "setName",
"name": {
"en": "New Name"
}
}
}]
]
}
2 changes: 1 addition & 1 deletion api-specs/api/examples/state.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion api-specs/api/examples/states.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions api-specs/api/examples/subscription-create.example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"destination": {
"type": "SQS",
"queueUrl": "<url-to-my-queue>",
"queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue",
"authenticationMode": "IAM",
"region": "<my-region>"
"region": "my-region"
},
"messages": [
{
Expand Down
24 changes: 24 additions & 0 deletions api-specs/api/examples/subscription-update-response.example.json
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 6 additions & 4 deletions api-specs/api/examples/subscription-update.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"version": 1,
"actions": [{
"action": "setKey",
"key": "queue-key"
}]
"actions": [
{
"action": "setKey",
"key": "new-key"
}
]
}
6 changes: 3 additions & 3 deletions api-specs/api/examples/subscription.example.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "8062243c-46fc-40b5-88a4-75e2216aef75",
"id": "bf79c5d2-2813-4229-9a88-e7c76be50986",
"version": 1,
"destination": {
"type": "SQS",
"queueUrl": "<url-to-my-queue>",
"queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue",
"authenticationMode": "IAM",
"region": "<my-region>"
"region": "my-region"
},
"messages": [
{
Expand Down
2 changes: 1 addition & 1 deletion api-specs/api/examples/subscriptions.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"total": 1,
"results": [
{
"id": "8062243c-46fc-40b5-88a4-75e2216aef75",
"id": "bf79c5d2-2813-4229-9a88-e7c76be50986",
"version": 1,
"destination": {
"type": "SQS",
Expand Down
27 changes: 27 additions & 0 deletions api-specs/api/examples/type-update-response.example.json
Original file line number Diff line number Diff line change
@@ -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"
}
12 changes: 7 additions & 5 deletions api-specs/api/examples/type-update.example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"version": 1,
"actions": [{
"action": "changeName",
"name": {
"en": "New Name"
"actions": [
{
"action": "changeName",
"name": {
"en": "New Name"
}
}
}]
]
}
4 changes: 2 additions & 2 deletions api-specs/api/resources/extensions.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'] }]
Expand Down Expand Up @@ -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}'] }]
Expand Down
Loading

0 comments on commit be68a5d

Please sign in to comment.