@parra/parra-js-sdk 0.3.249 → 0.3.250

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.
@@ -1907,6 +1907,29 @@ export interface UpdateChannelRequestBody {
1907
1907
  apns?: UpdateApnsChannelRequestBody;
1908
1908
  inbox?: UpdateInboxChannelRequestBody;
1909
1909
  }
1910
+ export interface CreateNotificationTopicRequestBody {
1911
+ name: string;
1912
+ slug: string;
1913
+ description?: string | null;
1914
+ active?: boolean;
1915
+ }
1916
+ export interface NotificationTopic {
1917
+ id: string;
1918
+ created_at: string;
1919
+ updated_at: string;
1920
+ deleted_at?: string | null;
1921
+ name: string;
1922
+ slug: string;
1923
+ description?: string | null;
1924
+ active?: boolean;
1925
+ tenant_id: string;
1926
+ }
1927
+ export interface UpdateNotificationTopicRequestBody {
1928
+ name?: string;
1929
+ slug?: string;
1930
+ description?: string | null;
1931
+ active?: boolean;
1932
+ }
1910
1933
  export interface CreateExternalDomainRequestBody {
1911
1934
  context?: string | null;
1912
1935
  name: string;
@@ -3363,6 +3386,10 @@ declare class ParraAPI {
3363
3386
  createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody, options?: Options) => Promise<Channel>;
3364
3387
  updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody, options?: Options) => Promise<Channel>;
3365
3388
  deleteChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, options?: Options) => Promise<Response>;
3389
+ createNotificationTopic: (tenant_id: string, body: CreateNotificationTopicRequestBody, options?: Options) => Promise<NotificationTopic>;
3390
+ listNotificationTopics: (tenant_id: string, options?: Options) => Promise<Array<NotificationTopic>>;
3391
+ updateNotificationTopicById: (tenant_id: string, notification_topic_id: string, body?: UpdateNotificationTopicRequestBody, options?: Options) => Promise<NotificationTopic>;
3392
+ deleteNotificationTopicById: (tenant_id: string, notification_topic_id: string, options?: Options) => Promise<Response>;
3366
3393
  createExternalDomainForTenantById: (tenant_id: string, body: CreateExternalDomainRequestBody, options?: Options) => Promise<ExternalDomain>;
3367
3394
  getExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, options?: Options) => Promise<ExternalDomain>;
3368
3395
  updateExternalDomainByIdForTenantById: (tenant_id: string, external_domain_id: string, body?: UpdateExternalDomainRequestBody, options?: Options) => Promise<ExternalDomain>;
package/dist/ParraAPI.js CHANGED
@@ -985,6 +985,26 @@ var ParraAPI = /** @class */ (function () {
985
985
  if (options === void 0) { options = {}; }
986
986
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/templates/").concat(notification_template_id, "/channels/").concat(channel_id), __assign({ method: "delete" }, options));
987
987
  };
988
+ this.createNotificationTopic = function (tenant_id, body, options) {
989
+ if (options === void 0) { options = {}; }
990
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/topics"), __assign({ method: "post", body: JSON.stringify(body), headers: {
991
+ "content-type": "application/json",
992
+ } }, options));
993
+ };
994
+ this.listNotificationTopics = function (tenant_id, options) {
995
+ if (options === void 0) { options = {}; }
996
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/topics"), __assign({ method: "get" }, options));
997
+ };
998
+ this.updateNotificationTopicById = function (tenant_id, notification_topic_id, body, options) {
999
+ if (options === void 0) { options = {}; }
1000
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/topics/").concat(notification_topic_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
1001
+ "content-type": "application/json",
1002
+ } }, options));
1003
+ };
1004
+ this.deleteNotificationTopicById = function (tenant_id, notification_topic_id, options) {
1005
+ if (options === void 0) { options = {}; }
1006
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/topics/").concat(notification_topic_id), __assign({ method: "delete" }, options));
1007
+ };
988
1008
  this.createExternalDomainForTenantById = function (tenant_id, body, options) {
989
1009
  if (options === void 0) { options = {}; }
990
1010
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/domains/external"), __assign({ method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.249",
3
+ "version": "0.3.250",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",