@d19n/youfibre-odin-sdk 2.0.229 → 2.0.231

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.
Files changed (69) hide show
  1. package/README.md +19 -2
  2. package/dist/EntityRegistry.d.ts +2 -0
  3. package/dist/EntityRegistry.js +2 -0
  4. package/dist/OdinApiClient.d.ts +4 -0
  5. package/dist/OdinApiClient.js +8 -0
  6. package/dist/OdinDbClient.d.ts +4 -0
  7. package/dist/OdinDbClient.js +8 -0
  8. package/dist/accessors-v2/PgReportEventAccessor.d.ts +111 -0
  9. package/dist/accessors-v2/PgReportEventAccessor.js +190 -0
  10. package/dist/accessors-v2/index.d.ts +1 -0
  11. package/dist/accessors-v2/index.js +4 -2
  12. package/dist/actions-v2/CompletePicRequestDto.d.ts +13 -3
  13. package/dist/actions-v2/CompletePicRequestDto.js +2 -0
  14. package/dist/actions-v2/CompletePicRequestFlowDto.d.ts +11 -3
  15. package/dist/actions-v2/CreatePgReportEventDto.d.ts +135 -0
  16. package/dist/actions-v2/CreatePgReportEventDto.js +59 -0
  17. package/dist/actions-v2/MovePgReportEventToFailedDto.d.ts +117 -0
  18. package/dist/actions-v2/MovePgReportEventToFailedDto.js +82 -0
  19. package/dist/actions-v2/MovePgReportEventToSkippedDto.d.ts +117 -0
  20. package/dist/actions-v2/MovePgReportEventToSkippedDto.js +82 -0
  21. package/dist/actions-v2/MovePgReportEventToSucceededDto.d.ts +117 -0
  22. package/dist/actions-v2/MovePgReportEventToSucceededDto.js +82 -0
  23. package/dist/actions-v2/UpdateAdditionalCareDto.d.ts +2 -2
  24. package/dist/actions-v2/UpdateContactDto.d.ts +2 -2
  25. package/dist/actions-v2/UpdatePgReportEventDto.d.ts +95 -0
  26. package/dist/actions-v2/UpdatePgReportEventDto.js +56 -0
  27. package/dist/api-sdk-v2/PgDirectDebitFileApi.d.ts +2 -0
  28. package/dist/api-sdk-v2/PgDirectDebitFileApi.js +6 -0
  29. package/dist/api-sdk-v2/PgPaymentMethodApi.d.ts +2 -0
  30. package/dist/api-sdk-v2/PgPaymentMethodApi.js +6 -0
  31. package/dist/api-sdk-v2/PgReportEventApi.d.ts +52 -0
  32. package/dist/api-sdk-v2/PgReportEventApi.js +167 -0
  33. package/dist/api-sdk-v2/PgTransactionApi.d.ts +2 -0
  34. package/dist/api-sdk-v2/PgTransactionApi.js +6 -0
  35. package/dist/db-accessors-v2/PgReportEventDbAccessor.d.ts +149 -0
  36. package/dist/db-accessors-v2/PgReportEventDbAccessor.js +227 -0
  37. package/dist/db-accessors-v2/index.d.ts +1 -0
  38. package/dist/db-accessors-v2/index.js +4 -2
  39. package/dist/db-sdk-v2/PgDirectDebitFileDb.d.ts +2 -0
  40. package/dist/db-sdk-v2/PgDirectDebitFileDb.js +6 -0
  41. package/dist/db-sdk-v2/PgPaymentMethodDb.d.ts +2 -0
  42. package/dist/db-sdk-v2/PgPaymentMethodDb.js +6 -0
  43. package/dist/db-sdk-v2/PgReportEventDb.d.ts +124 -0
  44. package/dist/db-sdk-v2/PgReportEventDb.js +216 -0
  45. package/dist/db-sdk-v2/PgTransactionDb.d.ts +2 -0
  46. package/dist/db-sdk-v2/PgTransactionDb.js +6 -0
  47. package/dist/entities-v2/ChurnRequest.d.ts +4 -0
  48. package/dist/entities-v2/ChurnRequest.js +4 -0
  49. package/dist/entities-v2/Contact.d.ts +58 -72
  50. package/dist/entities-v2/Contact.js +40 -54
  51. package/dist/entities-v2/PgDirectDebitFile.d.ts +7 -0
  52. package/dist/entities-v2/PgDirectDebitFile.js +5 -1
  53. package/dist/entities-v2/PgPaymentMethod.d.ts +7 -0
  54. package/dist/entities-v2/PgPaymentMethod.js +5 -1
  55. package/dist/entities-v2/PgReportEvent.d.ts +194 -0
  56. package/dist/entities-v2/PgReportEvent.js +134 -0
  57. package/dist/entities-v2/PgTransaction.d.ts +7 -0
  58. package/dist/entities-v2/PgTransaction.js +5 -1
  59. package/dist/records-v2/PgDirectDebitFileRecord.d.ts +20 -0
  60. package/dist/records-v2/PgDirectDebitFileRecord.js +33 -0
  61. package/dist/records-v2/PgPaymentMethodRecord.d.ts +20 -0
  62. package/dist/records-v2/PgPaymentMethodRecord.js +33 -0
  63. package/dist/records-v2/PgReportEventRecord.d.ts +347 -0
  64. package/dist/records-v2/PgReportEventRecord.js +465 -0
  65. package/dist/records-v2/PgTransactionRecord.d.ts +20 -0
  66. package/dist/records-v2/PgTransactionRecord.js +33 -0
  67. package/dist/records-v2/index.d.ts +1 -0
  68. package/dist/records-v2/index.js +6 -3
  69. package/package.json +1 -1
package/README.md CHANGED
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
124
124
 
125
125
  ## Entities
126
126
 
127
- This SDK includes **169** entities across **12** modules.
127
+ This SDK includes **170** entities across **12** modules.
128
128
 
129
129
  ### CrmModule
130
130
 
@@ -172,6 +172,7 @@ This SDK includes **169** entities across **12** modules.
172
172
  | **PgDispute** | PgDispute Entity Definition | DEFAULT |
173
173
  | **PgFileAllocation** | PgFileAllocation Entity Definition | REPORT, SUBMISSION |
174
174
  | **PgPaymentMethod** | PgPaymentMethod Entity Definition | DEFAULT |
175
+ | **PgReportEvent** | PgReportEvent Entity Definition | DEFAULT |
175
176
  | **PgSortCodeSubstitution** | PgSortCodeSubstitution Entity Definition | DEFAULT |
176
177
  | **PgTransaction** | PgTransaction Entity Definition | CHARGE, REFUND |
177
178
  | **PgVocalink** | PgVocalink Entity Definition | DEFAULT |
@@ -357,7 +358,7 @@ This SDK includes **169** entities across **12** modules.
357
358
 
358
359
  ## Actions
359
360
 
360
- This SDK includes **732** actions.
361
+ This SDK includes **737** actions.
361
362
 
362
363
  ### Action Types
363
364
 
@@ -1686,6 +1687,22 @@ This SDK includes **732** actions.
1686
1687
 
1687
1688
  **MovePgPaymentMethodToValidated Target Stages:** `StatusStageValidated`
1688
1689
 
1690
+ #### PgReportEvent
1691
+
1692
+ | Action | Type | Event |
1693
+ |--------|------|-------|
1694
+ | `CreatePgReportEvent` | CREATE | k1.t-hEOJjsDb.BillingModule.PgReportEvent.Create.CreatePgReportEvent |
1695
+ | `MovePgReportEventToFailed` | STAGE_TRANSITION | k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed |
1696
+ | `MovePgReportEventToSkipped` | STAGE_TRANSITION | k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSkipped |
1697
+ | `MovePgReportEventToSucceeded` | STAGE_TRANSITION | k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded |
1698
+ | `UpdatePgReportEvent` | UPDATE | k1.t-hEOJjsDb.BillingModule.PgReportEvent.Update.UpdatePgReportEvent |
1699
+
1700
+ **MovePgReportEventToFailed Target Stages:** `EventStatusStageFailed`
1701
+
1702
+ **MovePgReportEventToSkipped Target Stages:** `EventStatusStageSkipped`
1703
+
1704
+ **MovePgReportEventToSucceeded Target Stages:** `EventStatusStageSucceeded`
1705
+
1689
1706
  #### PgDirectDebitFile
1690
1707
 
1691
1708
  | Action | Type | Event |
@@ -84,6 +84,7 @@ import { PgDisputeAccessor } from './accessors-v2/PgDisputeAccessor';
84
84
  import { PgFileAllocationAccessor } from './accessors-v2/PgFileAllocationAccessor';
85
85
  import { PgLogAccessor } from './accessors-v2/PgLogAccessor';
86
86
  import { PgPaymentMethodAccessor } from './accessors-v2/PgPaymentMethodAccessor';
87
+ import { PgReportEventAccessor } from './accessors-v2/PgReportEventAccessor';
87
88
  import { PgSortCodeSubstitutionAccessor } from './accessors-v2/PgSortCodeSubstitutionAccessor';
88
89
  import { PgTransactionAccessor } from './accessors-v2/PgTransactionAccessor';
89
90
  import { PgVocalinkAccessor } from './accessors-v2/PgVocalinkAccessor';
@@ -195,6 +196,7 @@ export declare const EntityRegistry: {
195
196
  readonly PgFileAllocation: typeof PgFileAllocationAccessor;
196
197
  readonly PgLog: typeof PgLogAccessor;
197
198
  readonly PgPaymentMethod: typeof PgPaymentMethodAccessor;
199
+ readonly PgReportEvent: typeof PgReportEventAccessor;
198
200
  readonly PgSortCodeSubstitution: typeof PgSortCodeSubstitutionAccessor;
199
201
  readonly PgTransaction: typeof PgTransactionAccessor;
200
202
  readonly PgVocalink: typeof PgVocalinkAccessor;
@@ -87,6 +87,7 @@ const PgDisputeAccessor_1 = require("./accessors-v2/PgDisputeAccessor");
87
87
  const PgFileAllocationAccessor_1 = require("./accessors-v2/PgFileAllocationAccessor");
88
88
  const PgLogAccessor_1 = require("./accessors-v2/PgLogAccessor");
89
89
  const PgPaymentMethodAccessor_1 = require("./accessors-v2/PgPaymentMethodAccessor");
90
+ const PgReportEventAccessor_1 = require("./accessors-v2/PgReportEventAccessor");
90
91
  const PgSortCodeSubstitutionAccessor_1 = require("./accessors-v2/PgSortCodeSubstitutionAccessor");
91
92
  const PgTransactionAccessor_1 = require("./accessors-v2/PgTransactionAccessor");
92
93
  const PgVocalinkAccessor_1 = require("./accessors-v2/PgVocalinkAccessor");
@@ -198,6 +199,7 @@ exports.EntityRegistry = {
198
199
  'PgFileAllocation': PgFileAllocationAccessor_1.PgFileAllocationAccessor,
199
200
  'PgLog': PgLogAccessor_1.PgLogAccessor,
200
201
  'PgPaymentMethod': PgPaymentMethodAccessor_1.PgPaymentMethodAccessor,
202
+ 'PgReportEvent': PgReportEventAccessor_1.PgReportEventAccessor,
201
203
  'PgSortCodeSubstitution': PgSortCodeSubstitutionAccessor_1.PgSortCodeSubstitutionAccessor,
202
204
  'PgTransaction': PgTransactionAccessor_1.PgTransactionAccessor,
203
205
  'PgVocalink': PgVocalinkAccessor_1.PgVocalinkAccessor,
@@ -94,6 +94,7 @@ import { PgDisputeAccessor } from './accessors-v2/PgDisputeAccessor';
94
94
  import { PgFileAllocationAccessor } from './accessors-v2/PgFileAllocationAccessor';
95
95
  import { PgLogAccessor } from './accessors-v2/PgLogAccessor';
96
96
  import { PgPaymentMethodAccessor } from './accessors-v2/PgPaymentMethodAccessor';
97
+ import { PgReportEventAccessor } from './accessors-v2/PgReportEventAccessor';
97
98
  import { PgSortCodeSubstitutionAccessor } from './accessors-v2/PgSortCodeSubstitutionAccessor';
98
99
  import { PgTransactionAccessor } from './accessors-v2/PgTransactionAccessor';
99
100
  import { PgVocalinkAccessor } from './accessors-v2/PgVocalinkAccessor';
@@ -214,6 +215,7 @@ export declare class OdinApiClient {
214
215
  private _pgFileAllocations?;
215
216
  private _pgLogs?;
216
217
  private _pgPaymentMethods?;
218
+ private _pgReportEvents?;
217
219
  private _pgSortCodeSubstitutions?;
218
220
  private _pgTransactions?;
219
221
  private _pgVocalinks?;
@@ -408,6 +410,8 @@ export declare class OdinApiClient {
408
410
  get pgLogs(): PgLogAccessor;
409
411
  /** Access PgPaymentMethod records */
410
412
  get pgPaymentMethods(): PgPaymentMethodAccessor;
413
+ /** Access PgReportEvent records */
414
+ get pgReportEvents(): PgReportEventAccessor;
411
415
  /** Access PgSortCodeSubstitution records */
412
416
  get pgSortCodeSubstitutions(): PgSortCodeSubstitutionAccessor;
413
417
  /** Access PgTransaction records */
@@ -105,6 +105,7 @@ const PgDisputeAccessor_1 = require("./accessors-v2/PgDisputeAccessor");
105
105
  const PgFileAllocationAccessor_1 = require("./accessors-v2/PgFileAllocationAccessor");
106
106
  const PgLogAccessor_1 = require("./accessors-v2/PgLogAccessor");
107
107
  const PgPaymentMethodAccessor_1 = require("./accessors-v2/PgPaymentMethodAccessor");
108
+ const PgReportEventAccessor_1 = require("./accessors-v2/PgReportEventAccessor");
108
109
  const PgSortCodeSubstitutionAccessor_1 = require("./accessors-v2/PgSortCodeSubstitutionAccessor");
109
110
  const PgTransactionAccessor_1 = require("./accessors-v2/PgTransactionAccessor");
110
111
  const PgVocalinkAccessor_1 = require("./accessors-v2/PgVocalinkAccessor");
@@ -681,6 +682,13 @@ class OdinApiClient {
681
682
  }
682
683
  return this._pgPaymentMethods;
683
684
  }
685
+ /** Access PgReportEvent records */
686
+ get pgReportEvents() {
687
+ if (!this._pgReportEvents) {
688
+ this._pgReportEvents = new PgReportEventAccessor_1.PgReportEventAccessor(this._provider);
689
+ }
690
+ return this._pgReportEvents;
691
+ }
684
692
  /** Access PgSortCodeSubstitution records */
685
693
  get pgSortCodeSubstitutions() {
686
694
  if (!this._pgSortCodeSubstitutions) {
@@ -101,6 +101,7 @@ import { PgDisputeDbAccessor } from './db-accessors-v2/PgDisputeDbAccessor';
101
101
  import { PgFileAllocationDbAccessor } from './db-accessors-v2/PgFileAllocationDbAccessor';
102
102
  import { PgLogDbAccessor } from './db-accessors-v2/PgLogDbAccessor';
103
103
  import { PgPaymentMethodDbAccessor } from './db-accessors-v2/PgPaymentMethodDbAccessor';
104
+ import { PgReportEventDbAccessor } from './db-accessors-v2/PgReportEventDbAccessor';
104
105
  import { PgSortCodeSubstitutionDbAccessor } from './db-accessors-v2/PgSortCodeSubstitutionDbAccessor';
105
106
  import { PgTransactionDbAccessor } from './db-accessors-v2/PgTransactionDbAccessor';
106
107
  import { PgVocalinkDbAccessor } from './db-accessors-v2/PgVocalinkDbAccessor';
@@ -215,6 +216,7 @@ export declare class OdinDbClient {
215
216
  private _pgFileAllocations?;
216
217
  private _pgLogs?;
217
218
  private _pgPaymentMethods?;
219
+ private _pgReportEvents?;
218
220
  private _pgSortCodeSubstitutions?;
219
221
  private _pgTransactions?;
220
222
  private _pgVocalinks?;
@@ -418,6 +420,8 @@ export declare class OdinDbClient {
418
420
  get pgLogs(): PgLogDbAccessor;
419
421
  /** Access PgPaymentMethod records */
420
422
  get pgPaymentMethods(): PgPaymentMethodDbAccessor;
423
+ /** Access PgReportEvent records */
424
+ get pgReportEvents(): PgReportEventDbAccessor;
421
425
  /** Access PgSortCodeSubstitution records */
422
426
  get pgSortCodeSubstitutions(): PgSortCodeSubstitutionDbAccessor;
423
427
  /** Access PgTransaction records */
@@ -103,6 +103,7 @@ const PgDisputeDbAccessor_1 = require("./db-accessors-v2/PgDisputeDbAccessor");
103
103
  const PgFileAllocationDbAccessor_1 = require("./db-accessors-v2/PgFileAllocationDbAccessor");
104
104
  const PgLogDbAccessor_1 = require("./db-accessors-v2/PgLogDbAccessor");
105
105
  const PgPaymentMethodDbAccessor_1 = require("./db-accessors-v2/PgPaymentMethodDbAccessor");
106
+ const PgReportEventDbAccessor_1 = require("./db-accessors-v2/PgReportEventDbAccessor");
106
107
  const PgSortCodeSubstitutionDbAccessor_1 = require("./db-accessors-v2/PgSortCodeSubstitutionDbAccessor");
107
108
  const PgTransactionDbAccessor_1 = require("./db-accessors-v2/PgTransactionDbAccessor");
108
109
  const PgVocalinkDbAccessor_1 = require("./db-accessors-v2/PgVocalinkDbAccessor");
@@ -682,6 +683,13 @@ class OdinDbClient {
682
683
  }
683
684
  return this._pgPaymentMethods;
684
685
  }
686
+ /** Access PgReportEvent records */
687
+ get pgReportEvents() {
688
+ if (!this._pgReportEvents) {
689
+ this._pgReportEvents = new PgReportEventDbAccessor_1.PgReportEventDbAccessor(this._principal, this._dbService, this._defaultOptions);
690
+ }
691
+ return this._pgReportEvents;
692
+ }
685
693
  /** Access PgSortCodeSubstitution records */
686
694
  get pgSortCodeSubstitutions() {
687
695
  if (!this._pgSortCodeSubstitutions) {
@@ -0,0 +1,111 @@
1
+ /**
2
+ * PgReportEvent Accessor
3
+ *
4
+ * Provides typed access to PgReportEvent records via API.
5
+ * Returns wrapped records with typed action methods.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Get existing record
10
+ * const record = await accessor.get(id);
11
+ * await record.updatePgReportEvent({ ... });
12
+ *
13
+ * // Create new record
14
+ * const newRecord = accessor.new();
15
+ * await newRecord.createPgReportEvent({ ... });
16
+ * ```
17
+ *
18
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
+ */
20
+ import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
21
+ import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
22
+ import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
23
+ import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
24
+ import { PgReportEventProperties } from '../entities-v2/PgReportEvent';
25
+ import { PgReportEventRecord } from '../records-v2/PgReportEventRecord';
26
+ /** List response with wrapped records */
27
+ export interface PgReportEventListResponse {
28
+ data: PgReportEventRecord[];
29
+ hasMore: boolean;
30
+ totalRecords: number;
31
+ }
32
+ /** Search response with wrapped records */
33
+ export interface PgReportEventSearchResponse {
34
+ records: PgReportEventRecord[];
35
+ totalRecords: number;
36
+ hasMore: boolean;
37
+ }
38
+ export declare class PgReportEventAccessor {
39
+ private readonly _provider;
40
+ private readonly _moduleName;
41
+ private readonly _entityName;
42
+ constructor(provider: ApiProvider);
43
+ constructor(authParams: OauthParams);
44
+ constructor(authToken: string, host?: string);
45
+ get moduleName(): string;
46
+ get entityName(): string;
47
+ /**
48
+ * Create a new empty PgReportEvent record instance for create operations.
49
+ * Pre-generates an ID that can be referenced before the record is saved.
50
+ *
51
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
52
+ * @returns A new record wrapper with pre-generated ID
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * // Auto-generated ID
57
+ * const note = odinClient.notes.new();
58
+ * console.log(note.id); // UUID available immediately
59
+ *
60
+ * // Custom ID
61
+ * const order = odinClient.orders.new("custom-id-123");
62
+ *
63
+ * // Reference ID before save
64
+ * const account = odinClient.accounts.new();
65
+ * const contact = odinClient.contacts.new();
66
+ * await contact
67
+ * .link({ id: account.id, entity: "CrmModule:Account" })
68
+ * .createContact({ FirstName: "John" });
69
+ * ```
70
+ */
71
+ new(id?: string): PgReportEventRecord;
72
+ /**
73
+ * Get a single PgReportEvent record by ID
74
+ */
75
+ get(id: string): Promise<PgReportEventRecord>;
76
+ /**
77
+ * Get multiple PgReportEvent records by IDs
78
+ */
79
+ getMany(ids: string[]): Promise<PgReportEventRecord[]>;
80
+ /**
81
+ * Search PgReportEvent records
82
+ */
83
+ search(params: Partial<OdinSearchV2>): Promise<PgReportEventSearchResponse>;
84
+ /**
85
+ * Search all PgReportEvent records with automatic pagination
86
+ */
87
+ searchAll(params: Partial<OdinSearchV2>): Promise<PgReportEventRecord[]>;
88
+ /**
89
+ * Async generator for paginating through all matching records.
90
+ * Yields batches of wrapped records.
91
+ */
92
+ paginate(params: Partial<OdinSearchV2>): AsyncGenerator<PgReportEventRecord[]>;
93
+ /**
94
+ * Create a fluent query builder for PgReportEvent records
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * const results = await accessor
99
+ * .query()
100
+ * .where('Status', 'in', ['Active', 'Pending'])
101
+ * .where('CreatedAt', 'gte', '2025-01-01')
102
+ * .select('id', 'title', 'properties.*')
103
+ * .sortBy('createdAt', 'desc')
104
+ * .limit(100)
105
+ * .execute();
106
+ * ```
107
+ */
108
+ query(): QueryBuilder<PgReportEventProperties, PgReportEventRecord>;
109
+ /** Access the underlying ApiProvider */
110
+ get provider(): ApiProvider;
111
+ }
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ /**
3
+ * PgReportEvent Accessor
4
+ *
5
+ * Provides typed access to PgReportEvent records via API.
6
+ * Returns wrapped records with typed action methods.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Get existing record
11
+ * const record = await accessor.get(id);
12
+ * await record.updatePgReportEvent({ ... });
13
+ *
14
+ * // Create new record
15
+ * const newRecord = accessor.new();
16
+ * await newRecord.createPgReportEvent({ ... });
17
+ * ```
18
+ *
19
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
20
+ */
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
31
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
32
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
33
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
34
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
35
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
36
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
37
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
38
+ function fulfill(value) { resume("next", value); }
39
+ function reject(value) { resume("throw", value); }
40
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.PgReportEventAccessor = void 0;
44
+ const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
45
+ const query_builder_1 = require("@d19n/odin-sdk-generator/dist/query-builder");
46
+ const PgReportEventRecord_1 = require("../records-v2/PgReportEventRecord");
47
+ class PgReportEventAccessor {
48
+ constructor(providerOrAuth, host) {
49
+ this._moduleName = 'BillingModule';
50
+ this._entityName = 'PgReportEvent';
51
+ if (providerOrAuth instanceof api_provider_1.ApiProvider) {
52
+ this._provider = providerOrAuth;
53
+ }
54
+ else if (typeof providerOrAuth === 'string') {
55
+ // Auth token provided
56
+ this._provider = new api_provider_1.ApiProvider(host ? { host } : undefined, providerOrAuth);
57
+ }
58
+ else {
59
+ // OauthParams provided
60
+ this._provider = new api_provider_1.ApiProvider(providerOrAuth);
61
+ }
62
+ }
63
+ get moduleName() { return this._moduleName; }
64
+ get entityName() { return this._entityName; }
65
+ // ============================================
66
+ // RECORD CREATION
67
+ // ============================================
68
+ /**
69
+ * Create a new empty PgReportEvent record instance for create operations.
70
+ * Pre-generates an ID that can be referenced before the record is saved.
71
+ *
72
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
73
+ * @returns A new record wrapper with pre-generated ID
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * // Auto-generated ID
78
+ * const note = odinClient.notes.new();
79
+ * console.log(note.id); // UUID available immediately
80
+ *
81
+ * // Custom ID
82
+ * const order = odinClient.orders.new("custom-id-123");
83
+ *
84
+ * // Reference ID before save
85
+ * const account = odinClient.accounts.new();
86
+ * const contact = odinClient.contacts.new();
87
+ * await contact
88
+ * .link({ id: account.id, entity: "CrmModule:Account" })
89
+ * .createContact({ FirstName: "John" });
90
+ * ```
91
+ */
92
+ new(id) {
93
+ return new PgReportEventRecord_1.PgReportEventRecord(null, this._provider, id);
94
+ }
95
+ // ============================================
96
+ // RECORD RETRIEVAL
97
+ // ============================================
98
+ /**
99
+ * Get a single PgReportEvent record by ID
100
+ */
101
+ get(id) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const record = yield this._provider._getByPrimaryKey(this._moduleName, this._entityName, id);
104
+ return new PgReportEventRecord_1.PgReportEventRecord(record, this._provider);
105
+ });
106
+ }
107
+ /**
108
+ * Get multiple PgReportEvent records by IDs
109
+ */
110
+ getMany(ids) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (ids.length === 0)
113
+ return [];
114
+ const records = yield this._provider._getManyByPrimaryKey(this._moduleName, this._entityName, ids);
115
+ return records.map((r) => new PgReportEventRecord_1.PgReportEventRecord(r, this._provider));
116
+ });
117
+ }
118
+ // ============================================
119
+ // SEARCH OPERATIONS
120
+ // ============================================
121
+ /**
122
+ * Search PgReportEvent records
123
+ */
124
+ search(params) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const result = yield this._provider._searchRecords(this._moduleName, this._entityName, params);
127
+ return {
128
+ records: result.records.map((r) => new PgReportEventRecord_1.PgReportEventRecord(r, this._provider)),
129
+ totalRecords: result.totalRecords,
130
+ hasMore: result.hasMore,
131
+ };
132
+ });
133
+ }
134
+ /**
135
+ * Search all PgReportEvent records with automatic pagination
136
+ */
137
+ searchAll(params) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params);
140
+ return result.records.map((r) => new PgReportEventRecord_1.PgReportEventRecord(r, this._provider));
141
+ });
142
+ }
143
+ /**
144
+ * Async generator for paginating through all matching records.
145
+ * Yields batches of wrapped records.
146
+ */
147
+ paginate(params) {
148
+ var _a;
149
+ return __asyncGenerator(this, arguments, function* paginate_1() {
150
+ let hasMore = true;
151
+ let searchAfter;
152
+ const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
153
+ while (hasMore) {
154
+ const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) })));
155
+ if (result.records.length > 0) {
156
+ yield yield __await(result.records.map((r) => new PgReportEventRecord_1.PgReportEventRecord(r, this._provider)));
157
+ const lastRecord = result.records[result.records.length - 1];
158
+ searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
159
+ }
160
+ hasMore = result.hasMore && result.records.length >= query.pageSize;
161
+ }
162
+ });
163
+ }
164
+ // ============================================
165
+ // QUERY BUILDER
166
+ // ============================================
167
+ /**
168
+ * Create a fluent query builder for PgReportEvent records
169
+ *
170
+ * @example
171
+ * ```typescript
172
+ * const results = await accessor
173
+ * .query()
174
+ * .where('Status', 'in', ['Active', 'Pending'])
175
+ * .where('CreatedAt', 'gte', '2025-01-01')
176
+ * .select('id', 'title', 'properties.*')
177
+ * .sortBy('createdAt', 'desc')
178
+ * .limit(100)
179
+ * .execute();
180
+ * ```
181
+ */
182
+ query() {
183
+ return (0, query_builder_1.createQueryBuilder)(this);
184
+ }
185
+ /** Access the underlying ApiProvider */
186
+ get provider() {
187
+ return this._provider;
188
+ }
189
+ }
190
+ exports.PgReportEventAccessor = PgReportEventAccessor;
@@ -79,6 +79,7 @@ export { PgDisputeAccessor, PgDisputeSearchResponse, PgDisputeListResponse } fro
79
79
  export { PgFileAllocationAccessor, PgFileAllocationSearchResponse, PgFileAllocationListResponse } from './PgFileAllocationAccessor';
80
80
  export { PgLogAccessor, PgLogSearchResponse, PgLogListResponse } from './PgLogAccessor';
81
81
  export { PgPaymentMethodAccessor, PgPaymentMethodSearchResponse, PgPaymentMethodListResponse } from './PgPaymentMethodAccessor';
82
+ export { PgReportEventAccessor, PgReportEventSearchResponse, PgReportEventListResponse } from './PgReportEventAccessor';
82
83
  export { PgSortCodeSubstitutionAccessor, PgSortCodeSubstitutionSearchResponse, PgSortCodeSubstitutionListResponse } from './PgSortCodeSubstitutionAccessor';
83
84
  export { PgTransactionAccessor, PgTransactionSearchResponse, PgTransactionListResponse } from './PgTransactionAccessor';
84
85
  export { PgVocalinkAccessor, PgVocalinkSearchResponse, PgVocalinkListResponse } from './PgVocalinkAccessor';
@@ -9,8 +9,8 @@
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.OhExternalAuditAccessor = exports.OfferTemplateAccessor = exports.OfferAccessor = exports.NoteAccessor = exports.NetworkDeviceAccessor = exports.MessageAccessor = exports.LeadAccessor = exports.KnowledgeArticleAccessor = exports.InvoiceAccessor = exports.InvoiceItemAccessor = exports.ImpersonationTrackerAccessor = exports.FileAccessor = exports.FieldServiceProductAccessor = exports.FieldServiceDispatchedProductAccessor = exports.ExchangeAccessor = exports.EmailTemplateAccessor = exports.EmailSenderAccessor = exports.EmailAccessor = exports.DiscountAccessor = exports.CustomerPhonePortingAccessor = exports.CustomerDeviceRouterAccessor = exports.CustomerDeviceOntAccessor = exports.CustomerDeviceConfigurationAccessor = exports.CustomerDeviceAtaAccessor = exports.CrmDatasetAccessor = exports.CreditNoteAccessor = exports.ConversationSummaryFeedbackAccessor = exports.ConversationAccessor = exports.ContractBuyOutAccessor = exports.ContactAccessor = exports.ContactIdentityAccessor = exports.ConfigAccessor = exports.ChurnRequestAccessor = exports.ChangeReasonAccessor = exports.CaseAccessor = exports.CampaignAccessor = exports.CallAccessor = exports.CallLegAccessor = exports.BrskEntityMigrationErrorAccessor = exports.BngProvisionAccessor = exports.BillingRequestAccessor = exports.BillingAdjustmentAccessor = exports.AppointmentAccessor = exports.AffiliateCodeAccessor = exports.AddressAccessor = exports.AddressInteractionAccessor = exports.ActivityAccessor = exports.ActivityLogAccessor = exports.AccountAccessor = exports.AccountCreditAccessor = void 0;
12
- exports.TwilioTaskQueueAccessor = exports.TwilioCallEventAccessor = exports.TwilioActivityAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = exports.TeamAccessor = exports.SmsMessageAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.RegionAccessor = exports.ReferralAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = exports.PgPaymentMethodAccessor = exports.PgLogAccessor = exports.PgFileAllocationAccessor = exports.PgDisputeAccessor = exports.PgDirectDebitFileAccessor = exports.PgContactAccessor = exports.PgAccountValidationAccessor = exports.PermissionToFailAccessor = exports.PaymentAccessor = exports.PaymentMethodRefundAccessor = exports.PaymentMethodAccessor = exports.PICRequestAccessor = exports.OverlayRealA55Accessor = exports.OutboundDialSessionAccessor = exports.OutboundDialCampaignAccessor = exports.OutboundDialCampaignCaseAccessor = exports.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = void 0;
13
- exports.YfFieldServiceVisitAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgExternalAuditAccessor = exports.TwilioWorkerAccessor = exports.TwilioUserUpdateAccessor = void 0;
12
+ exports.TwilioCallEventAccessor = exports.TwilioActivityAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = exports.TeamAccessor = exports.SmsMessageAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.RegionAccessor = exports.ReferralAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = exports.PgReportEventAccessor = exports.PgPaymentMethodAccessor = exports.PgLogAccessor = exports.PgFileAllocationAccessor = exports.PgDisputeAccessor = exports.PgDirectDebitFileAccessor = exports.PgContactAccessor = exports.PgAccountValidationAccessor = exports.PermissionToFailAccessor = exports.PaymentAccessor = exports.PaymentMethodRefundAccessor = exports.PaymentMethodAccessor = exports.PICRequestAccessor = exports.OverlayRealA55Accessor = exports.OutboundDialSessionAccessor = exports.OutboundDialCampaignAccessor = exports.OutboundDialCampaignCaseAccessor = exports.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = void 0;
13
+ exports.YfFieldServiceVisitAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgExternalAuditAccessor = exports.TwilioWorkerAccessor = exports.TwilioUserUpdateAccessor = exports.TwilioTaskQueueAccessor = void 0;
14
14
  var AccountCreditAccessor_1 = require("./AccountCreditAccessor");
15
15
  Object.defineProperty(exports, "AccountCreditAccessor", { enumerable: true, get: function () { return AccountCreditAccessor_1.AccountCreditAccessor; } });
16
16
  var AccountAccessor_1 = require("./AccountAccessor");
@@ -157,6 +157,8 @@ var PgLogAccessor_1 = require("./PgLogAccessor");
157
157
  Object.defineProperty(exports, "PgLogAccessor", { enumerable: true, get: function () { return PgLogAccessor_1.PgLogAccessor; } });
158
158
  var PgPaymentMethodAccessor_1 = require("./PgPaymentMethodAccessor");
159
159
  Object.defineProperty(exports, "PgPaymentMethodAccessor", { enumerable: true, get: function () { return PgPaymentMethodAccessor_1.PgPaymentMethodAccessor; } });
160
+ var PgReportEventAccessor_1 = require("./PgReportEventAccessor");
161
+ Object.defineProperty(exports, "PgReportEventAccessor", { enumerable: true, get: function () { return PgReportEventAccessor_1.PgReportEventAccessor; } });
160
162
  var PgSortCodeSubstitutionAccessor_1 = require("./PgSortCodeSubstitutionAccessor");
161
163
  Object.defineProperty(exports, "PgSortCodeSubstitutionAccessor", { enumerable: true, get: function () { return PgSortCodeSubstitutionAccessor_1.PgSortCodeSubstitutionAccessor; } });
162
164
  var PgTransactionAccessor_1 = require("./PgTransactionAccessor");
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * CompletePICRequest Action DTO
3
3
  *
4
+ * CompletePICRequest
5
+ *
4
6
  * @module OrderModule
5
7
  * @entity PICRequest
6
8
  * @actionKey CompletePICRequest
@@ -19,10 +21,18 @@ export interface CompletePicRequestMessage extends OdinRecordUpdatedEvent<Comple
19
21
  /**
20
22
  * Properties for CompletePICRequest action
21
23
  *
22
- * @property Required fields: 1
24
+ * @property Required fields: 2
23
25
  * @property Optional fields: 4
24
26
  */
25
27
  export interface CompletePicRequestProperties {
28
+ /**
29
+ * reason
30
+ *
31
+ * the reason for the pre install cancellation request (Sales - PICRequest)
32
+ * @type {ENUM}
33
+ * @required
34
+ */
35
+ Reason: string;
26
36
  /**
27
37
  * Outcome
28
38
  *
@@ -43,14 +53,14 @@ export interface CompletePicRequestProperties {
43
53
  * Comparable Offer - Please add broadband price value.
44
54
  * @type {NUMBER}
45
55
  * @visibleWhen Outcome = ["LOST"]
46
- * @requiredWhen Outcome = ["LOST"]
56
+ * @requiredWhen Reason = ["C_02_DID_NOT_AGREE_ROUTE","C_04_REQUEST_TO_DELAY","C_05_RETENTION_OFFER_BY_PROVIDER","C_06_CBO_TOO_HIGH","C_07_CANT_AFFORD_MONTHLY_COST","C_08_OOH_SLOT_REQUIRED","C_09_POOR_CUSTOMER_EXPERIENCE","E_01_SLOT_MISSED_SUPPLIER","O_01_INCORRECT_PRODUCT_INFO","O_05_OVERSOLD_PROPOSITION"]
47
57
  */
48
58
  ComparableOffer?: number | null;
49
59
  /**
50
60
  * Winning Provider
51
61
  * @type {ENUM}
52
62
  * @visibleWhen Outcome = ["LOST"]
53
- * @requiredWhen Outcome = ["LOST"]
63
+ * @requiredWhen Reason = ["C_02_DID_NOT_AGREE_ROUTE","C_04_REQUEST_TO_DELAY","C_05_RETENTION_OFFER_BY_PROVIDER","C_06_CBO_TOO_HIGH","C_07_CANT_AFFORD_MONTHLY_COST","C_08_OOH_SLOT_REQUIRED","C_09_POOR_CUSTOMER_EXPERIENCE","E_01_SLOT_MISSED_SUPPLIER","O_01_INCORRECT_PRODUCT_INFO","O_05_OVERSOLD_PROPOSITION"]
54
64
  */
55
65
  WinningProvider?: string | null;
56
66
  /**
@@ -2,6 +2,8 @@
2
2
  /**
3
3
  * CompletePICRequest Action DTO
4
4
  *
5
+ * CompletePICRequest
6
+ *
5
7
  * @module OrderModule
6
8
  * @entity PICRequest
7
9
  * @actionKey CompletePICRequest
@@ -15,10 +15,18 @@ import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/o
15
15
  /**
16
16
  * Properties for CompletePICRequest action
17
17
  *
18
- * @property Required fields: 1
18
+ * @property Required fields: 2
19
19
  * @property Optional fields: 4
20
20
  */
21
21
  export interface CompletePicRequestProperties {
22
+ /**
23
+ * reason
24
+ *
25
+ * the reason for the pre install cancellation request (Sales - PICRequest)
26
+ * @type {ENUM}
27
+ * @required
28
+ */
29
+ Reason: string;
22
30
  /**
23
31
  * Outcome
24
32
  *
@@ -39,14 +47,14 @@ export interface CompletePicRequestProperties {
39
47
  * Comparable Offer - Please add broadband price value.
40
48
  * @type {NUMBER}
41
49
  * @visibleWhen Outcome = ["LOST"]
42
- * @requiredWhen Outcome = ["LOST"]
50
+ * @requiredWhen Reason = ["C_02_DID_NOT_AGREE_ROUTE","C_04_REQUEST_TO_DELAY","C_05_RETENTION_OFFER_BY_PROVIDER","C_06_CBO_TOO_HIGH","C_07_CANT_AFFORD_MONTHLY_COST","C_08_OOH_SLOT_REQUIRED","C_09_POOR_CUSTOMER_EXPERIENCE","E_01_SLOT_MISSED_SUPPLIER","O_01_INCORRECT_PRODUCT_INFO","O_05_OVERSOLD_PROPOSITION"]
43
51
  */
44
52
  ComparableOffer?: number | null;
45
53
  /**
46
54
  * Winning Provider
47
55
  * @type {ENUM}
48
56
  * @visibleWhen Outcome = ["LOST"]
49
- * @requiredWhen Outcome = ["LOST"]
57
+ * @requiredWhen Reason = ["C_02_DID_NOT_AGREE_ROUTE","C_04_REQUEST_TO_DELAY","C_05_RETENTION_OFFER_BY_PROVIDER","C_06_CBO_TOO_HIGH","C_07_CANT_AFFORD_MONTHLY_COST","C_08_OOH_SLOT_REQUIRED","C_09_POOR_CUSTOMER_EXPERIENCE","E_01_SLOT_MISSED_SUPPLIER","O_01_INCORRECT_PRODUCT_INFO","O_05_OVERSOLD_PROPOSITION"]
50
58
  */
51
59
  WinningProvider?: string | null;
52
60
  /**