@parra/parra-js-sdk 0.2.42 → 0.2.43
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/ParraAPI.d.ts +18 -1
- package/dist/ParraAPI.js +18 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -99,6 +99,21 @@ export interface TenantPlansResponse {
|
|
|
99
99
|
}
|
|
100
100
|
export interface StripeEvent {
|
|
101
101
|
}
|
|
102
|
+
export interface CreateAudienceRequestBody {
|
|
103
|
+
tenant_id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
}
|
|
106
|
+
export interface Audience {
|
|
107
|
+
id: string;
|
|
108
|
+
created_at: string;
|
|
109
|
+
updated_at: string;
|
|
110
|
+
deleted_at?: string | null;
|
|
111
|
+
tenant_id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
}
|
|
114
|
+
export interface CreateSubscriberRequestBody {
|
|
115
|
+
email: string;
|
|
116
|
+
}
|
|
102
117
|
export interface Entitlement {
|
|
103
118
|
}
|
|
104
119
|
export declare type Entitlements = Array<Entitlement>;
|
|
@@ -167,7 +182,7 @@ export interface ApiKeyCollectionResponse {
|
|
|
167
182
|
export interface AnswerData {
|
|
168
183
|
}
|
|
169
184
|
export interface FeedbackMetrics {
|
|
170
|
-
|
|
185
|
+
questions_created_this_month: number;
|
|
171
186
|
}
|
|
172
187
|
export interface Answer {
|
|
173
188
|
id: string;
|
|
@@ -421,6 +436,8 @@ declare class ParraAPI {
|
|
|
421
436
|
createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
|
|
422
437
|
createCheckoutSession: (body?: CreateCheckoutSessionRequestBody | undefined) => Promise<CheckoutSession>;
|
|
423
438
|
getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
|
|
439
|
+
createAudience: (body?: CreateAudienceRequestBody | undefined) => Promise<Audience>;
|
|
440
|
+
createSubscriberForAudienceById: (audience_id: string, body?: CreateSubscriberRequestBody | undefined) => Promise<Response>;
|
|
424
441
|
getTenantById: (tenant_id: string) => Promise<Tenant>;
|
|
425
442
|
createTenantForUserById: (user_id: string, body?: CreateTenantRequestBody | undefined) => Promise<Tenant>;
|
|
426
443
|
getTenantsForUserById: (user_id: string) => Promise<TenantListResponse>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -78,6 +78,24 @@ var ParraAPI = /** @class */ (function () {
|
|
|
78
78
|
method: "post",
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
|
+
this.createAudience = function (body) {
|
|
82
|
+
return _this.http.execute(_this.options.baseUrl + "/v1/email/audiences", {
|
|
83
|
+
method: "post",
|
|
84
|
+
body: JSON.stringify(body),
|
|
85
|
+
headers: {
|
|
86
|
+
"content-type": "application/json",
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.createSubscriberForAudienceById = function (audience_id, body) {
|
|
91
|
+
return _this.http.execute(_this.options.baseUrl + "/v1/email/audiences/" + audience_id + "/subscribers", {
|
|
92
|
+
method: "post",
|
|
93
|
+
body: JSON.stringify(body),
|
|
94
|
+
headers: {
|
|
95
|
+
"content-type": "application/json",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
};
|
|
81
99
|
this.getTenantById = function (tenant_id) {
|
|
82
100
|
return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id, {
|
|
83
101
|
method: "get",
|