@d19n/youfibre-odin-sdk 2.0.78 → 2.0.81
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/README.md +2 -1
- package/dist/actions-v2/SendDirectDebitCreatedEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitFailedEmailDto.d.ts +121 -0
- package/dist/actions-v2/SendDirectDebitFailedEmailDto.js +59 -0
- package/dist/actions-v2/SendDirectDebitSetupConfirmationEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendRefundTransactionEmailDto.d.ts +8 -1
- package/dist/api-sdk-v2/FileApi.d.ts +122 -122
- package/dist/api-sdk-v2/FileApi.js +247 -247
- package/dist/api-sdk-v2/ProductApi.d.ts +2 -2
- package/dist/api-sdk-v2/ProductApi.js +6 -6
- package/dist/api-sdk-v2/ServiceApi.d.ts +2 -2
- package/dist/api-sdk-v2/ServiceApi.js +6 -6
- package/dist/db-sdk-v2/FileDb.d.ts +122 -122
- package/dist/db-sdk-v2/FileDb.js +247 -247
- package/dist/db-sdk-v2/ProductDb.d.ts +2 -2
- package/dist/db-sdk-v2/ProductDb.js +6 -6
- package/dist/db-sdk-v2/ServiceDb.d.ts +2 -2
- package/dist/db-sdk-v2/ServiceDb.js +6 -6
- package/dist/entities-v2/File.d.ts +6 -0
- package/dist/entities-v2/File.js +5 -1
- package/dist/entities-v2/PaymentMethod.d.ts +10 -1
- package/dist/entities-v2/PaymentMethod.js +2 -0
- package/dist/entities-v2/Product.d.ts +7 -7
- package/dist/entities-v2/Product.js +6 -6
- package/dist/entities-v2/Service.d.ts +2 -2
- package/dist/records-v2/EmailRecord.d.ts +29 -0
- package/dist/records-v2/EmailRecord.js +36 -0
- package/dist/records-v2/ProductRecord.d.ts +20 -20
- package/dist/records-v2/ProductRecord.js +33 -33
- package/dist/records-v2/ServiceRecord.d.ts +19 -19
- package/dist/records-v2/ServiceRecord.js +32 -32
- package/package.json +1 -1
|
@@ -141,36 +141,6 @@ class ServiceRecord {
|
|
|
141
141
|
get groups() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.groups) || []; }
|
|
142
142
|
/** Access the underlying OdinRecord (null for new records) */
|
|
143
143
|
get record() { return this._record; }
|
|
144
|
-
/**
|
|
145
|
-
* Access linked Product records
|
|
146
|
-
* @remarks Available labels: Product__Service
|
|
147
|
-
* @throws Error if called on a new (unsaved) record
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* // Get all linked Product records
|
|
152
|
-
* const items = await record.products.list();
|
|
153
|
-
* const first = await record.products.first();
|
|
154
|
-
*
|
|
155
|
-
* // Filter by label
|
|
156
|
-
* const specific = await record.products.first({ label: 'Product__Service' });
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
get products() {
|
|
160
|
-
var _a;
|
|
161
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
162
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
163
|
-
if (!this._products) {
|
|
164
|
-
this._products = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
165
|
-
sourceEntity: 'ServiceModule:Service',
|
|
166
|
-
targetEntity: 'ProductModule:Product',
|
|
167
|
-
targetModuleName: 'ProductModule',
|
|
168
|
-
targetEntityName: 'Product',
|
|
169
|
-
labels: ['Product__Service'],
|
|
170
|
-
}, ProductRecord_1.ProductRecord);
|
|
171
|
-
}
|
|
172
|
-
return this._products;
|
|
173
|
-
}
|
|
174
144
|
/**
|
|
175
145
|
* Access linked Service records
|
|
176
146
|
* @remarks Available labels: Service__Service
|
|
@@ -201,6 +171,36 @@ class ServiceRecord {
|
|
|
201
171
|
}
|
|
202
172
|
return this._services;
|
|
203
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Access linked Product records
|
|
176
|
+
* @remarks Available labels: Product__Service
|
|
177
|
+
* @throws Error if called on a new (unsaved) record
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* // Get all linked Product records
|
|
182
|
+
* const items = await record.products.list();
|
|
183
|
+
* const first = await record.products.first();
|
|
184
|
+
*
|
|
185
|
+
* // Filter by label
|
|
186
|
+
* const specific = await record.products.first({ label: 'Product__Service' });
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
get products() {
|
|
190
|
+
var _a;
|
|
191
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
192
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
193
|
+
if (!this._products) {
|
|
194
|
+
this._products = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
195
|
+
sourceEntity: 'ServiceModule:Service',
|
|
196
|
+
targetEntity: 'ProductModule:Product',
|
|
197
|
+
targetModuleName: 'ProductModule',
|
|
198
|
+
targetEntityName: 'Product',
|
|
199
|
+
labels: ['Product__Service'],
|
|
200
|
+
}, ProductRecord_1.ProductRecord);
|
|
201
|
+
}
|
|
202
|
+
return this._products;
|
|
203
|
+
}
|
|
204
204
|
// ============================================
|
|
205
205
|
// LINK MANAGEMENT
|
|
206
206
|
// ============================================
|
|
@@ -273,10 +273,10 @@ exports.ServiceRecord = ServiceRecord;
|
|
|
273
273
|
// ============================================
|
|
274
274
|
// TYPED LINK ACCESSORS
|
|
275
275
|
// ============================================
|
|
276
|
-
/** Valid labels for Product associations */
|
|
277
|
-
ServiceRecord.productsLabels = ['Product__Service'];
|
|
278
276
|
/** Valid labels for Service associations */
|
|
279
277
|
ServiceRecord.servicesLabels = ['Service__Service'];
|
|
278
|
+
/** Valid labels for Product associations */
|
|
279
|
+
ServiceRecord.productsLabels = ['Product__Service'];
|
|
280
280
|
/** Type guard to check if an object is a ServiceRecord */
|
|
281
281
|
function isServiceRecord(obj) {
|
|
282
282
|
return obj instanceof ServiceRecord;
|