@prezly/sdk 15.20.0 → 15.21.0

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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "15.19.0";
7
+ const VERSION = "15.20.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
10
  exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "15.19.0";
1
+ const VERSION = "15.20.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -5,14 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Client = void 0;
7
7
  var _routing = require("../../routing.cjs");
8
+ var _index = require("../../types/index.cjs");
8
9
  class Client {
9
10
  constructor(apiClient) {
10
11
  this.apiClient = apiClient;
11
12
  }
12
- async list() {
13
+ async list(scope) {
13
14
  const {
14
15
  senders
15
- } = await this.apiClient.get(_routing.routing.senderAddressesUrl);
16
+ } = await this.apiClient.get(_routing.routing.senderAddressesUrl, {
17
+ query: {
18
+ scope: _index.Query.stringify(scope)
19
+ }
20
+ });
16
21
  return senders;
17
22
  }
18
23
  async create(payload) {
@@ -1,10 +1,11 @@
1
1
  import type { DeferredJobsApiClient } from '../../api';
2
2
  import type { SenderAddress } from '../../types';
3
+ import { Query } from '../../types';
3
4
  import type { CreateRequest, UpdateRequest } from './types';
4
5
  export declare class Client {
5
6
  private readonly apiClient;
6
7
  constructor(apiClient: DeferredJobsApiClient);
7
- list(): Promise<SenderAddress[]>;
8
+ list(scope?: Query): Promise<SenderAddress[]>;
8
9
  create(payload: CreateRequest): Promise<SenderAddress>;
9
10
  get(senderId: SenderAddress['id']): Promise<SenderAddress>;
10
11
  update(senderId: SenderAddress['id'], payload: UpdateRequest): Promise<SenderAddress>;
@@ -1,12 +1,17 @@
1
1
  import { routing } from "../../routing.js";
2
+ import { Query } from "../../types/index.js";
2
3
  export class Client {
3
4
  constructor(apiClient) {
4
5
  this.apiClient = apiClient;
5
6
  }
6
- async list() {
7
+ async list(scope) {
7
8
  const {
8
9
  senders
9
- } = await this.apiClient.get(routing.senderAddressesUrl);
10
+ } = await this.apiClient.get(routing.senderAddressesUrl, {
11
+ query: {
12
+ scope: Query.stringify(scope)
13
+ }
14
+ });
10
15
  return senders;
11
16
  }
12
17
  async create(payload) {
@@ -7,6 +7,7 @@ export interface SenderAddress {
7
7
  is_default: boolean;
8
8
  is_public_webmail: boolean;
9
9
  is_verified: boolean;
10
+ is_approved: boolean;
10
11
  domain: SenderDomain;
11
12
  }
12
13
  export declare namespace SenderAddress {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "15.20.0",
3
+ "version": "15.21.0",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",