@campfire-interactive/master-data-client 5.18.0 → 5.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.
@@ -1,132 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RateLibraryResource = void 0;
4
- class RateEntryResource {
5
- http;
6
- constructor(http) {
7
- this.http = http;
8
- }
9
- async list(libraryId, options = {}) {
10
- const query = {};
11
- if (options.kind)
12
- query.kind = options.kind;
13
- return this.http.request({
14
- method: 'GET',
15
- path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries`,
16
- query,
17
- });
18
- }
19
- async create(libraryId, input, idempotencyKey) {
20
- return this.http.request({
21
- method: 'POST',
22
- path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries`,
23
- body: input,
24
- idempotencyKey,
25
- });
26
- }
27
- async update(libraryId, entryId, input, idempotencyKey) {
28
- return this.http.request({
29
- method: 'PUT',
30
- path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries/${encodeURIComponent(entryId)}`,
31
- body: input,
32
- idempotencyKey,
33
- });
34
- }
35
- async remove(libraryId, entryId) {
36
- await this.http.request({
37
- method: 'DELETE',
38
- path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries/${encodeURIComponent(entryId)}`,
39
- });
40
- }
41
- }
42
- class RateLibraryResource {
43
- http;
44
- entries;
45
- constructor(http) {
46
- this.http = http;
47
- this.entries = new RateEntryResource(http);
48
- }
49
- async list(options) {
50
- const query = {};
51
- if (options) {
52
- if (options.limit !== undefined)
53
- query.limit = String(options.limit);
54
- if (options.cursor)
55
- query.cursor = options.cursor;
56
- if (options.sort)
57
- query.sort = options.sort;
58
- if (options.q)
59
- query.q = options.q;
60
- if (options.status)
61
- query.status = options.status;
62
- if (options.asOf)
63
- query.asOf = options.asOf;
64
- if (options.code)
65
- query.code = options.code;
66
- if (options.currency)
67
- query.currency = options.currency;
68
- }
69
- return this.http.request({
70
- method: 'GET',
71
- path: '/v1/rate-libraries',
72
- query,
73
- });
74
- }
75
- async get(id, options) {
76
- const query = {};
77
- if (options?.include && options.include.length > 0) {
78
- query.include = options.include.join(',');
79
- }
80
- return this.http.request({
81
- method: 'GET',
82
- path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
83
- query,
84
- });
85
- }
86
- async create(input, idempotencyKey) {
87
- return this.http.request({
88
- method: 'POST',
89
- path: '/v1/rate-libraries',
90
- body: input,
91
- idempotencyKey,
92
- });
93
- }
94
- async update(id, input, idempotencyKey) {
95
- return this.http.request({
96
- method: 'PUT',
97
- path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
98
- body: input,
99
- idempotencyKey,
100
- });
101
- }
102
- async publish(id, idempotencyKey) {
103
- return this.http.request({
104
- method: 'POST',
105
- path: `/v1/rate-libraries/${encodeURIComponent(id)}/publish`,
106
- body: {},
107
- idempotencyKey,
108
- });
109
- }
110
- async archive(id) {
111
- await this.http.request({
112
- method: 'DELETE',
113
- path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
114
- });
115
- }
116
- async fork(id, idempotencyKey) {
117
- return this.http.request({
118
- method: 'POST',
119
- path: `/v1/rate-libraries/${encodeURIComponent(id)}/fork`,
120
- body: {},
121
- idempotencyKey,
122
- });
123
- }
124
- async getAudit(id) {
125
- return this.http.request({
126
- method: 'GET',
127
- path: `/v1/rate-libraries/${encodeURIComponent(id)}/audit`,
128
- });
129
- }
130
- }
131
- exports.RateLibraryResource = RateLibraryResource;
132
- //# sourceMappingURL=rateLibraries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rateLibraries.js","sourceRoot":"","sources":["../src/rateLibraries.ts"],"names":[],"mappings":";;;AAkBA,MAAM,iBAAiB;IACQ;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD,KAAK,CAAC,IAAI,CACR,SAAiB,EACjB,UAAkC,EAAE;QAEpC,MAAM,KAAK,GAAu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