diff --git a/composer.json b/composer.json index af8f27f..af06be9 100755 --- a/composer.json +++ b/composer.json @@ -47,11 +47,11 @@ }, "require": { "php": "^8.1", - "phplist/core": "dev-main", + "phplist/core": "dev-dev", "symfony/twig-bundle": "^6.4", "symfony/webpack-encore-bundle": "^2.2", "symfony/security-bundle": "^6.4", - "tatevikgr/rest-api-client": "dev-main" + "tatevikgr/rest-api-client": "dev-dev" }, "require-dev": { "phpunit/phpunit": "^9.5", diff --git a/openapi.json b/openapi.json index 722bd8a..afa96f9 100644 --- a/openapi.json +++ b/openapi.json @@ -1393,10 +1393,18 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BounceView" - } + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BounceView" + } + }, + "pagination": { + "$ref": "#/components/schemas/CursorPagination" + } + }, + "type": "object" } } } @@ -4715,14 +4723,14 @@ } } }, - "/api/v2/subscribe-pages/{id}": { + "/api/v2/subscribe-pages": { "get": { "tags": [ "subscriptions" ], - "summary": "Get subscribe page", + "summary": "Get subscribe pages list", "description": "🚧 **Status: Beta** – This method is under development. Avoid using in production.", - "operationId": "390db83b1de32e07d2d52b310eb0c1ea", + "operationId": "1a89921fa5f82ce43daf2ca40dc3f954", "parameters": [ { "name": "php-auth-pw", @@ -4734,12 +4742,26 @@ } }, { - "name": "id", - "in": "path", - "description": "Subscribe page ID", - "required": true, + "name": "after_id", + "in": "query", + "description": "Last id (starting from 0)", + "required": false, "schema": { - "type": "integer" + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results per page", + "required": false, + "schema": { + "type": "integer", + "default": 25, + "maximum": 100, + "minimum": 1 } } ], @@ -4749,7 +4771,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscribePage" + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscribePage" + } + }, + "pagination": { + "$ref": "#/components/schemas/CursorPagination" + } + }, + "type": "object" } } } @@ -4776,13 +4809,13 @@ } } }, - "put": { + "post": { "tags": [ "subscriptions" ], - "summary": "Update subscribe page", + "summary": "Create subscribe page", "description": "🚧 **Status: Beta** – This method is under development. Avoid using in production.", - "operationId": "a82a0cbe52063758b55279ce7b96657b", + "operationId": "314286c5d8ef80c845f5dfd2d671bad3", "parameters": [ { "name": "php-auth-pw", @@ -4792,15 +4825,6 @@ "schema": { "type": "string" } - }, - { - "name": "id", - "in": "path", - "description": "Subscribe page ID", - "required": true, - "schema": { - "type": "integer" - } } ], "requestBody": { @@ -4810,8 +4834,7 @@ "schema": { "properties": { "title": { - "type": "string", - "nullable": true + "type": "string" }, "active": { "type": "boolean", @@ -4824,8 +4847,8 @@ } }, "responses": { - "200": { - "description": "Success", + "201": { + "description": "Created", "content": { "application/json": { "schema": { @@ -4844,25 +4867,27 @@ } } }, - "404": { - "description": "Not Found", + "422": { + "description": "Validation failed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } } } } - }, - "delete": { + } + }, + "/api/v2/subscribe-pages/{id}": { + "get": { "tags": [ "subscriptions" ], - "summary": "Delete subscribe page", + "summary": "Get subscribe page", "description": "🚧 **Status: Beta** – This method is under development. Avoid using in production.", - "operationId": "2881b5de1d076caa070f2b9a1c8487fe", + "operationId": "390db83b1de32e07d2d52b310eb0c1ea", "parameters": [ { "name": "php-auth-pw", @@ -4884,8 +4909,15 @@ } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscribePage" + } + } + } }, "403": { "description": "Failure", @@ -4908,16 +4940,14 @@ } } } - } - }, - "/api/v2/subscribe-pages": { - "post": { + }, + "put": { "tags": [ "subscriptions" ], - "summary": "Create subscribe page", + "summary": "Update subscribe page", "description": "🚧 **Status: Beta** – This method is under development. Avoid using in production.", - "operationId": "314286c5d8ef80c845f5dfd2d671bad3", + "operationId": "a82a0cbe52063758b55279ce7b96657b", "parameters": [ { "name": "php-auth-pw", @@ -4927,6 +4957,15 @@ "schema": { "type": "string" } + }, + { + "name": "id", + "in": "path", + "description": "Subscribe page ID", + "required": true, + "schema": { + "type": "integer" + } } ], "requestBody": { @@ -4936,7 +4975,8 @@ "schema": { "properties": { "title": { - "type": "string" + "type": "string", + "nullable": true }, "active": { "type": "boolean", @@ -4949,8 +4989,8 @@ } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "Success", "content": { "application/json": { "schema": { @@ -4969,12 +5009,65 @@ } } }, - "422": { - "description": "Validation failed", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "$ref": "#/components/schemas/NotFoundErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "subscriptions" + ], + "summary": "Delete subscribe page", + "description": "🚧 **Status: Beta** – This method is under development. Avoid using in production.", + "operationId": "2881b5de1d076caa070f2b9a1c8487fe", + "parameters": [ + { + "name": "php-auth-pw", + "in": "header", + "description": "Session key obtained from login", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Subscribe page ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Failure", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedResponse" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorResponse" } } } @@ -8803,4 +8896,4 @@ "description": "lists" } ] -} +} \ No newline at end of file