From dc9435dffc9d6de8a2f088d6dc9b5d95ed316cb6 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 15:50:04 -0300 Subject: [PATCH 01/42] Formatando o arquivo --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 1b34d9bcd..a178d6fe8 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -15,7 +15,7 @@ "description": "Name of the VTEX account. Used as part of the URL", "default": "apiexamples" }, - "environment": { + "environment": { "description": "Environment to use. Used as part of the URL.", "enum": [ "vtexcommercestable" From ea90f6de3ebcafc2b0a6de2ffb82293d23b39c53 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 15:51:21 -0300 Subject: [PATCH 02/42] =?UTF-8?q?Arrumando=20descri=C3=A7=C3=A3o=20de=20se?= =?UTF-8?q?rvers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index a178d6fe8..37c041d88 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -12,7 +12,7 @@ "description": "VTEX server URL.", "variables": { "accountName": { - "description": "Name of the VTEX account. Used as part of the URL", + "description": "Name of the VTEX account. Used as part of the URL.", "default": "apiexamples" }, "environment": { From 2a02ca02c04f287cbbbb009f4e5f3ca4e23be68f Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:10:20 -0300 Subject: [PATCH 03/42] Editar o `Get policy list` endpoint --- VTEX - Policies System API.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 37c041d88..f279af6fa 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -31,8 +31,8 @@ "tags": [ "Policy" ], - "summary": "Get Policy List", - "description": "Retrieves a list of all policies in the account and general information of each policy.", + "summary": "Get policy list", + "description": "Retrieves a list of all policies in the account and general information of each policy.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com\/docs\/guides\/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **List Policies** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_List", "parameters": [ { @@ -60,8 +60,7 @@ ], "responses": { "200": { - "description": "", - "headers": {}, + "description": "OK", "content": { "application/json": { "schema": { From c8f2326769a1471d56ffb829c5fad6442e17593a Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:14:05 -0300 Subject: [PATCH 04/42] =?UTF-8?q?Ajustando=20descri=C3=A7=C3=B5es=20dos=20?= =?UTF-8?q?request=20e=20response=20bodies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index f279af6fa..0b95d1ff7 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -745,16 +745,16 @@ "id": { "type": "string", "title": "id", - "description": "Policy ID" + "description": "Policy ID." }, "name": { "type": "string", - "description": "Policy Name", + "description": "Policy name.", "title": "name" }, "description": { "type": "string", - "description": "Policy description. This description is only for internal use of identification", + "description": "Policy description. This description is only for internal use of identification.", "title": "description" }, "statements": { @@ -763,7 +763,7 @@ "items": { "$ref": "#/components/schemas/StatementGetResponse" }, - "description": "Requirements to the Policy be applied" + "description": "Requirements to the policy be applied." } } }, @@ -776,7 +776,7 @@ "effect": { "type": "string", "title": "effect", - "description": "This field is not functional at the moment. To create a correct request, fill the field with `Allow`", + "description": "This field is not functional at the moment. To create a correct request, fill the field with `Allow`.", "default": "Allow" }, "actions": { @@ -786,20 +786,20 @@ "id": { "type": "string", "title": "id", - "description": "Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`" + "description": "Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`." }, "metadata": { "type": "object", "title": "metadata", - "description": "Data inside of the actions", + "description": "Data inside of the actions.", "additionalProperties": true } }, - "description": "Actions that the Policy will execute" + "description": "Actions that the policy will execute." }, "resource": { "type": "string", - "description": "Scope on which this policy must be evaluated", + "description": "Scope on which this policy must be evaluated.", "title": "resource" }, "condition": { @@ -807,13 +807,13 @@ "properties": { "conditions": { "type": "array", - "description": "List of conditions that will activate the policy", + "description": "List of conditions that will activate the policy.", "items": { "properties": { "conditions": { "title": "conditions", "type": "array", - "description": "These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`", + "description": "These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.", "items": { "type": "string" } @@ -821,32 +821,33 @@ "operation": { "type": "string", "title": "operation", - "description": "The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`" + "description": "The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." }, "key": { "type": "string", "title": "key", - "description": "The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`" + "description": "The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`." }, "values": { "type": "array", "title": "values", "items": { - "type": "string" + "type": "string", + "description": "Key value." }, - "description": "Value of the key" + "description": "Array with values of the key." } } } } }, - "description": "Condition to activate this policy. This object can have a maximum of ten recursive conditions", + "description": "Condition to activate this policy. This object can have a maximum of ten recursive conditions.", "title": "condition" }, "operation": { "type": "string", "title": "operation", - "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`" + "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." } } } From f2ea428aa329b74e049f05c50419263656b3cdc9 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:14:34 -0300 Subject: [PATCH 05/42] Ajustando `tags` --- VTEX - Policies System API.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 0b95d1ff7..76119e156 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -855,8 +855,7 @@ }, "tags": [ { - "name": "Policy", - "description": "" + "name": "Policy" } ] } \ No newline at end of file From f2d555c3b3b5d0ca79762e9d9a435566f53f1473 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:19:33 -0300 Subject: [PATCH 06/42] Adicionando headers no components --- VTEX - Policies System API.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 76119e156..534b26e5e 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -850,6 +850,30 @@ "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." } } + }, + "parameters": { + "Content-Type": { + "name": "Content-Type", + "in": "header", + "description": "Type of the content being sent.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "application/json" + } + }, + "Accept": { + "name": "Accept", + "in": "header", + "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "application/json" + } + } } } }, From 464b4d98ac56e3b029a94e8159b87ed51b6e37de Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:20:19 -0300 Subject: [PATCH 07/42] =?UTF-8?q?Adicionando=20informa=C3=A7=C3=B5es=20de?= =?UTF-8?q?=20autentica=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 95 +++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 534b26e5e..4d71dcf41 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -36,26 +36,10 @@ "operationId": "Policy_List", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" } ], "responses": { @@ -628,7 +612,16 @@ "deprecated": false } } - }, + }, + "security": [ + { + "appKey": [], + "appToken": [] + }, + { + "VtexIdclientAutCookie": [] + } + ], "components": { "schemas": { "PolicyActionGetResponse": { @@ -850,29 +843,49 @@ "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." } } + } + }, + "securitySchemes": { + "appKey": { + "type": "apiKey", + "in": "header", + "name": "X-VTEX-API-AppKey", + "description": "Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)." }, - "parameters": { - "Content-Type": { - "name": "Content-Type", - "in": "header", - "description": "Type of the content being sent.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "example": "application/json" - } - }, - "Accept": { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "example": "application/json" - } + "appToken": { + "type": "apiKey", + "in": "header", + "name": "X-VTEX-API-AppToken", + "description": "Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)." + }, + "VtexIdclientAutCookie": { + "type": "apiKey", + "in": "header", + "name": "VtexIdclientAutCookie", + "description": "[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours." + } + }, + "parameters": { + "Content-Type": { + "name": "Content-Type", + "in": "header", + "description": "Type of the content being sent.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "application/json" + } + }, + "Accept": { + "name": "Accept", + "in": "header", + "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "application/json" } } } From 2fe6531e5d4cf6687f2ce6b62d82770fc351b952 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:22:08 -0300 Subject: [PATCH 08/42] Adicionando $ref nos headers --- VTEX - Policies System API.json | 100 ++++---------------------------- 1 file changed, 10 insertions(+), 90 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 4d71dcf41..752f8de82 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -115,26 +115,10 @@ "operationId": "Policy_Evaluate", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" } ], "requestBody": { @@ -196,26 +180,10 @@ "operationId": "Policy_Get", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" }, { "name": "id", @@ -300,26 +268,10 @@ "operationId": "Policy_CreateOrUpdate", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" }, { "name": "id", @@ -456,26 +408,10 @@ "description": "Updates an existing policy at your account.", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" }, { "name": "id", @@ -572,26 +508,10 @@ "operationId": "Policy_Delete", "parameters": [ { - "name": "Content-Type", - "in": "header", - "description": "Describes the type of the content being sent", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Content-Type" }, { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } + "$ref": "#/components/parameters/Accept" }, { "name": "id", From 0becee8ad96075b784d970a0f6684bd6e2fe1a0b Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:24:59 -0300 Subject: [PATCH 09/42] Ajustando `Evaluate policies` endpoint --- VTEX - Policies System API.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 752f8de82..ea77aa833 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -32,7 +32,7 @@ "Policy" ], "summary": "Get policy list", - "description": "Retrieves a list of all policies in the account and general information of each policy.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com\/docs\/guides\/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **List Policies** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "description": "Retrieves a list of all policies in the account and general information of each policy.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **List Policies** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_List", "parameters": [ { @@ -110,8 +110,8 @@ "tags": [ "Policy" ], - "summary": "Evaluate Policies", - "description": "This endpoint consults all policies and checks the ones that satisfy the request body’s conditions.", + "summary": "Evaluate policies", + "description": "This endpoint consults all policies and checks the ones that satisfy the request body’s conditions.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Evaluate Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_Evaluate", "parameters": [ { @@ -569,14 +569,14 @@ "type": "object", "properties": { "resource": { - "description": "Scope on which this policy must be evaluated", + "description": "Scope on which this policy must be evaluated.", "title": "resource", "type": "string", "default": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert" }, "context": { "type": "object", - "description": "Conditions that the Policy needs to satisfy", + "description": "Conditions that the policy needs to satisfy.", "title": "context", "default": { "brandId": "2000001", From 1ec30d251b03e0a3a43870804ab8ba7bcfec2895 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 10 Nov 2023 16:25:52 -0300 Subject: [PATCH 10/42] Ajustando response body --- VTEX - Policies System API.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index ea77aa833..0c5ec5f47 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -141,8 +141,7 @@ }, "responses": { "200": { - "description": "", - "headers": {}, + "description": "OK", "content": { "application/json": { "schema": { @@ -550,12 +549,12 @@ "properties": { "id": { "type": "string", - "description": "Action ID", + "description": "Action ID.", "title": "id" }, "metadata": { "type": "object", - "description": "Metadata object from the current action", + "description": "Metadata object from the current action.", "title": "metadata", "additionalProperties": true } From 61974892f52aa2736bc0a042d3974ced5960f314 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 12:20:26 -0300 Subject: [PATCH 11/42] Atualizando Get Policy by ID --- VTEX - Policies System API.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 0c5ec5f47..e92c3a3da 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -175,7 +175,7 @@ "Policy" ], "summary": "Get Policy by ID", - "description": "Retrieves general information of a policy by its ID.", + "description": "Retrieves general information of a policy by its ID.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Get Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_Get", "parameters": [ { @@ -188,7 +188,7 @@ "name": "id", "in": "path", "required": true, - "description": "Policy ID", + "description": "Policy ID.", "schema": { "type": "string", "default": "pa_test_001" @@ -197,8 +197,7 @@ ], "responses": { "200": { - "description": "", - "headers": {}, + "description": "OK", "content": { "application/json": { "schema": { @@ -727,7 +726,8 @@ "type": "array", "description": "These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.", "items": { - "type": "string" + "type": "string", + "description": "Condition value." } }, "operation": { From b374b0c31be14c42070ddeb93057c2f24fb8d9b3 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 13:08:58 -0300 Subject: [PATCH 12/42] Atualizando Create policy --- VTEX - Policies System API.json | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index e92c3a3da..bc2016613 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -261,8 +261,8 @@ "tags": [ "Policy" ], - "summary": "Create Policy", - "description": "Creates a new policy from scratch.", + "summary": "Create policy", + "description": "Creates a new policy from scratch.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_CreateOrUpdate", "parameters": [ { @@ -275,7 +275,7 @@ "name": "id", "in": "path", "required": true, - "description": "Policy ID", + "description": "Policy ID.", "schema": { "type": "string", "default": "pa_test_001" @@ -337,8 +337,7 @@ }, "responses": { "200": { - "description": "", - "headers": {}, + "description": "OK", "content": { "application/octet-stream": { "schema": { @@ -402,8 +401,8 @@ "tags": [ "Policy" ], - "summary": "Update Policy", - "description": "Updates an existing policy at your account.", + "summary": "Update policy", + "description": "Updates an existing policy at your account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https:\/\/developers.vtex.com\/docs\/guides\/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https:\/\/help.vtex.com\/en\/tutorial\/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https:\/\/help.vtex.com\/en\/tutorial\/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https:\/\/developers.vtex.com\/docs\/guides\/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https:\/\/help.vtex.com\/en\/tutorial\/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "parameters": [ { "$ref": "#/components/parameters/Content-Type" @@ -415,7 +414,7 @@ "name": "id", "in": "path", "required": true, - "description": "Policy ID", + "description": "Policy ID.", "schema": { "type": "string", "default": "pa_test_001" @@ -435,8 +434,7 @@ }, "responses": { "200": { - "description": "", - "headers": {}, + "description": "OK", "content": { "application/octet-stream": { "schema": { @@ -631,12 +629,12 @@ "properties": { "name": { "type": "string", - "description": "Policy Name", + "description": "Policy name.", "title": "name" }, "description": { "type": "string", - "description": "Policy description. This description is only for internal use of identification", + "description": "Policy description. This description is only for internal use of identification.", "title": "description" }, "statements": { @@ -645,7 +643,7 @@ "items": { "$ref": "#/components/schemas/StatementGetResponse" }, - "description": "Requirements to the Policy be applied" + "description": "Requirements to the policy be applied." } } }, From 6e46980d49f4666722436550c7caf9a793406406 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 13:11:35 -0300 Subject: [PATCH 13/42] Atualizando Delete policy by ID --- VTEX - Policies System API.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index bc2016613..d1be6999b 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -402,7 +402,7 @@ "Policy" ], "summary": "Update policy", - "description": "Updates an existing policy at your account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https:\/\/developers.vtex.com\/docs\/guides\/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https:\/\/help.vtex.com\/en\/tutorial\/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https:\/\/help.vtex.com\/en\/tutorial\/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https:\/\/developers.vtex.com\/docs\/guides\/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https:\/\/help.vtex.com\/en\/tutorial\/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "description": "Updates an existing policy at your account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "parameters": [ { "$ref": "#/components/parameters/Content-Type" @@ -499,8 +499,8 @@ "tags": [ "Policy" ], - "summary": "Delete Policy by ID", - "description": "Deletes a specific policy of the account by its ID.", + "summary": "Delete policy by ID", + "description": "Deletes a specific policy of the account by its ID.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Delete Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_Delete", "parameters": [ { @@ -513,7 +513,7 @@ "name": "id", "in": "path", "required": true, - "description": "Policy ID", + "description": "Policy ID.", "schema": { "type": "string", "default": "pa_test_001" From bcdaa36862703ba205e03f788b1c0664ddf6d5be Mon Sep 17 00:00:00 2001 From: karenkrieger <> Date: Mon, 13 Nov 2023 16:18:02 +0000 Subject: [PATCH 14/42] Update generated files by portman --- .../VTEX - Policies System API.json | 227 ++++++++++++------ 1 file changed, 150 insertions(+), 77 deletions(-) diff --git a/PostmanCollections/VTEX - Policies System API.json b/PostmanCollections/VTEX - Policies System API.json index 308b87eb8..b2a5c5e2f 100644 --- a/PostmanCollections/VTEX - Policies System API.json +++ b/PostmanCollections/VTEX - Policies System API.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "fb7ef112-7e0e-4ce9-8310-b470a5960813" + "postman_id": "42a39f15-e639-40ce-b0f6-22cc620d91d8" }, "item": [ { - "id": "332b55cd-46fa-4430-9865-228dbb9d7635", + "id": "7b03805f-7786-4f0a-8f31-094f65bd4f40", "name": "Policy", "description": { "content": "", @@ -12,12 +12,12 @@ }, "item": [ { - "id": "c851c522-ff7c-42b3-ad9a-907cdde44330", - "name": "Get Policy List", + "id": "6797dd4d-0458-47c8-ae3f-a1a879089503", + "name": "Get policy list", "request": { - "name": "Get Policy List", + "name": "Get policy list", "description": { - "content": "Retrieves a list of all policies in the account and general information of each policy.", + "content": "Retrieves a list of all policies in the account and general information of each policy.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **List Policies** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -33,7 +33,7 @@ "variable": [ { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -64,7 +64,8 @@ "_": { "postman_previewlanguage": "json" }, - "id": "56aabd32-eb0a-4419-8d2a-7995758e4dd0", + "id": "a8f46bde-5fdb-4d82-89e1-cde5cd33aa26", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -79,7 +80,7 @@ "variable": [ { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -98,10 +99,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -110,7 +119,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -132,7 +141,7 @@ "value": "application/json" } ], - "body": "[\n {\n \"id\": \"in voluptate minim tempor\",\n \"name\": \"nulla dolor qui minim\",\n \"description\": \"ex voluptate\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"consectetur ut veniam consequat\",\n \"metadata\": {\n \"proident6\": \"ut\",\n \"laborea6f\": \"exercitation ut sed\",\n \"in_7c\": 95589938\n }\n },\n \"resource\": \"sed aute\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"eu officia ullamco laboris\",\n \"consequat sint Excepteur incididunt do\"\n ],\n \"operation\": \"reprehenderit cillum\",\n \"key\": \"occaecat labore\",\n \"values\": [\n \"aliqua\",\n \"in\"\n ]\n },\n {\n \"conditions\": [\n \"in cupidatat ea sed\",\n \"reprehenderit dolor velit Excepteur\"\n ],\n \"operation\": \"elit eu\",\n \"key\": \"laboris Duis minim\",\n \"values\": [\n \"esse ipsum\",\n \"ut officia esse et\"\n ]\n }\n ]\n },\n \"operation\": \"mollit aliquip incididunt nulla\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"in minim anim\",\n \"metadata\": {\n \"exercitation_a\": \"amet labore ullamco\",\n \"est_c25\": 90186105.44324231,\n \"ina5_\": \"occaecat\",\n \"fugiat_5\": \"anim dolore ad qui\"\n }\n },\n \"resource\": \"qui velit fugiat est ex\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"tempor\",\n \"exercitation ipsum commodo mollit\"\n ],\n \"operation\": \"nostrud in non\",\n \"key\": \"est aliqua enim \",\n \"values\": [\n \"veniam\",\n \"est amet labore tempor\"\n ]\n },\n {\n \"conditions\": [\n \"dolor culpa qui dolore esse\",\n \"ea\"\n ],\n \"operation\": \"est pariatur\",\n \"key\": \"reprehenderit\",\n \"values\": [\n \"proident\",\n \"occaecat id tempor enim do\"\n ]\n }\n ]\n },\n \"operation\": \"tempor veniam\"\n }\n ]\n },\n {\n \"id\": \"enim pariatur quis\",\n \"name\": \"consequat ex\",\n \"description\": \"quis elit minim\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"Ut in incididunt\",\n \"metadata\": {\n \"exercitation_5\": -24216323\n }\n },\n \"resource\": \"mollit ut\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"in Excepteur a\",\n \"cupida\"\n ],\n \"operation\": \"reprehenderit sed\",\n \"key\": \"amet pariatur\",\n \"values\": [\n \"non\",\n \"aliqua\"\n ]\n },\n {\n \"conditions\": [\n \"ut eiusmod pariatur\",\n \"aliqua in labore ut\"\n ],\n \"operation\": \"officia et mollit consectetur\",\n \"key\": \"dolor magna\",\n \"values\": [\n \"Lorem nostr\",\n \"officia qui\"\n ]\n }\n ]\n },\n \"operation\": \"nostrud\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"cillum eiusmod elit sint commodo\",\n \"metadata\": {\n \"mollit_2_\": true,\n \"veniam_7ff\": false\n }\n },\n \"resource\": \"ad nulla consequat\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"in commodo\",\n \"sint consequat adip\"\n ],\n \"operation\": \"aliqua occaecat\",\n \"key\": \"do consectetur ut esse\",\n \"values\": [\n \"irure non nulla cupidatat\",\n \"est magna laborum eiusmod\"\n ]\n },\n {\n \"conditions\": [\n \"nostrud sint\",\n \"nulla eiusmod reprehenderit\"\n ],\n \"operation\": \"ipsum \",\n \"key\": \"anim et in\",\n \"values\": [\n \"sit ullamco velit eu enim\",\n \"exercitation qui\"\n ]\n }\n ]\n },\n \"operation\": \"non sed incididunt\"\n }\n ]\n }\n]", + "body": "[\n {\n \"id\": \"dolore anim esse\",\n \"name\": \"eiusmod minim fugiat\",\n \"description\": \"dolor labore elit\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"aliquip eiusmod pariatur\",\n \"metadata\": {\n \"incididuntdc0\": -81578621.34381579\n }\n },\n \"resource\": \"amet adipisicing et officia qui\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"amet quis\",\n \"exercitation deserunt reprehenderit m\"\n ],\n \"operation\": \"dolore amet\",\n \"key\": \"Lorem\",\n \"values\": [\n \"non eiusmod mollit dolore\",\n \"nulla pariatur do fugiat aliquip\"\n ]\n },\n {\n \"conditions\": [\n \"ut incididunt id\",\n \"veniam\"\n ],\n \"operation\": \"dolore id\",\n \"key\": \"ut sint in amet incididunt\",\n \"values\": [\n \"voluptate proident cupidatat\",\n \"fugiat amet\"\n ]\n }\n ]\n },\n \"operation\": \"magna cillum commodo ex veniam\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"nulla laboris sunt\",\n \"metadata\": {\n \"ind\": -76948736,\n \"labore_8d2\": 87142601\n }\n },\n \"resource\": \"esse adipisicing do sint\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"sed occaecat irure\",\n \"est in aliqua\"\n ],\n \"operation\": \"dolore ut enim adipisicing\",\n \"key\": \"dolore reprehenderit consequat officia\",\n \"values\": [\n \"ad proident reprehenderit\",\n \"velit aliquip Lorem\"\n ]\n },\n {\n \"conditions\": [\n \"ea commodo\",\n \"ullamco qui minim\"\n ],\n \"operation\": \"ut dolore\",\n \"key\": \"ut eu Excepteur consequat\",\n \"values\": [\n \"nulla anim\",\n \"et\"\n ]\n }\n ]\n },\n \"operation\": \"in anim \"\n }\n ]\n },\n {\n \"id\": \"ut commodo Excepteur laborum aliqua\",\n \"name\": \"est commodo occaecat\",\n \"description\": \"nisi\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"mollit laborum\",\n \"metadata\": {\n \"labore3ec\": -1583295.9795844257,\n \"sit_1\": 32119513\n }\n },\n \"resource\": \"occaecat\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"incididunt ut dolor sunt cupidatat\",\n \"labore occaecat exercita\"\n ],\n \"operation\": \"magna consequat aliqua\",\n \"key\": \"ullamco et occaecat nulla in\",\n \"values\": [\n \"nostrud dolor qui\",\n \"elit enim nostrud\"\n ]\n },\n {\n \"conditions\": [\n \"adipisicing reprehenderit\",\n \"amet dolore Excepteur ad\"\n ],\n \"operation\": \"qui irure\",\n \"key\": \"sit\",\n \"values\": [\n \"quis in non\",\n \"adipisicing ullamco\"\n ]\n }\n ]\n },\n \"operation\": \"incididunt cillum tempor\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"exercitation commodo\",\n \"metadata\": {\n \"adipisicingb10\": true\n }\n },\n \"resource\": \"aute Lorem consequat\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"fugiat veniam sed voluptate et\",\n \"consequat qui\"\n ],\n \"operation\": \"amet et ipsum consequat\",\n \"key\": \"sint ad\",\n \"values\": [\n \"laborum\",\n \"enim eu sed\"\n ]\n },\n {\n \"conditions\": [\n \"nisi\",\n \"commodo dolore aliquip\"\n ],\n \"operation\": \"sunt\",\n \"key\": \"qui in\",\n \"values\": [\n \"incididunt nulla qui\",\n \"nisi\"\n ]\n }\n ]\n },\n \"operation\": \"fugiat sit occaecat est\"\n }\n ]\n }\n]", "cookie": [] } ], @@ -140,13 +149,13 @@ { "listen": "test", "script": { - "id": "d689df27-2527-4ee9-843d-951da3f4403d", + "id": "4c23bde1-c132-42fa-be1d-9b3b9cb23865", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/policy-engine/policies - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/policy-engine/policies - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/policy-engine/policies - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Policy ID\"},\"name\":{\"type\":\"string\",\"description\":\"Policy Name\",\"title\":\"name\"},\"description\":{\"type\":\"string\",\"description\":\"Policy description. This description is only for internal use of identification\",\"title\":\"description\"},\"statements\":{\"type\":\"array\",\"title\":\"statements\",\"items\":{\"type\":\"object\",\"required\":[\"effect\"],\"properties\":{\"effect\":{\"type\":\"string\",\"title\":\"effect\",\"description\":\"This field is not functional at the moment. To create a correct request, fill the field with `Allow`\",\"default\":\"Allow\"},\"actions\":{\"type\":\"object\",\"title\":\"actions\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`\"},\"metadata\":{\"type\":\"object\",\"title\":\"metadata\",\"description\":\"Data inside of the actions\",\"additionalProperties\":true}},\"description\":\"Actions that the Policy will execute\"},\"resource\":{\"type\":\"string\",\"description\":\"Scope on which this policy must be evaluated\",\"title\":\"resource\"},\"condition\":{\"type\":\"object\",\"properties\":{\"conditions\":{\"type\":\"array\",\"description\":\"List of conditions that will activate the policy\",\"items\":{\"properties\":{\"conditions\":{\"title\":\"conditions\",\"type\":\"array\",\"description\":\"These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`\",\"items\":{\"type\":\"string\"}},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`\"},\"key\":{\"type\":\"string\",\"title\":\"key\",\"description\":\"The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`\"},\"values\":{\"type\":\"array\",\"title\":\"values\",\"items\":{\"type\":\"string\"},\"description\":\"Value of the key\"}},\"type\":\"object\"}}},\"description\":\"Condition to activate this policy. This object can have a maximum of ten recursive conditions\",\"title\":\"condition\"},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`\"}}},\"description\":\"Requirements to the Policy be applied\"}}},\"example\":[{\"id\":\"pa_test_001\",\"name\":\"TestAlarmBerenice\",\"description\":\"TesteMarcosPromotionsAlert\",\"statements\":[{\"effect\":\"Allow\",\"actions\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}],\"resource\":\"vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert\",\"condition\":{\"conditions\":[{\"conditions\":[],\"operation\":\"stringEquals\",\"key\":\"brandId\",\"values\":[\"2000001\"]},{\"conditions\":[],\"operation\":\"numericGreaterThan\",\"key\":\"discountPercentage\",\"values\":[\"70.00\"]}],\"operation\":\"and\"}}]}]}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/policy-engine/policies - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Policy ID.\"},\"name\":{\"type\":\"string\",\"description\":\"Policy name.\",\"title\":\"name\"},\"description\":{\"type\":\"string\",\"description\":\"Policy description. This description is only for internal use of identification.\",\"title\":\"description\"},\"statements\":{\"type\":\"array\",\"title\":\"statements\",\"items\":{\"type\":\"object\",\"required\":[\"effect\"],\"properties\":{\"effect\":{\"type\":\"string\",\"title\":\"effect\",\"description\":\"This field is not functional at the moment. To create a correct request, fill the field with `Allow`.\",\"default\":\"Allow\"},\"actions\":{\"type\":\"object\",\"title\":\"actions\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`.\"},\"metadata\":{\"type\":\"object\",\"title\":\"metadata\",\"description\":\"Data inside of the actions.\",\"additionalProperties\":true}},\"description\":\"Actions that the policy will execute.\"},\"resource\":{\"type\":\"string\",\"description\":\"Scope on which this policy must be evaluated.\",\"title\":\"resource\"},\"condition\":{\"type\":\"object\",\"properties\":{\"conditions\":{\"type\":\"array\",\"description\":\"List of conditions that will activate the policy.\",\"items\":{\"properties\":{\"conditions\":{\"title\":\"conditions\",\"type\":\"array\",\"description\":\"These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.\",\"items\":{\"type\":\"string\",\"description\":\"Condition value.\"}},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`.\"},\"key\":{\"type\":\"string\",\"title\":\"key\",\"description\":\"The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`.\"},\"values\":{\"type\":\"array\",\"title\":\"values\",\"items\":{\"type\":\"string\",\"description\":\"Key value.\"},\"description\":\"Array with values of the key.\"}},\"type\":\"object\"}}},\"description\":\"Condition to activate this policy. This object can have a maximum of ten recursive conditions.\",\"title\":\"condition\"},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`.\"}}},\"description\":\"Requirements to the policy be applied.\"}}},\"example\":[{\"id\":\"pa_test_001\",\"name\":\"TestAlarmBerenice\",\"description\":\"TesteMarcosPromotionsAlert\",\"statements\":[{\"effect\":\"Allow\",\"actions\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}],\"resource\":\"vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert\",\"condition\":{\"conditions\":[{\"conditions\":[],\"operation\":\"stringEquals\",\"key\":\"brandId\",\"values\":[\"2000001\"]},{\"conditions\":[],\"operation\":\"numericGreaterThan\",\"key\":\"discountPercentage\",\"values\":[\"70.00\"]}],\"operation\":\"and\"}}]}]}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/policy-engine/policies - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -156,12 +165,12 @@ } }, { - "id": "b547c3f8-bee9-4d72-8d7b-268b86697edb", - "name": "Evaluate Policies", + "id": "9debf69f-359c-48fb-8b15-a4e8b91c525e", + "name": "Evaluate policies", "request": { - "name": "Evaluate Policies", + "name": "Evaluate policies", "description": { - "content": "This endpoint consults all policies and checks the ones that satisfy the request body’s conditions.", + "content": "This endpoint consults all policies and checks the ones that satisfy the request body’s conditions.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Evaluate Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -177,7 +186,7 @@ "variable": [ { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -221,7 +230,8 @@ "_": { "postman_previewlanguage": "json" }, - "id": "b4d6e880-e423-4f5e-85bc-c28cc8e6754f", + "id": "7460f7b4-f49c-4104-a229-a7941fbc1a2a", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -236,7 +246,7 @@ "variable": [ { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -255,10 +265,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -267,7 +285,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -305,13 +323,13 @@ { "listen": "test", "script": { - "id": "2daeefc4-3c56-4799-aee0-3d4ed94b784a", + "id": "a4e59fc5-abd8-46f3-bf5e-80eef7cb32bd", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/policy-engine/evaluate - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/policy-engine/evaluate - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/policy-engine/evaluate - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyActionGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Action ID\",\"title\":\"id\"},\"metadata\":{\"type\":\"object\",\"description\":\"Metadata object from the current action\",\"title\":\"metadata\",\"additionalProperties\":true}}},\"example\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}]}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/policy-engine/evaluate - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyActionGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Action ID.\",\"title\":\"id\"},\"metadata\":{\"type\":\"object\",\"description\":\"Metadata object from the current action.\",\"title\":\"metadata\",\"additionalProperties\":true}}},\"example\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}]}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/policy-engine/evaluate - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -321,12 +339,12 @@ } }, { - "id": "bbeafd09-9167-439a-a67c-5c618114e504", + "id": "6a090fb4-c83f-43da-844f-c693124ce23d", "name": "Get Policy by ID", "request": { "name": "Get Policy by ID", "description": { - "content": "Retrieves general information of a policy by its ID.", + "content": "Retrieves general information of a policy by its ID.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Get Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -344,7 +362,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -353,7 +371,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -384,7 +402,8 @@ "_": { "postman_previewlanguage": "json" }, - "id": "9146850f-d5d5-41e0-9319-5db41b3031ac", + "id": "8c4a7717-3663-4294-875f-6323710f7725", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -401,7 +420,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -410,7 +429,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -429,10 +448,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -441,7 +468,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -463,7 +490,7 @@ "value": "application/json" } ], - "body": "[\n {\n \"id\": \"dolor minim\",\n \"name\": \"quis mollit nulla\",\n \"description\": \"quis sit\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"sed laboris consectetur officia\",\n \"metadata\": {\n \"exercitation_6\": \"culpa\",\n \"deserunta67\": 26928806.219061226,\n \"aliquipd57\": \"sint\"\n }\n },\n \"resource\": \"aliquip qui id\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"aute ad\",\n \"aliquip minim aliqua\"\n ],\n \"operation\": \"occaecat in do nostrud\",\n \"key\": \"voluptate occaecat enim\",\n \"values\": [\n \"magna ea officia proident sed\",\n \"pariatur\"\n ]\n },\n {\n \"conditions\": [\n \"fugiat ame\",\n \"id\"\n ],\n \"operation\": \"consequat do ut\",\n \"key\": \"exercitation fugiat\",\n \"values\": [\n \"cupidatat sint non ipsum\",\n \"elit quis et\"\n ]\n }\n ]\n },\n \"operation\": \"aute consequat sed sunt voluptate\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"lab\",\n \"metadata\": {\n \"fugiat_4\": \"veniam adipisicing\"\n }\n },\n \"resource\": \"amet exercitation occaecat\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"dolore mollit minim laboris elit\",\n \"aliqua tempor\"\n ],\n \"operation\": \"est magna voluptate\",\n \"key\": \"sint\",\n \"values\": [\n \"in et veniam\",\n \"anim eiusmod ut aliqua\"\n ]\n },\n {\n \"conditions\": [\n \"incididunt culpa mollit\",\n \"mollit\"\n ],\n \"operation\": \"sit\",\n \"key\": \"Duis commodo est amet\",\n \"values\": [\n \"ullamco labore nostrud\",\n \"in exercitation laboris reprehenderit cupidatat\"\n ]\n }\n ]\n },\n \"operation\": \"est mollit Excepteur ipsum\"\n }\n ]\n },\n {\n \"id\": \"commodo sunt anim in\",\n \"name\": \"amet dolore laboris ullamco\",\n \"description\": \"mollit commodo non in do\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"eiusmod consectetur sed\",\n \"metadata\": {\n \"mollit_88\": false,\n \"elitb9f\": 59658089\n }\n },\n \"resource\": \"officia magna dolore anim\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"veniam\",\n \"Lorem ipsum velit\"\n ],\n \"operation\": \"voluptate iru\",\n \"key\": \"eiusmod laboris\",\n \"values\": [\n \"dolor minim\",\n \"et consequat quis\"\n ]\n },\n {\n \"conditions\": [\n \"occaecat esse\",\n \"ad elit cillum quis\"\n ],\n \"operation\": \"esse labore aute laboris\",\n \"key\": \"consequat magna Duis\",\n \"values\": [\n \"et officia tempor Ut\",\n \"sunt\"\n ]\n }\n ]\n },\n \"operation\": \"enim Excepteur occaecat aliquip deserunt\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"eiusmod nulla minim Ut\",\n \"metadata\": {\n \"laborum1\": \"tempor\"\n }\n },\n \"resource\": \"ullamco minim\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"sed\",\n \"Lorem occ\"\n ],\n \"operation\": \"consectetur labore et pariatur aliqua\",\n \"key\": \"laborum veniam\",\n \"values\": [\n \"elit officia magna\",\n \"eiusmod do\"\n ]\n },\n {\n \"conditions\": [\n \"dolor irure occaecat cillum nisi\",\n \"incididunt nisi ullamco\"\n ],\n \"operation\": \"ut\",\n \"key\": \"sit esse\",\n \"values\": [\n \"dolor commodo ut consequat\",\n \"eu\"\n ]\n }\n ]\n },\n \"operation\": \"amet qui dolor nostrud\"\n }\n ]\n }\n]", + "body": "[\n {\n \"id\": \"cillum Ut consectetur in molli\",\n \"name\": \"dolore anim ullamco\",\n \"description\": \"sint non nulla\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"quis\",\n \"metadata\": {\n \"utbf\": false,\n \"est_89\": \"dolor irure\"\n }\n },\n \"resource\": \"ea dolore sit\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"qui irure\",\n \"in laboris\"\n ],\n \"operation\": \"eiusmod amet consectetur reprehenderit\",\n \"key\": \"Lorem cons\",\n \"values\": [\n \"et enim nisi\",\n \"non veli\"\n ]\n },\n {\n \"conditions\": [\n \"anim irure do\",\n \"mollit sed proident\"\n ],\n \"operation\": \"non sunt ipsum veniam\",\n \"key\": \"mollit qui sint consequat officia\",\n \"values\": [\n \"dolor et sint labore\",\n \"nulla enim\"\n ]\n }\n ]\n },\n \"operation\": \"dolore voluptate incididunt\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"reprehenderit enim laboris dolore\",\n \"metadata\": {\n \"ex5_\": \"nisi irure fugiat\"\n }\n },\n \"resource\": \"consequat Excepteur dolore\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"mollit\",\n \"aliquip\"\n ],\n \"operation\": \"adipisicing Excepteur\",\n \"key\": \"sint\",\n \"values\": [\n \"dolore deserunt ut do\",\n \"reprehenderit dolor\"\n ]\n },\n {\n \"conditions\": [\n \"dolor mollit reprehenderit\",\n \"esse dolore adipisicing do\"\n ],\n \"operation\": \"tempor elit Ut anim exercitation\",\n \"key\": \"sit laboris in\",\n \"values\": [\n \"ut tempor magna nulla dolor\",\n \"mollit ad\"\n ]\n }\n ]\n },\n \"operation\": \"anim exercitation ad\"\n }\n ]\n },\n {\n \"id\": \"dolore cupidatat fug\",\n \"name\": \"null\",\n \"description\": \"do sit nostrud\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"magna est velit\",\n \"metadata\": {\n \"minim_0f6\": true\n }\n },\n \"resource\": \"nulla\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"in aute pariatur velit est\",\n \"fugiat Excepteur sunt\"\n ],\n \"operation\": \"Excepteur nisi amet\",\n \"key\": \"eiusmod dolore dolore eu\",\n \"values\": [\n \"enim non sint\",\n \"dolore id nostrud Ut\"\n ]\n },\n {\n \"conditions\": [\n \"enim adipisicing elit anim\",\n \"do ut\"\n ],\n \"operation\": \"ipsum Ut\",\n \"key\": \"elit in sed\",\n \"values\": [\n \"dolor id dolore anim\",\n \"fugiat Excepteur proident nostrud\"\n ]\n }\n ]\n },\n \"operation\": \"adipisicing in\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"sunt adipisicing eu commodo elit\",\n \"metadata\": {\n \"do_de7\": -34116207.224848606,\n \"dolore9d6\": -54270820,\n \"deseruntfc\": -46203529\n }\n },\n \"resource\": \"esse sunt sit aliquip\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"fugiat aute\",\n \"ut sit\"\n ],\n \"operation\": \"tempor E\",\n \"key\": \"sunt adipisicing ea\",\n \"values\": [\n \"veniam quis ipsum ullamco\",\n \"Ut ipsum\"\n ]\n },\n {\n \"conditions\": [\n \"lab\",\n \"dolore minim\"\n ],\n \"operation\": \"cillum amet\",\n \"key\": \"dolor dolor labore veniam eu\",\n \"values\": [\n \"et\",\n \"elit mollit laboris exercitation c\"\n ]\n }\n ]\n },\n \"operation\": \"labore ea eiusmod\"\n }\n ]\n }\n]", "cookie": [] } ], @@ -471,13 +498,13 @@ { "listen": "test", "script": { - "id": "748c3e8e-4ef4-49d7-91c1-d1238071980a", + "id": "5bf750cd-3650-42e0-a9ae-af1014b69c35", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/policy-engine/policies/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/policy-engine/policies/:id - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[GET]::/api/policy-engine/policies/:id - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Policy ID\"},\"name\":{\"type\":\"string\",\"description\":\"Policy Name\",\"title\":\"name\"},\"description\":{\"type\":\"string\",\"description\":\"Policy description. This description is only for internal use of identification\",\"title\":\"description\"},\"statements\":{\"type\":\"array\",\"title\":\"statements\",\"items\":{\"type\":\"object\",\"required\":[\"effect\"],\"properties\":{\"effect\":{\"type\":\"string\",\"title\":\"effect\",\"description\":\"This field is not functional at the moment. To create a correct request, fill the field with `Allow`\",\"default\":\"Allow\"},\"actions\":{\"type\":\"object\",\"title\":\"actions\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`\"},\"metadata\":{\"type\":\"object\",\"title\":\"metadata\",\"description\":\"Data inside of the actions\",\"additionalProperties\":true}},\"description\":\"Actions that the Policy will execute\"},\"resource\":{\"type\":\"string\",\"description\":\"Scope on which this policy must be evaluated\",\"title\":\"resource\"},\"condition\":{\"type\":\"object\",\"properties\":{\"conditions\":{\"type\":\"array\",\"description\":\"List of conditions that will activate the policy\",\"items\":{\"properties\":{\"conditions\":{\"title\":\"conditions\",\"type\":\"array\",\"description\":\"These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`\",\"items\":{\"type\":\"string\"}},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`\"},\"key\":{\"type\":\"string\",\"title\":\"key\",\"description\":\"The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`\"},\"values\":{\"type\":\"array\",\"title\":\"values\",\"items\":{\"type\":\"string\"},\"description\":\"Value of the key\"}},\"type\":\"object\"}}},\"description\":\"Condition to activate this policy. This object can have a maximum of ten recursive conditions\",\"title\":\"condition\"},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`\"}}},\"description\":\"Requirements to the Policy be applied\"}}},\"example\":[{\"id\":\"pa_test_001\",\"name\":\"TestAlarmBerenice\",\"description\":\"TesteMarcosPromotionsAlert\",\"statements\":[{\"effect\":\"Allow\",\"actions\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}],\"resource\":\"vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert\",\"condition\":{\"conditions\":[{\"conditions\":[],\"operation\":\"stringEquals\",\"key\":\"brandId\",\"values\":[\"2000001\"]},{\"conditions\":[],\"operation\":\"numericGreaterThan\",\"key\":\"discountPercentage\",\"values\":[\"70.00\"]}],\"operation\":\"and\"}}]}]}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/policy-engine/policies/:id - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"title\":\"PolicyGetResponse\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Policy ID.\"},\"name\":{\"type\":\"string\",\"description\":\"Policy name.\",\"title\":\"name\"},\"description\":{\"type\":\"string\",\"description\":\"Policy description. This description is only for internal use of identification.\",\"title\":\"description\"},\"statements\":{\"type\":\"array\",\"title\":\"statements\",\"items\":{\"type\":\"object\",\"required\":[\"effect\"],\"properties\":{\"effect\":{\"type\":\"string\",\"title\":\"effect\",\"description\":\"This field is not functional at the moment. To create a correct request, fill the field with `Allow`.\",\"default\":\"Allow\"},\"actions\":{\"type\":\"object\",\"title\":\"actions\",\"properties\":{\"id\":{\"type\":\"string\",\"title\":\"id\",\"description\":\"Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`.\"},\"metadata\":{\"type\":\"object\",\"title\":\"metadata\",\"description\":\"Data inside of the actions.\",\"additionalProperties\":true}},\"description\":\"Actions that the policy will execute.\"},\"resource\":{\"type\":\"string\",\"description\":\"Scope on which this policy must be evaluated.\",\"title\":\"resource\"},\"condition\":{\"type\":\"object\",\"properties\":{\"conditions\":{\"type\":\"array\",\"description\":\"List of conditions that will activate the policy.\",\"items\":{\"properties\":{\"conditions\":{\"title\":\"conditions\",\"type\":\"array\",\"description\":\"These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.\",\"items\":{\"type\":\"string\",\"description\":\"Condition value.\"}},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`.\"},\"key\":{\"type\":\"string\",\"title\":\"key\",\"description\":\"The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`.\"},\"values\":{\"type\":\"array\",\"title\":\"values\",\"items\":{\"type\":\"string\",\"description\":\"Key value.\"},\"description\":\"Array with values of the key.\"}},\"type\":\"object\"}}},\"description\":\"Condition to activate this policy. This object can have a maximum of ten recursive conditions.\",\"title\":\"condition\"},\"operation\":{\"type\":\"string\",\"title\":\"operation\",\"description\":\"This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`.\"}}},\"description\":\"Requirements to the policy be applied.\"}}},\"example\":[{\"id\":\"pa_test_001\",\"name\":\"TestAlarmBerenice\",\"description\":\"TesteMarcosPromotionsAlert\",\"statements\":[{\"effect\":\"Allow\",\"actions\":[{\"id\":\"SendSlackMessage\",\"metadata\":{\"channel\":\"C01NJFF35R6\",\"relatedUsers\":[\"URUNDC2NB\"],\"alertDescription\":\"Avoid selling products from Berenice with a discount greater than 70%.\"}}],\"resource\":\"vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert\",\"condition\":{\"conditions\":[{\"conditions\":[],\"operation\":\"stringEquals\",\"key\":\"brandId\",\"values\":[\"2000001\"]},{\"conditions\":[],\"operation\":\"numericGreaterThan\",\"key\":\"discountPercentage\",\"values\":[\"70.00\"]}],\"operation\":\"and\"}}]}]}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/policy-engine/policies/:id - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -487,12 +514,12 @@ } }, { - "id": "a578a862-c3f0-4519-8c07-266dbd603c49", - "name": "Create Policy", + "id": "06300da5-bc66-4e1a-bbae-75d1d476e023", + "name": "Create policy", "request": { - "name": "Create Policy", + "name": "Create policy", "description": { - "content": "Creates a new policy from scratch.", + "content": "Creates a new policy from scratch.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -510,7 +537,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -519,7 +546,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -563,7 +590,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "d1d332c2-e9d7-4e60-817b-5de8d834b9c6", + "id": "6c993e19-c937-4bb3-9314-24b456afe9fd", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -580,7 +608,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -589,7 +617,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -608,10 +636,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -620,7 +656,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -658,7 +694,7 @@ { "listen": "test", "script": { - "id": "dac8c3d7-2514-4da8-aab4-bfaaf486b345", + "id": "4d15c4b4-1180-4ef7-a781-16d20ff16112", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/policy-engine/policies/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -672,12 +708,12 @@ } }, { - "id": "c61daa48-e726-4434-87b3-9f982cca9588", - "name": "Update Policy", + "id": "94867265-cf64-47d1-acf0-cdaa089a95c8", + "name": "Update policy", "request": { - "name": "Update Policy", + "name": "Update policy", "description": { - "content": "Updates an existing policy at your account.", + "content": "Updates an existing policy at your account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Create or Update Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -695,7 +731,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -704,7 +740,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -735,7 +771,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"name\": \"irure consectetur occaecat deserunt\",\n \"description\": \"Duis veniam\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"sunt in ex proident culpa\",\n \"metadata\": {\n \"Ut08b\": 70911864,\n \"dolorecb\": \"Ut ex minim sit\"\n }\n },\n \"resource\": \"in\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"velit irure elit\",\n \"laborum proident\"\n ],\n \"operation\": \"magna esse est\",\n \"key\": \"nost\",\n \"values\": [\n \"laborum do\",\n \"consequat id\"\n ]\n },\n {\n \"conditions\": [\n \"elit et consequat\",\n \"incididunt velit eu sit\"\n ],\n \"operation\": \"est ex adipisicing voluptate fugiat\",\n \"key\": \"adipisicing commodo do\",\n \"values\": [\n \"fugiat voluptate\",\n \"occaecat id la\"\n ]\n }\n ]\n },\n \"operation\": \"incididunt amet qui\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"laboris est\",\n \"metadata\": {\n \"inc2\": true,\n \"nullaff6\": -64842654\n }\n },\n \"resource\": \"mollit ut\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"occaecat eiusmod\",\n \"consectetur\"\n ],\n \"operation\": \"et in Excepteur dolor tempor\",\n \"key\": \"nulla consequat velit ullamco\",\n \"values\": [\n \"nisi Ut in minim\",\n \"veniam sit minim\"\n ]\n },\n {\n \"conditions\": [\n \"officia ex\",\n \"sed\"\n ],\n \"operation\": \"Lorem ad sit ex\",\n \"key\": \"nisi laborum tempor\",\n \"values\": [\n \"qui veniam aute deserunt ullamco\",\n \"dolor Excepteur\"\n ]\n }\n ]\n },\n \"operation\": \"dolore ess\"\n }\n ]\n}", + "raw": "{\n \"name\": \"in in\",\n \"description\": \"nulla velit\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"aliquip Lorem\",\n \"metadata\": {\n \"proident_6\": 11091776.482166886\n }\n },\n \"resource\": \"in\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"c\",\n \"Excepteur elit exercitation\"\n ],\n \"operation\": \"est ullamco pariatur ut aliquip\",\n \"key\": \"dolore\",\n \"values\": [\n \"proident magna id\",\n \"sint quis\"\n ]\n },\n {\n \"conditions\": [\n \"est\",\n \"ipsum pariatur Lorem non\"\n ],\n \"operation\": \"ipsum sit ut\",\n \"key\": \"dolor laborum\",\n \"values\": [\n \"magna enim nisi amet\",\n \"anim Duis nisi\"\n ]\n }\n ]\n },\n \"operation\": \"officia proident dolor Ut\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"enim sed nostrud\",\n \"metadata\": {\n \"cillum_1\": -13452147.938797817\n }\n },\n \"resource\": \"velit\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"ipsum dolor anim\",\n \"sed nostrud aute aliquip\"\n ],\n \"operation\": \"elit nulla mollit\",\n \"key\": \"Duis in\",\n \"values\": [\n \"ut eu do fugiat\",\n \"esse dolore aliquip\"\n ]\n },\n {\n \"conditions\": [\n \"magna mollit dolore labore nisi\",\n \"laborum fugiat eiusmod sed mollit\"\n ],\n \"operation\": \"nisi aute fugiat\",\n \"key\": \"anim\",\n \"values\": [\n \"tempor sit deserunt commodo\",\n \"ut exercitation tempor laboris\"\n ]\n }\n ]\n },\n \"operation\": \"aliqua Duis\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -748,7 +784,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "75054664-b60f-439f-bdd1-67da461a78aa", + "id": "64084517-32dd-43b1-80c6-50b6637f3542", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -765,7 +802,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -774,7 +811,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -793,10 +830,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -805,7 +850,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -819,7 +864,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"name\": \"Excepteur laboris\",\n \"description\": \"aute sint ex\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"ut\",\n \"metadata\": {\n \"culpa_f\": -42642767\n }\n },\n \"resource\": \"velit eu\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"Excepteur dolore occaecat sit\",\n \"culpa quis incididunt et\"\n ],\n \"operation\": \"sed aliqua \",\n \"key\": \"eiusmod aliqua aliquip\",\n \"values\": [\n \"ea incididunt veniam consequat mollit\",\n \"aliqua tempor\"\n ]\n },\n {\n \"conditions\": [\n \"quis labore\",\n \"officia nostrud enim\"\n ],\n \"operation\": \"nostrud\",\n \"key\": \"esse eu\",\n \"values\": [\n \"est Duis cillum culpa\",\n \"ullamco e\"\n ]\n }\n ]\n },\n \"operation\": \"ea deserunt ipsum ad\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"Excepteur labore irure adipisicing\",\n \"metadata\": {\n \"elit70f\": \"voluptate velit qui\",\n \"labore_145\": -83508551.56242791\n }\n },\n \"resource\": \"ut esse pariatur est\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"id culpa sint ullamco minim\",\n \"cillum ve\"\n ],\n \"operation\": \"sed ut cillum in\",\n \"key\": \"ullamco\",\n \"values\": [\n \"dolore ea amet irure\",\n \"Dui\"\n ]\n },\n {\n \"conditions\": [\n \"qui dolor magna\",\n \"cupidatat proident i\"\n ],\n \"operation\": \"enim dolore ipsum irure Duis\",\n \"key\": \"Duis\",\n \"values\": [\n \"nisi in id\",\n \"qui ea est Excepteur\"\n ]\n }\n ]\n },\n \"operation\": \"laboris dolor magna\"\n }\n ]\n}", + "raw": "{\n \"name\": \"proident a\",\n \"description\": \"culpa\",\n \"statements\": [\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"ad veniam aliqua sit\",\n \"metadata\": {\n \"tempor5\": 18605235.422079816\n }\n },\n \"resource\": \"aliquip laboris\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"officia nisi veniam Ut\",\n \"aute commodo sed amet\"\n ],\n \"operation\": \"veniam Duis\",\n \"key\": \"commodo magna\",\n \"values\": [\n \"sed in\",\n \"veniam cillum adipisicing\"\n ]\n },\n {\n \"conditions\": [\n \"cillum enim\",\n \"amet laboris\"\n ],\n \"operation\": \"deserunt in commodo\",\n \"key\": \"Excepteur fugiat non sint enim\",\n \"values\": [\n \"laboris anim\",\n \"veniam\"\n ]\n }\n ]\n },\n \"operation\": \"tempor\"\n },\n {\n \"effect\": \"Allow\",\n \"actions\": {\n \"id\": \"cupidatat ullamco\",\n \"metadata\": {\n \"ullamco9__\": \"occaecat nisi sit Excepteur\",\n \"nulla8\": 40381254.92650062\n }\n },\n \"resource\": \"consectetur in nisi\",\n \"condition\": {\n \"conditions\": [\n {\n \"conditions\": [\n \"anim Duis commodo ma\",\n \"cul\"\n ],\n \"operation\": \"Ut non consectetur\",\n \"key\": \"dolor nulla elit in irure\",\n \"values\": [\n \"reprehenderit magna\",\n \"proident\"\n ]\n },\n {\n \"conditions\": [\n \"velit cupidatat est esse\",\n \"elit ea\"\n ],\n \"operation\": \"adipisicing\",\n \"key\": \"esse in incididunt aliqua\",\n \"values\": [\n \"labore in laboris\",\n \"Lorem ut\"\n ]\n }\n ]\n },\n \"operation\": \"nulla velit nisi\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -843,7 +888,7 @@ { "listen": "test", "script": { - "id": "46e3cf3f-aaad-4724-850d-c61c345f4255", + "id": "92f0ef62-39aa-4649-a1a6-d00214e7454d", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/policy-engine/policies/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -857,12 +902,12 @@ } }, { - "id": "00add935-e883-4e39-8b70-7c20e657c387", - "name": "Delete Policy by ID", + "id": "be3c48d3-dc82-40b5-9a30-9b63cab7f2d2", + "name": "Delete policy by ID", "request": { - "name": "Delete Policy by ID", + "name": "Delete policy by ID", "description": { - "content": "Deletes a specific policy of the account by its ID.", + "content": "Deletes a specific policy of the account by its ID.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Delete Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -880,7 +925,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -889,7 +934,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -914,7 +959,7 @@ "_": { "postman_previewlanguage": "text" }, - "id": "52b22744-aff0-4070-aa34-9c5a8ce8359c", + "id": "b5464f90-a0f5-4460-aca1-a6f09de3aa06", "name": "200 OK", "originalRequest": { "url": { @@ -932,7 +977,7 @@ { "disabled": false, "description": { - "content": "(Required) Policy ID", + "content": "(Required) Policy ID.", "type": "text/plain" }, "type": "any", @@ -941,7 +986,7 @@ }, { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -960,10 +1005,18 @@ ] }, "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" + }, { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -972,7 +1025,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand ", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -998,7 +1051,7 @@ { "listen": "test", "script": { - "id": "fae6b9a0-50ed-48f9-947d-1e0568a57a1b", + "id": "1e49b968-13f6-45c2-bd0a-2040c8243fe8", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/policy-engine/policies/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -1014,11 +1067,31 @@ "event": [] } ], + "auth": { + "type": "apikey", + "apikey": [ + { + "type": "any", + "value": "X-VTEX-API-AppKey", + "key": "key" + }, + { + "type": "any", + "value": "{{apiKey}}", + "key": "value" + }, + { + "type": "any", + "value": "header", + "key": "in" + } + ] + }, "event": [], "variable": [ { "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -1041,7 +1114,7 @@ } ], "info": { - "_postman_id": "fb7ef112-7e0e-4ce9-8310-b470a5960813", + "_postman_id": "42a39f15-e639-40ce-b0f6-22cc620d91d8", "name": "Policies System API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { From e1272d1d7604e3a74b6302a230040d9fd9661b95 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:19:58 -0300 Subject: [PATCH 15/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index d1be6999b..34a8853c4 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -174,7 +174,7 @@ "tags": [ "Policy" ], - "summary": "Get Policy by ID", + "summary": "Get policy by ID", "description": "Retrieves general information of a policy by its ID.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Promotions Policy Engine | Policies | **Get Policy** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "Policy_Get", "parameters": [ From f6d882dbc88e68dd93f5dfe3c50eead6ae2a0086 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:05 -0300 Subject: [PATCH 16/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 34a8853c4..d0c9504f8 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -278,7 +278,7 @@ "description": "Policy ID.", "schema": { "type": "string", - "default": "pa_test_001" + "example": "pa_test_001" } } ], From 4eb6467d27fcfe97c7daad2dfda9995e238785ef Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:11 -0300 Subject: [PATCH 17/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index d0c9504f8..5b91e2bcd 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -191,7 +191,7 @@ "description": "Policy ID.", "schema": { "type": "string", - "default": "pa_test_001" + "example": "pa_test_001" } } ], From 818f0028b5aca44a7f9e973354edc9e38290eec4 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:18 -0300 Subject: [PATCH 18/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 5b91e2bcd..8fae6e643 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -417,7 +417,7 @@ "description": "Policy ID.", "schema": { "type": "string", - "default": "pa_test_001" + "example": "pa_test_001" } } ], From 0c86289a6dc47c73c4f7c0c4352d0d349816c016 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:24 -0300 Subject: [PATCH 19/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 8fae6e643..d2b00a075 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -516,7 +516,7 @@ "description": "Policy ID.", "schema": { "type": "string", - "default": "pa_test_001" + "example": "pa_test_001" } } ], From 473c339eb66afcb93b2f93bb76be652b0313a0b6 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:44 -0300 Subject: [PATCH 20/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index d2b00a075..2eb7d485d 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -634,7 +634,7 @@ }, "description": { "type": "string", - "description": "Policy description. This description is only for internal use of identification.", + "description": "Policy description, only for internal use.", "title": "description" }, "statements": { From 0373637bf5e45b5ebe5c59f5a21849e824c6515e Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:20:51 -0300 Subject: [PATCH 21/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 2eb7d485d..d65c29296 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -722,7 +722,7 @@ "conditions": { "title": "conditions", "type": "array", - "description": "These are the conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.", + "description": "List of conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.", "items": { "type": "string", "description": "Condition value." From ad436cf204ce1b1acffe134d3ca04d6ddf37bb82 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:21:07 -0300 Subject: [PATCH 22/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index d65c29296..9771c2406 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -643,7 +643,7 @@ "items": { "$ref": "#/components/schemas/StatementGetResponse" }, - "description": "Requirements to the policy be applied." + "description": "Requirements for the the policy to be applied." } } }, From 8e380bba95a5be51c2306e807fbff0d1a70d3e95 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:21:18 -0300 Subject: [PATCH 23/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 9771c2406..60fb4a331 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -663,7 +663,7 @@ }, "description": { "type": "string", - "description": "Policy description. This description is only for internal use of identification.", + "description": "Policy description, only for internal use.", "title": "description" }, "statements": { From e26857a13660bfc60de09d79e2f93c9a1a31052e Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:21:31 -0300 Subject: [PATCH 24/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 60fb4a331..b2acc635f 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -672,7 +672,7 @@ "items": { "$ref": "#/components/schemas/StatementGetResponse" }, - "description": "Requirements to the policy be applied." + "description": "Requirements for the policy to be applied." } } }, From c75cc8967467b3b4b3aceeabd7a41985e4f4b864 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 14:21:43 -0300 Subject: [PATCH 25/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index b2acc635f..7b1d9180c 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -686,7 +686,8 @@ "type": "string", "title": "effect", "description": "This field is not functional at the moment. To create a correct request, fill the field with `Allow`.", - "default": "Allow" + "default": "Allow", + "deprecated": true }, "actions": { "type": "array", From 5d1c422f1939117d5d8cde679d71eb4137ffbd10 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 15:05:52 -0300 Subject: [PATCH 26/42] =?UTF-8?q?Corre=C3=A7=C3=A3o=20da=20revis=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 59 ++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 7b1d9180c..f50175042 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -696,7 +696,12 @@ "id": { "type": "string", "title": "id", - "description": "Action ID. The possible values can be `SendSlackMessage`, `SendEmail`, and `DeactivatePromotions`." + "description": "Action ID.", + "enum": [ + "SendSlackMessage", + "SendEmail", + "DeactivatePromotions" + ] }, "metadata": { "type": "object", @@ -723,7 +728,12 @@ "conditions": { "title": "conditions", "type": "array", - "description": "List of conditions the actions can have. The possible values are `[]`, `stringEquals`, and `numericGreaterThan`.", + "description": "List of conditions the actions can have.", + "enum": [ + [], + "stringEquals", + "numericGreaterThan" + ], "items": { "type": "string", "description": "Condition value." @@ -732,12 +742,34 @@ "operation": { "type": "string", "title": "operation", - "description": "The action of the condition. This operation possible values are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." + "description": "The action of the condition.", + "enum": [ + "None", + "stringEquals", + "stringEqualsIgnoreCase", + "numericEquals", + "numericLessThan", + "numericLessThanEquals", + "numericGreaterThan", + "numericGreaterThanEquals", + "bool", + "not", + "or", + "and", + "dateTimeUtcGreaterThan", + "dateTimeUtcLessThan", + "between" + ] }, "key": { "type": "string", "title": "key", - "description": "The element that will define what the policy will influence. This field has the possible values `skuId`, `brandId`, `discountPercentage`." + "description": "The element that will define what the policy will influence.", + "enum": [ + "skuId", + "brandId", + "discountPercentage" + ] }, "values": { "type": "array", @@ -758,7 +790,24 @@ "operation": { "type": "string", "title": "operation", - "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty. The possible values to these fields are `None`, `stringEquals`, `stringEqualsIgnoreCase`, `numericEquals`, `numericLessThan`, `numericLessThanEquals`, `numericGreaterThan`, `numericGreaterThanEquals`, `bool`, `not`, `or`, `and`, `dateTimeUtcGreaterThan`, `dateTimeUtcLessThan`, and `between`." + "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty.", + "enum": [ + "None", + "stringEquals", + "stringEqualsIgnoreCase", + "numericEquals", + "numericLessThan", + "numericLessThanEquals", + "numericGreaterThan", + "numericGreaterThanEquals", + "bool", + "not", + "or", + "and", + "dateTimeUtcGreaterThan", + "dateTimeUtcLessThan", + "between" + ] } } } From 2af98eeb94e4d07fe3893f3212c4b3be3e722ac2 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 15:48:40 -0300 Subject: [PATCH 27/42] =?UTF-8?q?Removendo=20descri=C3=A7=C3=B5es=20vazias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index f50175042..764f32fbf 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -122,7 +122,6 @@ } ], "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -283,7 +282,6 @@ } ], "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -422,7 +420,6 @@ } ], "requestBody": { - "description": "", "content": { "application/json": { "schema": { From c8f0a5be57c811525b262ad02eddb16c54c1bdd2 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 16:13:35 -0300 Subject: [PATCH 28/42] Adicionado `items` --- VTEX - Policies System API.json | 37 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 764f32fbf..dedbdce6a 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -689,23 +689,26 @@ "actions": { "type": "array", "title": "actions", - "properties": { - "id": { - "type": "string", - "title": "id", - "description": "Action ID.", - "enum": [ - "SendSlackMessage", - "SendEmail", - "DeactivatePromotions" - ] + "items":{ + "properties": { + "id": { + "type": "string", + "title": "id", + "description": "Action ID.", + "enum": [ + "SendSlackMessage", + "SendEmail", + "DeactivatePromotions" + ] + }, + "metadata": { + "type": "object", + "title": "metadata", + "description": "Data inside of the actions.", + "additionalProperties": true + } }, - "metadata": { - "type": "object", - "title": "metadata", - "description": "Data inside of the actions.", - "additionalProperties": true - } + "type": "object" }, "description": "Actions that the policy will execute." }, @@ -725,7 +728,7 @@ "conditions": { "title": "conditions", "type": "array", - "description": "List of conditions the actions can have.", + "description": "List of conditions the actions can have. It can be an empty array `[]`.", "enum": [ [], "stringEquals", From 3587821c34512e3e9d70d1e47b48150d0970d836 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Mon, 13 Nov 2023 17:18:29 -0300 Subject: [PATCH 29/42] Ajeitando os examples --- VTEX - Policies System API.json | 378 ++++++++++++++++---------------- 1 file changed, 189 insertions(+), 189 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index dedbdce6a..ee2dc982f 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -51,54 +51,54 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - }, - "example": [ - { - "id": "pa_test_001", - "name": "TestAlarmBerenice", - "description": "TesteMarcosPromotionsAlert", - "statements": [ - { - "effect": "Allow", - "actions": [ + } + }, + "example": [ + { + "id": "pa_test_001", + "name": "TestAlarmBerenice", + "description": "TesteMarcosPromotionsAlert", + "statements": [ + { + "effect": "Allow", + "actions": [ + { + "id": "SendSlackMessage", + "metadata": { + "channel": "C01NJFF35R6", + "relatedUsers": [ + "URUNDC2NB" + ], + "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." + } + } + ], + "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", + "condition": { + "conditions": [ { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." - } + "conditions": [], + "operation": "stringEquals", + "key": "brandId", + "values": [ + "2000001" + ] + }, + { + "conditions": [], + "operation": "numericGreaterThan", + "key": "discountPercentage", + "values": [ + "70.00" + ] } ], - "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", - "condition": { - "conditions": [ - { - "conditions": [], - "operation": "stringEquals", - "key": "brandId", - "values": [ - "2000001" - ] - }, - { - "conditions": [], - "operation": "numericGreaterThan", - "key": "discountPercentage", - "values": [ - "70.00" - ] - } - ], - "operation": "and" - } + "operation": "and" } - ] - } - ] - } + } + ] + } + ] } } } @@ -147,20 +147,20 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyActionGetResponse" - }, - "example": [ - { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." - } + } + }, + "example": [ + { + "id": "SendSlackMessage", + "metadata": { + "channel": "C01NJFF35R6", + "relatedUsers": [ + "URUNDC2NB" + ], + "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." } - ] - } + } + ] } } } @@ -203,54 +203,54 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - }, - "example": [ - { - "id": "pa_test_001", - "name": "TestAlarmBerenice", - "description": "TesteMarcosPromotionsAlert", - "statements": [ - { - "effect": "Allow", - "actions": [ + } + }, + "example": [ + { + "id": "pa_test_001", + "name": "TestAlarmBerenice", + "description": "TesteMarcosPromotionsAlert", + "statements": [ + { + "effect": "Allow", + "actions": [ + { + "id": "SendSlackMessage", + "metadata": { + "channel": "C01NJFF35R6", + "relatedUsers": [ + "URUNDC2NB" + ], + "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." + } + } + ], + "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", + "condition": { + "conditions": [ { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." - } + "conditions": [], + "operation": "stringEquals", + "key": "brandId", + "values": [ + "2000001" + ] + }, + { + "conditions": [], + "operation": "numericGreaterThan", + "key": "discountPercentage", + "values": [ + "70.00" + ] } ], - "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", - "condition": { - "conditions": [ - { - "conditions": [], - "operation": "stringEquals", - "key": "brandId", - "values": [ - "2000001" - ] - }, - { - "conditions": [], - "operation": "numericGreaterThan", - "key": "discountPercentage", - "values": [ - "70.00" - ] - } - ], - "operation": "and" - } + "operation": "and" } - ] - } - ] - } + } + ] + } + ] } } } @@ -342,54 +342,54 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - }, - "example": [ - { - "id": "pa_test_001", - "name": "TestAlarmBerenice", - "description": "TesteMarcosPromotionsAlert", - "statements": [ - { - "effect": "Allow", - "actions": [ + } + }, + "example": [ + { + "id": "pa_test_001", + "name": "TestAlarmBerenice", + "description": "TesteMarcosPromotionsAlert", + "statements": [ + { + "effect": "Allow", + "actions": [ + { + "id": "SendSlackMessage", + "metadata": { + "channel": "C01NJFF35R6", + "relatedUsers": [ + "URUNDC2NB" + ], + "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." + } + } + ], + "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", + "condition": { + "conditions": [ { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 70%." - } + "conditions": [], + "operation": "stringEquals", + "key": "brandId", + "values": [ + "2000001" + ] + }, + { + "conditions": [], + "operation": "numericGreaterThan", + "key": "discountPercentage", + "values": [ + "70.00" + ] } ], - "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", - "condition": { - "conditions": [ - { - "conditions": [], - "operation": "stringEquals", - "key": "brandId", - "values": [ - "2000001" - ] - }, - { - "conditions": [], - "operation": "numericGreaterThan", - "key": "discountPercentage", - "values": [ - "70.00" - ] - } - ], - "operation": "and" - } + "operation": "and" } - ] - } - ] - } + } + ] + } + ] } } } @@ -438,54 +438,54 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - }, - "example": [ - { - "id": "pa_test_001", - "name": "TestAlarmBerenice", - "description": "TesteMarcosPromotionsAlert", - "statements": [ - { - "effect": "Allow", - "actions": [ + } + }, + "example": [ + { + "id": "pa_test_001", + "name": "TestAlarmBerenice", + "description": "TesteMarcosPromotionsAlert", + "statements": [ + { + "effect": "Allow", + "actions": [ + { + "id": "SendSlackMessage", + "metadata": { + "channel": "C01NJFF35R6", + "relatedUsers": [ + "URUNDC2NB" + ], + "alertDescription": "Avoid selling products from Berenice with a discount greater than 40%." + } + } + ], + "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", + "condition": { + "conditions": [ { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 40%." - } + "conditions": [], + "operation": "stringEquals", + "key": "brandId", + "values": [ + "2000001" + ] + }, + { + "conditions": [], + "operation": "numericGreaterThan", + "key": "discountPercentage", + "values": [ + "40.00" + ] } ], - "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", - "condition": { - "conditions": [ - { - "conditions": [], - "operation": "stringEquals", - "key": "brandId", - "values": [ - "2000001" - ] - }, - { - "conditions": [], - "operation": "numericGreaterThan", - "key": "discountPercentage", - "values": [ - "40.00" - ] - } - ], - "operation": "and" - } + "operation": "and" } - ] - } - ] - } + } + ] + } + ] } } } From 34db03f902990f0b18996f5a71ae6b23fef628c3 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Tue, 14 Nov 2023 15:17:06 -0300 Subject: [PATCH 30/42] Adicionando description nos arrays --- VTEX - Policies System API.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index ee2dc982f..8847171fd 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -51,7 +51,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - } + }, + "description": "Array of objects with policies infomation." }, "example": [ { @@ -147,7 +148,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyActionGetResponse" - } + }, + "description": "Array of objects with policies infomation." }, "example": [ { @@ -203,7 +205,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - } + }, + "description": "Array of objects with policies infomation." }, "example": [ { @@ -342,7 +345,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - } + }, + "description": "Array of objects with policies infomation." }, "example": [ { @@ -438,7 +442,8 @@ "type": "array", "items": { "$ref": "#/components/schemas/PolicyGetResponse" - } + }, + "description": "Array of objects with policies infomation." }, "example": [ { From b719f4802d2fdc4f93c632d95eaa4fa1bffb0ec7 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Tue, 14 Nov 2023 16:34:14 -0300 Subject: [PATCH 31/42] =?UTF-8?q?Adicionando=20descri=C3=A7=C3=A3o=20nos?= =?UTF-8?q?=20objects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 8847171fd..56667d74c 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -545,6 +545,7 @@ "PolicyActionGetResponse": { "title": "PolicyActionGetResponse", "type": "object", + "description": "Object with policy conditions.", "properties": { "id": { "type": "string", @@ -565,6 +566,7 @@ "context" ], "type": "object", + "description": "Object with policy conditions.", "properties": { "resource": { "description": "Scope on which this policy must be evaluated.", @@ -587,6 +589,7 @@ "Account": { "title": "Account", "type": "object", + "description": "Object with account information.", "properties": { "mainAccountName": { "type": "string" From 39b16ecd4f95cfaf613b85b4019788764ffd8eea Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Tue, 14 Nov 2023 16:34:30 -0300 Subject: [PATCH 32/42] =?UTF-8?q?Deletando=20schema=20que=20n=C3=A3o=20?= =?UTF-8?q?=C3=A9=20usado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 38 --------------------------------- 1 file changed, 38 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 56667d74c..801cfcac5 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -586,44 +586,6 @@ } } }, - "Account": { - "title": "Account", - "type": "object", - "description": "Object with account information.", - "properties": { - "mainAccountName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "operationDate": { - "type": "string", - "format": "date-time" - }, - "accountType": { - "$ref": "#/components/schemas/AccountType" - }, - "isActive": { - "type": "boolean" - }, - "isOperating": { - "type": "boolean" - } - } - }, - "AccountType": { - "title": "AccountType", - "enum": [ - 0, - 1 - ], - "type": "integer", - "example": 0 - }, "PolicySaveRequest": { "required": [ "name", From 05515cbd1f9ec3d38873503161e8e2746fc6e0b7 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Tue, 14 Nov 2023 16:41:36 -0300 Subject: [PATCH 33/42] Adicionando examples --- VTEX - Policies System API.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 801cfcac5..3e5d6386e 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -572,13 +572,13 @@ "description": "Scope on which this policy must be evaluated.", "title": "resource", "type": "string", - "default": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert" + "example": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert" }, "context": { "type": "object", "description": "Conditions that the policy needs to satisfy.", "title": "context", - "default": { + "example": { "brandId": "2000001", "discountPercentage": "91.00" }, @@ -811,7 +811,7 @@ "style": "simple", "schema": { "type": "string", - "example": "application/json" + "default": "application/json" } }, "Accept": { @@ -822,7 +822,7 @@ "style": "simple", "schema": { "type": "string", - "example": "application/json" + "default": "application/json" } } } From 51a91d7780727ada9bca0a96e765870f6ef96ddd Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Tue, 14 Nov 2023 17:00:57 -0300 Subject: [PATCH 34/42] =?UTF-8?q?Adicionando=20descri=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VTEX - Policies System API.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 3e5d6386e..f93be6311 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -616,6 +616,7 @@ }, "PolicyGetResponse": { "title": "PolicyGetResponse", + "description": "Object with policy information.", "type": "object", "properties": { "id": { @@ -645,6 +646,7 @@ }, "StatementGetResponse": { "type": "object", + "description": "Object with policy conditions.", "required": [ "effect" ], @@ -678,7 +680,8 @@ "additionalProperties": true } }, - "type": "object" + "type": "object", + "description": "Array with actions information." }, "description": "Actions that the policy will execute." }, @@ -694,6 +697,7 @@ "type": "array", "description": "List of conditions that will activate the policy.", "items": { + "description": "Array of conditions.", "properties": { "conditions": { "title": "conditions", @@ -701,8 +705,8 @@ "description": "List of conditions the actions can have. It can be an empty array `[]`.", "enum": [ [], - "stringEquals", - "numericGreaterThan" + ["stringEquals"], + ["numericGreaterThan"] ], "items": { "type": "string", From e1a2eaf348f814e5dc9eab789f23237074f7f9a9 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Wed, 29 Nov 2023 16:51:33 -0300 Subject: [PATCH 35/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index f93be6311..a140b9949 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -655,7 +655,7 @@ "type": "string", "title": "effect", "description": "This field is not functional at the moment. To create a correct request, fill the field with `Allow`.", - "default": "Allow", + "example": "Allow", "deprecated": true }, "actions": { From be810e53e9cb2bdaefed1141a349d8a17715247c Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Wed, 29 Nov 2023 16:51:49 -0300 Subject: [PATCH 36/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index a140b9949..ffa14144c 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -667,6 +667,7 @@ "type": "string", "title": "id", "description": "Action ID.", + "example": "SendSlackMessage", "enum": [ "SendSlackMessage", "SendEmail", From f9666d4503694f3874fe4c8901a4505652fad3b3 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Wed, 29 Nov 2023 16:52:09 -0300 Subject: [PATCH 37/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index ffa14144c..ed1f22d66 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -718,6 +718,7 @@ "type": "string", "title": "operation", "description": "The action of the condition.", + "example": "None", "enum": [ "None", "stringEquals", From 55aadbe6927ce10bf460f443ef71a0ea15438262 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Wed, 29 Nov 2023 16:52:22 -0300 Subject: [PATCH 38/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index ed1f22d66..fa15cdf30 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -741,6 +741,7 @@ "type": "string", "title": "key", "description": "The element that will define what the policy will influence.", + "example": "skuId", "enum": [ "skuId", "brandId", From 3e789dd98485d455842b88e898106c7a566befa9 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Wed, 29 Nov 2023 16:52:33 -0300 Subject: [PATCH 39/42] Update VTEX - Policies System API.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Policies System API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index fa15cdf30..7be8f3cfe 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -768,6 +768,7 @@ "type": "string", "title": "operation", "description": "This operation will determine if all the conditions need to be valid or at least one of them, if the conditions array is not empty.", + "example": "None", "enum": [ "None", "stringEquals", From f6ceebd6976ce8b52907d7d2ba90dbfa825e87a0 Mon Sep 17 00:00:00 2001 From: Karen Krieger Date: Fri, 1 Dec 2023 15:43:00 -0300 Subject: [PATCH 40/42] Update VTEX - Policies System API.json --- VTEX - Policies System API.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 7be8f3cfe..2058ffd86 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -597,7 +597,8 @@ "name": { "type": "string", "description": "Policy name.", - "title": "name" + "title": "name", + "example": "id" }, "description": { "type": "string", @@ -627,7 +628,8 @@ "name": { "type": "string", "description": "Policy name.", - "title": "name" + "title": "name", + "example": "id" }, "description": { "type": "string", @@ -689,7 +691,8 @@ "resource": { "type": "string", "description": "Scope on which this policy must be evaluated.", - "title": "resource" + "title": "resource", + "example": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert" }, "condition": { "type": "object", @@ -698,7 +701,7 @@ "type": "array", "description": "List of conditions that will activate the policy.", "items": { - "description": "Array of conditions.", + "description": "List of conditions that will activate the policy.", "properties": { "conditions": { "title": "conditions", @@ -753,7 +756,8 @@ "title": "values", "items": { "type": "string", - "description": "Key value." + "description": "Key value.", + "example": "40.00" }, "description": "Array with values of the key." } From c2b84cfc1ea74c5988306a46420324c019d3c8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Rabello?= <77292838+julia-rabello@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:55:53 -0300 Subject: [PATCH 41/42] format document --- VTEX - Policies System API.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 2058ffd86..3a3458675 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -530,7 +530,7 @@ "deprecated": false } } - }, + }, "security": [ { "appKey": [], @@ -663,7 +663,7 @@ "actions": { "type": "array", "title": "actions", - "items":{ + "items": { "properties": { "id": { "type": "string", @@ -709,8 +709,12 @@ "description": "List of conditions the actions can have. It can be an empty array `[]`.", "enum": [ [], - ["stringEquals"], - ["numericGreaterThan"] + [ + "stringEquals" + ], + [ + "numericGreaterThan" + ] ], "items": { "type": "string", From 09a894957d508a6802551389e34c466cf36ec5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Rabello?= <77292838+julia-rabello@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:59:44 -0300 Subject: [PATCH 42/42] fix PolicySaveRequest examples --- VTEX - Policies System API.json | 46 ++------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/VTEX - Policies System API.json b/VTEX - Policies System API.json index 3a3458675..19ef5176c 100644 --- a/VTEX - Policies System API.json +++ b/VTEX - Policies System API.json @@ -289,49 +289,6 @@ "application/json": { "schema": { "$ref": "#/components/schemas/PolicySaveRequest" - }, - "example": { - "name": "TestAlarmBerenice", - "description": "TesteMarcosPromotionsAlert", - "statements": [ - { - "effect": "Allow", - "actions": [ - { - "id": "SendSlackMessage", - "metadata": { - "channel": "C01NJFF35R6", - "relatedUsers": [ - "URUNDC2NB" - ], - "alertDescription": "Avoid selling products from Berenice with a discount greater than 40%." - } - } - ], - "resource": "vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert", - "condition": { - "conditions": [ - { - "conditions": [], - "operation": "stringEquals", - "key": "brandId", - "values": [ - "2000001" - ] - }, - { - "conditions": [], - "operation": "numericGreaterThan", - "key": "discountPercentage", - "values": [ - "40.00" - ] - } - ], - "operation": "and" - } - } - ] } } } @@ -603,7 +560,8 @@ "description": { "type": "string", "description": "Policy description, only for internal use.", - "title": "description" + "title": "description", + "example": "TesteMarcosPromotionsAlert" }, "statements": { "type": "array",