@agenus-io/pixel-backend-sdk 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Class/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class PixelSDK implements IPixelSdk {
|
|
|
22
22
|
* @throws {Error} Se houver erro ao enviar a mensagem para a fila
|
|
23
23
|
*/
|
|
24
24
|
SendOrder(params: SendSaleParams): Promise<void>;
|
|
25
|
-
Create({ data, workspaceId }: ICreatePixelDTO.Params): Promise<
|
|
25
|
+
Create({ data, workspaceId }: ICreatePixelDTO.Params): Promise<ICreatePixelDTO.Result>;
|
|
26
26
|
Update({ data, workspaceId, id }: IUpdatePixelDTO.Params): Promise<void>;
|
|
27
27
|
Delete({ id, workspaceId }: IDeletePixelDTO.Params): Promise<void>;
|
|
28
28
|
Get({ page, pageSize, filter, workSpaceId }: IGetPixelDTO.Params): Promise<IGetPixelDTO.Result>;
|
package/dist/Class/index.js
CHANGED
|
@@ -98,7 +98,8 @@ class PixelSDK {
|
|
|
98
98
|
secretToken: this.appToken,
|
|
99
99
|
workSpaceId: workspaceId,
|
|
100
100
|
};
|
|
101
|
-
await axios_1.default.post(`${this.apiUrl}/pixels`, { token, ...data });
|
|
101
|
+
const response = await axios_1.default.post(`${this.apiUrl}/pixels`, { token, ...data });
|
|
102
|
+
return response.data;
|
|
102
103
|
}
|
|
103
104
|
catch (error) {
|
|
104
105
|
if (error instanceof axios_1.AxiosError) {
|
|
@@ -37,6 +37,9 @@ export declare namespace ICreatePixelDTO {
|
|
|
37
37
|
workspaceId: string;
|
|
38
38
|
data: CreatePixel;
|
|
39
39
|
};
|
|
40
|
+
type Result = {
|
|
41
|
+
id: string;
|
|
42
|
+
};
|
|
40
43
|
}
|
|
41
44
|
export declare namespace IUpdatePixelDTO {
|
|
42
45
|
type Params = {
|
|
@@ -145,7 +148,7 @@ export declare namespace IUpdateOffersDTO {
|
|
|
145
148
|
};
|
|
146
149
|
}
|
|
147
150
|
export interface IPixelSdk {
|
|
148
|
-
Create(params: ICreatePixelDTO.Params): Promise<
|
|
151
|
+
Create(params: ICreatePixelDTO.Params): Promise<ICreatePixelDTO.Result>;
|
|
149
152
|
Update(params: IUpdatePixelDTO.Params): Promise<void>;
|
|
150
153
|
Delete(params: IDeletePixelDTO.Params): Promise<void>;
|
|
151
154
|
Get(params: IGetPixelDTO.Params): Promise<IGetPixelDTO.Result>;
|