@prezly/sdk 19.9.0 → 20.0.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.
- package/dist/Client.cjs +28 -28
- package/dist/Client.d.ts +2 -1
- package/dist/Client.js +29 -29
- package/dist/api/ApiClient.cjs +36 -34
- package/dist/api/ApiClient.d.ts +8 -12
- package/dist/api/ApiClient.js +34 -31
- package/dist/api/DeferredJobsApiClient.cjs +20 -18
- package/dist/api/DeferredJobsApiClient.d.ts +8 -10
- package/dist/api/DeferredJobsApiClient.js +18 -15
- package/dist/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- package/dist/endpoints/Accounts/Client.cjs +14 -13
- package/dist/endpoints/Accounts/Client.d.ts +6 -7
- package/dist/endpoints/Accounts/Client.js +12 -10
- package/dist/endpoints/Billing/Client.cjs +11 -11
- package/dist/endpoints/Billing/Client.d.ts +5 -6
- package/dist/endpoints/Billing/Client.js +9 -8
- package/dist/endpoints/CampaignRecipients/Client.cjs +26 -21
- package/dist/endpoints/CampaignRecipients/Client.d.ts +13 -14
- package/dist/endpoints/CampaignRecipients/Client.js +24 -18
- package/dist/endpoints/Campaigns/Client.cjs +38 -29
- package/dist/endpoints/Campaigns/Client.d.ts +14 -15
- package/dist/endpoints/Campaigns/Client.js +36 -26
- package/dist/endpoints/Contacts/Client.cjs +41 -32
- package/dist/endpoints/Contacts/Client.d.ts +15 -22
- package/dist/endpoints/Contacts/Client.js +39 -29
- package/dist/endpoints/ContactsExports/Client.cjs +20 -18
- package/dist/endpoints/ContactsExports/Client.d.ts +8 -31
- package/dist/endpoints/ContactsExports/Client.js +18 -15
- package/dist/endpoints/Coverage/Client.cjs +29 -23
- package/dist/endpoints/Coverage/Client.d.ts +12 -13
- package/dist/endpoints/Coverage/Client.js +27 -20
- package/dist/endpoints/Jobs/Client.cjs +8 -9
- package/dist/endpoints/Jobs/Client.d.ts +4 -5
- package/dist/endpoints/Jobs/Client.js +6 -6
- package/dist/endpoints/Licenses/Client.cjs +8 -9
- package/dist/endpoints/Licenses/Client.d.ts +4 -5
- package/dist/endpoints/Licenses/Client.js +6 -6
- package/dist/endpoints/NewsroomCategories/Client.cjs +20 -17
- package/dist/endpoints/NewsroomCategories/Client.d.ts +8 -9
- package/dist/endpoints/NewsroomCategories/Client.js +18 -14
- package/dist/endpoints/NewsroomContacts/Client.cjs +23 -19
- package/dist/endpoints/NewsroomContacts/Client.d.ts +9 -10
- package/dist/endpoints/NewsroomContacts/Client.js +21 -16
- package/dist/endpoints/NewsroomDomains/Client.cjs +23 -19
- package/dist/endpoints/NewsroomDomains/Client.d.ts +9 -10
- package/dist/endpoints/NewsroomDomains/Client.js +21 -16
- package/dist/endpoints/NewsroomGalleries/Client.cjs +26 -21
- package/dist/endpoints/NewsroomGalleries/Client.d.ts +10 -11
- package/dist/endpoints/NewsroomGalleries/Client.js +24 -18
- package/dist/endpoints/NewsroomHub/Client.cjs +26 -23
- package/dist/endpoints/NewsroomHub/Client.d.ts +8 -9
- package/dist/endpoints/NewsroomHub/Client.js +25 -21
- package/dist/endpoints/NewsroomLanguages/Client.cjs +26 -21
- package/dist/endpoints/NewsroomLanguages/Client.d.ts +16 -24
- package/dist/endpoints/NewsroomLanguages/Client.js +24 -18
- package/dist/endpoints/NewsroomPrivacyRequests/Client.cjs +11 -11
- package/dist/endpoints/NewsroomPrivacyRequests/Client.d.ts +5 -6
- package/dist/endpoints/NewsroomPrivacyRequests/Client.js +9 -8
- package/dist/endpoints/NewsroomSubscriptions/Client.cjs +24 -13
- package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +8 -9
- package/dist/endpoints/NewsroomSubscriptions/Client.js +23 -11
- package/dist/endpoints/NewsroomThemes/Client.cjs +17 -15
- package/dist/endpoints/NewsroomThemes/Client.d.ts +7 -8
- package/dist/endpoints/NewsroomThemes/Client.js +15 -12
- package/dist/endpoints/NewsroomWebhooks/Client.cjs +20 -17
- package/dist/endpoints/NewsroomWebhooks/Client.d.ts +8 -9
- package/dist/endpoints/NewsroomWebhooks/Client.js +18 -14
- package/dist/endpoints/Newsrooms/Client.cjs +35 -27
- package/dist/endpoints/Newsrooms/Client.d.ts +13 -14
- package/dist/endpoints/Newsrooms/Client.js +33 -24
- package/dist/endpoints/NotificationSubscriptions/Client.cjs +11 -11
- package/dist/endpoints/NotificationSubscriptions/Client.d.ts +5 -6
- package/dist/endpoints/NotificationSubscriptions/Client.js +9 -8
- package/dist/endpoints/PricingTables/Client.cjs +11 -11
- package/dist/endpoints/PricingTables/Client.d.ts +5 -6
- package/dist/endpoints/PricingTables/Client.js +9 -8
- package/dist/endpoints/SenderAddresses/Client.cjs +20 -17
- package/dist/endpoints/SenderAddresses/Client.d.ts +8 -9
- package/dist/endpoints/SenderAddresses/Client.js +18 -14
- package/dist/endpoints/Snippets/Client.cjs +20 -17
- package/dist/endpoints/Snippets/Client.d.ts +8 -9
- package/dist/endpoints/Snippets/Client.js +18 -14
- package/dist/endpoints/Stories/Client.cjs +63 -46
- package/dist/endpoints/Stories/Client.d.ts +109 -128
- package/dist/endpoints/Stories/Client.js +62 -44
- package/dist/endpoints/Subscriptions/Client.cjs +20 -17
- package/dist/endpoints/Subscriptions/Client.d.ts +8 -9
- package/dist/endpoints/Subscriptions/Client.js +18 -14
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
2
|
import type { NotificationSubscription } from '../../types';
|
|
3
3
|
import type { UpdateRequest } from './types';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
4
|
+
export type Client = ReturnType<typeof createClient>;
|
|
5
|
+
export declare function createClient(api: DeferredJobsApiClient): {
|
|
6
|
+
list: () => Promise<NotificationSubscription[]>;
|
|
7
|
+
update: (payload: UpdateRequest) => Promise<NotificationSubscription[]>;
|
|
8
|
+
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { routing } from "../../routing.js";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
this.apiClient = apiClient;
|
|
5
|
-
}
|
|
6
|
-
async list() {
|
|
2
|
+
export function createClient(api) {
|
|
3
|
+
async function list() {
|
|
7
4
|
const url = routing.notificationSubscriptionsUrl;
|
|
8
5
|
const {
|
|
9
6
|
subscriptions
|
|
10
|
-
} = await
|
|
7
|
+
} = await api.get(url);
|
|
11
8
|
return subscriptions;
|
|
12
9
|
}
|
|
13
|
-
async update(payload) {
|
|
10
|
+
async function update(payload) {
|
|
14
11
|
const url = routing.notificationSubscriptionsUrl;
|
|
15
12
|
const {
|
|
16
13
|
subscriptions
|
|
17
|
-
} = await
|
|
14
|
+
} = await api.patch(url, {
|
|
18
15
|
payload
|
|
19
16
|
});
|
|
20
17
|
return subscriptions;
|
|
21
18
|
}
|
|
19
|
+
return {
|
|
20
|
+
list,
|
|
21
|
+
update
|
|
22
|
+
};
|
|
22
23
|
}
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.createClient = createClient;
|
|
7
7
|
var _routing = require("../../routing.cjs");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.apiClient = apiClient;
|
|
11
|
-
}
|
|
12
|
-
async list() {
|
|
8
|
+
function createClient(api) {
|
|
9
|
+
async function list() {
|
|
13
10
|
const url = _routing.routing.pricingTablesUrl;
|
|
14
11
|
const {
|
|
15
12
|
tables
|
|
16
|
-
} = await
|
|
13
|
+
} = await api.get(url);
|
|
17
14
|
return tables;
|
|
18
15
|
}
|
|
19
|
-
async get(tableId) {
|
|
16
|
+
async function get(tableId) {
|
|
20
17
|
const url = _routing.routing.pricingTablesUrl;
|
|
21
18
|
const {
|
|
22
19
|
table
|
|
23
|
-
} = await
|
|
20
|
+
} = await api.get(`${url}/${tableId}`);
|
|
24
21
|
return table;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
return {
|
|
24
|
+
list,
|
|
25
|
+
get
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
2
|
import type { PricingTable } from './types';
|
|
3
3
|
import type { TableId } from './types';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
4
|
+
export type Client = ReturnType<typeof createClient>;
|
|
5
|
+
export declare function createClient(api: DeferredJobsApiClient): {
|
|
6
|
+
list: () => Promise<PricingTable[]>;
|
|
7
|
+
get: (tableId: TableId.STANDARD) => Promise<PricingTable>;
|
|
8
|
+
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { routing } from "../../routing.js";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
this.apiClient = apiClient;
|
|
5
|
-
}
|
|
6
|
-
async list() {
|
|
2
|
+
export function createClient(api) {
|
|
3
|
+
async function list() {
|
|
7
4
|
const url = routing.pricingTablesUrl;
|
|
8
5
|
const {
|
|
9
6
|
tables
|
|
10
|
-
} = await
|
|
7
|
+
} = await api.get(url);
|
|
11
8
|
return tables;
|
|
12
9
|
}
|
|
13
|
-
async get(tableId) {
|
|
10
|
+
async function get(tableId) {
|
|
14
11
|
const url = routing.pricingTablesUrl;
|
|
15
12
|
const {
|
|
16
13
|
table
|
|
17
|
-
} = await
|
|
14
|
+
} = await api.get(`${url}/${tableId}`);
|
|
18
15
|
return table;
|
|
19
16
|
}
|
|
17
|
+
return {
|
|
18
|
+
list,
|
|
19
|
+
get
|
|
20
|
+
};
|
|
20
21
|
}
|
|
@@ -3,47 +3,50 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.createClient = createClient;
|
|
7
7
|
var _routing = require("../../routing.cjs");
|
|
8
8
|
var _index = require("../../types/index.cjs");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.apiClient = apiClient;
|
|
12
|
-
}
|
|
13
|
-
async list(scope) {
|
|
9
|
+
function createClient(api) {
|
|
10
|
+
async function list(scope) {
|
|
14
11
|
const {
|
|
15
12
|
senders
|
|
16
|
-
} = await
|
|
13
|
+
} = await api.get(_routing.routing.senderAddressesUrl, {
|
|
17
14
|
query: {
|
|
18
15
|
scope: _index.Query.stringify(scope)
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
return senders;
|
|
22
19
|
}
|
|
23
|
-
async create(payload) {
|
|
20
|
+
async function create(payload) {
|
|
24
21
|
const {
|
|
25
22
|
sender
|
|
26
|
-
} = await
|
|
23
|
+
} = await api.post(_routing.routing.senderAddressesUrl, {
|
|
27
24
|
payload
|
|
28
25
|
});
|
|
29
26
|
return sender;
|
|
30
27
|
}
|
|
31
|
-
async get(senderId) {
|
|
28
|
+
async function get(senderId) {
|
|
32
29
|
const {
|
|
33
30
|
sender
|
|
34
|
-
} = await
|
|
31
|
+
} = await api.get(`${_routing.routing.senderAddressesUrl}/${senderId}`);
|
|
35
32
|
return sender;
|
|
36
33
|
}
|
|
37
|
-
async update(senderId, payload) {
|
|
34
|
+
async function update(senderId, payload) {
|
|
38
35
|
const {
|
|
39
36
|
sender
|
|
40
|
-
} = await
|
|
37
|
+
} = await api.patch(`${_routing.routing.senderAddressesUrl}/${senderId}`, {
|
|
41
38
|
payload
|
|
42
39
|
});
|
|
43
40
|
return sender;
|
|
44
41
|
}
|
|
45
|
-
async
|
|
46
|
-
return
|
|
42
|
+
async function doDelete(senderId) {
|
|
43
|
+
return api.delete(`${_routing.routing.senderAddressesUrl}/${senderId}`);
|
|
47
44
|
}
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
return {
|
|
46
|
+
list,
|
|
47
|
+
create,
|
|
48
|
+
get,
|
|
49
|
+
update,
|
|
50
|
+
delete: doDelete
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -2,12 +2,11 @@ import type { DeferredJobsApiClient } from '../../api';
|
|
|
2
2
|
import type { SenderAddress } from '../../types';
|
|
3
3
|
import { Query } from '../../types';
|
|
4
4
|
import type { CreateRequest, UpdateRequest } from './types';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
export type Client = ReturnType<typeof createClient>;
|
|
6
|
+
export declare function createClient(api: DeferredJobsApiClient): {
|
|
7
|
+
list: (scope?: Query) => Promise<SenderAddress[]>;
|
|
8
|
+
create: (payload: CreateRequest) => Promise<SenderAddress>;
|
|
9
|
+
get: (senderId: SenderAddress['id']) => Promise<SenderAddress>;
|
|
10
|
+
update: (senderId: SenderAddress['id'], payload: UpdateRequest) => Promise<SenderAddress>;
|
|
11
|
+
delete: (senderId: SenderAddress['id']) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
import { routing } from "../../routing.js";
|
|
2
2
|
import { Query } from "../../types/index.js";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
this.apiClient = apiClient;
|
|
6
|
-
}
|
|
7
|
-
async list(scope) {
|
|
3
|
+
export function createClient(api) {
|
|
4
|
+
async function list(scope) {
|
|
8
5
|
const {
|
|
9
6
|
senders
|
|
10
|
-
} = await
|
|
7
|
+
} = await api.get(routing.senderAddressesUrl, {
|
|
11
8
|
query: {
|
|
12
9
|
scope: Query.stringify(scope)
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
return senders;
|
|
16
13
|
}
|
|
17
|
-
async create(payload) {
|
|
14
|
+
async function create(payload) {
|
|
18
15
|
const {
|
|
19
16
|
sender
|
|
20
|
-
} = await
|
|
17
|
+
} = await api.post(routing.senderAddressesUrl, {
|
|
21
18
|
payload
|
|
22
19
|
});
|
|
23
20
|
return sender;
|
|
24
21
|
}
|
|
25
|
-
async get(senderId) {
|
|
22
|
+
async function get(senderId) {
|
|
26
23
|
const {
|
|
27
24
|
sender
|
|
28
|
-
} = await
|
|
25
|
+
} = await api.get(`${routing.senderAddressesUrl}/${senderId}`);
|
|
29
26
|
return sender;
|
|
30
27
|
}
|
|
31
|
-
async update(senderId, payload) {
|
|
28
|
+
async function update(senderId, payload) {
|
|
32
29
|
const {
|
|
33
30
|
sender
|
|
34
|
-
} = await
|
|
31
|
+
} = await api.patch(`${routing.senderAddressesUrl}/${senderId}`, {
|
|
35
32
|
payload
|
|
36
33
|
});
|
|
37
34
|
return sender;
|
|
38
35
|
}
|
|
39
|
-
async
|
|
40
|
-
return
|
|
36
|
+
async function doDelete(senderId) {
|
|
37
|
+
return api.delete(`${routing.senderAddressesUrl}/${senderId}`);
|
|
41
38
|
}
|
|
39
|
+
return {
|
|
40
|
+
list,
|
|
41
|
+
create,
|
|
42
|
+
get,
|
|
43
|
+
update,
|
|
44
|
+
delete: doDelete
|
|
45
|
+
};
|
|
42
46
|
}
|
|
@@ -3,47 +3,50 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.createClient = createClient;
|
|
7
7
|
var _routing = require("../../routing.cjs");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.apiClient = apiClient;
|
|
11
|
-
}
|
|
12
|
-
async list() {
|
|
8
|
+
function createClient(api) {
|
|
9
|
+
async function list() {
|
|
13
10
|
const url = _routing.routing.snippetsUrl;
|
|
14
11
|
const {
|
|
15
12
|
snippets
|
|
16
|
-
} = await
|
|
13
|
+
} = await api.get(url);
|
|
17
14
|
return snippets;
|
|
18
15
|
}
|
|
19
|
-
async get(snippetId) {
|
|
16
|
+
async function get(snippetId) {
|
|
20
17
|
const url = _routing.routing.snippetsUrl;
|
|
21
18
|
const {
|
|
22
19
|
snippet
|
|
23
|
-
} = await
|
|
20
|
+
} = await api.get(`${url}/${snippetId}`);
|
|
24
21
|
return snippet;
|
|
25
22
|
}
|
|
26
|
-
async create(payload) {
|
|
23
|
+
async function create(payload) {
|
|
27
24
|
const url = _routing.routing.snippetsUrl;
|
|
28
25
|
const {
|
|
29
26
|
snippet
|
|
30
|
-
} = await
|
|
27
|
+
} = await api.post(url, {
|
|
31
28
|
payload
|
|
32
29
|
});
|
|
33
30
|
return snippet;
|
|
34
31
|
}
|
|
35
|
-
async update(snippetId, payload) {
|
|
32
|
+
async function update(snippetId, payload) {
|
|
36
33
|
const url = _routing.routing.snippetsUrl;
|
|
37
34
|
const {
|
|
38
35
|
snippet
|
|
39
|
-
} = await
|
|
36
|
+
} = await api.patch(`${url}/${snippetId}`, {
|
|
40
37
|
payload
|
|
41
38
|
});
|
|
42
39
|
return snippet;
|
|
43
40
|
}
|
|
44
|
-
async
|
|
41
|
+
async function doDelete(snippetId) {
|
|
45
42
|
const url = _routing.routing.snippetsUrl;
|
|
46
|
-
return
|
|
43
|
+
return api.delete(`${url}/${snippetId}`);
|
|
47
44
|
}
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
return {
|
|
46
|
+
list,
|
|
47
|
+
get,
|
|
48
|
+
create,
|
|
49
|
+
update,
|
|
50
|
+
delete: doDelete
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -2,13 +2,12 @@ import type { DeferredJobsApiClient } from '../../api';
|
|
|
2
2
|
import type { Snippet } from '../../types';
|
|
3
3
|
import type { CreateRequest, UpdateRequest } from './types';
|
|
4
4
|
type SnippetId = Snippet['uuid'] | Snippet['id'];
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
export type Client = ReturnType<typeof createClient>;
|
|
6
|
+
export declare function createClient(api: DeferredJobsApiClient): {
|
|
7
|
+
list: () => Promise<Snippet[]>;
|
|
8
|
+
get: (snippetId: SnippetId) => Promise<Snippet>;
|
|
9
|
+
create: (payload: CreateRequest) => Promise<Snippet>;
|
|
10
|
+
update: (snippetId: SnippetId, payload: UpdateRequest) => Promise<Snippet>;
|
|
11
|
+
delete: (snippetId: SnippetId) => Promise<void>;
|
|
12
|
+
};
|
|
14
13
|
export {};
|
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
import { routing } from "../../routing.js";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
this.apiClient = apiClient;
|
|
5
|
-
}
|
|
6
|
-
async list() {
|
|
2
|
+
export function createClient(api) {
|
|
3
|
+
async function list() {
|
|
7
4
|
const url = routing.snippetsUrl;
|
|
8
5
|
const {
|
|
9
6
|
snippets
|
|
10
|
-
} = await
|
|
7
|
+
} = await api.get(url);
|
|
11
8
|
return snippets;
|
|
12
9
|
}
|
|
13
|
-
async get(snippetId) {
|
|
10
|
+
async function get(snippetId) {
|
|
14
11
|
const url = routing.snippetsUrl;
|
|
15
12
|
const {
|
|
16
13
|
snippet
|
|
17
|
-
} = await
|
|
14
|
+
} = await api.get(`${url}/${snippetId}`);
|
|
18
15
|
return snippet;
|
|
19
16
|
}
|
|
20
|
-
async create(payload) {
|
|
17
|
+
async function create(payload) {
|
|
21
18
|
const url = routing.snippetsUrl;
|
|
22
19
|
const {
|
|
23
20
|
snippet
|
|
24
|
-
} = await
|
|
21
|
+
} = await api.post(url, {
|
|
25
22
|
payload
|
|
26
23
|
});
|
|
27
24
|
return snippet;
|
|
28
25
|
}
|
|
29
|
-
async update(snippetId, payload) {
|
|
26
|
+
async function update(snippetId, payload) {
|
|
30
27
|
const url = routing.snippetsUrl;
|
|
31
28
|
const {
|
|
32
29
|
snippet
|
|
33
|
-
} = await
|
|
30
|
+
} = await api.patch(`${url}/${snippetId}`, {
|
|
34
31
|
payload
|
|
35
32
|
});
|
|
36
33
|
return snippet;
|
|
37
34
|
}
|
|
38
|
-
async
|
|
35
|
+
async function doDelete(snippetId) {
|
|
39
36
|
const url = routing.snippetsUrl;
|
|
40
|
-
return
|
|
37
|
+
return api.delete(`${url}/${snippetId}`);
|
|
41
38
|
}
|
|
39
|
+
return {
|
|
40
|
+
list,
|
|
41
|
+
get,
|
|
42
|
+
create,
|
|
43
|
+
update,
|
|
44
|
+
delete: doDelete
|
|
45
|
+
};
|
|
42
46
|
}
|