@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
@@ -34,6 +34,7 @@ import { UpdatePgSubmissionProperties } from '../actions-v2/UpdatePgSubmissionDt
34
34
  import { FileRecord } from './FileRecord';
35
35
  import { PgFileAllocationRecord } from './PgFileAllocationRecord';
36
36
  import { PgDisputeRecord } from './PgDisputeRecord';
37
+ import { PgReportEventRecord } from './PgReportEventRecord';
37
38
  /** Valid entity types for PgDirectDebitFile */
38
39
  export declare type PgDirectDebitFileType = 'DEFAULT' | 'RESPONSE' | 'SUBMISSION';
39
40
  /**
@@ -102,6 +103,7 @@ export declare class PgDirectDebitFileRecord<TProps = PgDirectDebitFilePropertie
102
103
  private _files?;
103
104
  private _pgFileAllocations?;
104
105
  private _pgDisputes?;
106
+ private _pgReportEvents?;
105
107
  /**
106
108
  * Create a record wrapper.
107
109
  * @param record - The underlying record, or null for create operations
@@ -229,6 +231,24 @@ export declare class PgDirectDebitFileRecord<TProps = PgDirectDebitFilePropertie
229
231
  * ```
230
232
  */
231
233
  get pgDisputes(): RecordLinkManager<PgDisputeRecord, typeof PgDirectDebitFileRecord['pgDisputesLabels'][number]>;
234
+ /** Valid labels for PgReportEvent associations */
235
+ static readonly pgReportEventsLabels: readonly ["PgDirectDebitFile__PgReportEvent"];
236
+ /**
237
+ * Access linked PgReportEvent records
238
+ * @remarks Available labels: PgDirectDebitFile__PgReportEvent
239
+ * @throws Error if called on a new (unsaved) record
240
+ *
241
+ * @example
242
+ * ```typescript
243
+ * // Get all linked PgReportEvent records
244
+ * const items = await record.pgReportEvents.list();
245
+ * const first = await record.pgReportEvents.first();
246
+ *
247
+ * // Filter by label
248
+ * const specific = await record.pgReportEvents.first({ label: 'PgDirectDebitFile__PgReportEvent' });
249
+ * ```
250
+ */
251
+ get pgReportEvents(): RecordLinkManager<PgReportEventRecord, typeof PgDirectDebitFileRecord['pgReportEventsLabels'][number]>;
232
252
  /**
233
253
  * Queue a link to be created with the next action.
234
254
  * Works for both create and update actions.
@@ -35,6 +35,7 @@ const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link
35
35
  const FileRecord_1 = require("./FileRecord");
36
36
  const PgFileAllocationRecord_1 = require("./PgFileAllocationRecord");
37
37
  const PgDisputeRecord_1 = require("./PgDisputeRecord");
38
+ const PgReportEventRecord_1 = require("./PgReportEventRecord");
38
39
  /**
39
40
  * Builder for action execution with dryRun support
40
41
  *
@@ -286,6 +287,36 @@ class PgDirectDebitFileRecord {
286
287
  }
287
288
  return this._pgDisputes;
288
289
  }
290
+ /**
291
+ * Access linked PgReportEvent records
292
+ * @remarks Available labels: PgDirectDebitFile__PgReportEvent
293
+ * @throws Error if called on a new (unsaved) record
294
+ *
295
+ * @example
296
+ * ```typescript
297
+ * // Get all linked PgReportEvent records
298
+ * const items = await record.pgReportEvents.list();
299
+ * const first = await record.pgReportEvents.first();
300
+ *
301
+ * // Filter by label
302
+ * const specific = await record.pgReportEvents.first({ label: 'PgDirectDebitFile__PgReportEvent' });
303
+ * ```
304
+ */
305
+ get pgReportEvents() {
306
+ var _a;
307
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
308
+ throw new Error('Cannot access links on a new (unsaved) record');
309
+ if (!this._pgReportEvents) {
310
+ this._pgReportEvents = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
311
+ sourceEntity: 'BillingModule:PgDirectDebitFile',
312
+ targetEntity: 'BillingModule:PgReportEvent',
313
+ targetModuleName: 'BillingModule',
314
+ targetEntityName: 'PgReportEvent',
315
+ labels: ['PgDirectDebitFile__PgReportEvent'],
316
+ }, PgReportEventRecord_1.PgReportEventRecord);
317
+ }
318
+ return this._pgReportEvents;
319
+ }
289
320
  // ============================================
290
321
  // LINK MANAGEMENT
291
322
  // ============================================
@@ -948,6 +979,8 @@ PgDirectDebitFileRecord.filesLabels = ['PgDirectDebitFile__File'];
948
979
  PgDirectDebitFileRecord.pgFileAllocationsLabels = ['PgDirectDebitFile__PgFileAllocation'];
949
980
  /** Valid labels for PgDispute associations */
950
981
  PgDirectDebitFileRecord.pgDisputesLabels = ['PgDirectDebitFile__PgDispute'];
982
+ /** Valid labels for PgReportEvent associations */
983
+ PgDirectDebitFileRecord.pgReportEventsLabels = ['PgDirectDebitFile__PgReportEvent'];
951
984
  /** Type guard to check if an object is a PgDirectDebitFileRecord */
952
985
  function isPgDirectDebitFileRecord(obj) {
953
986
  return obj instanceof PgDirectDebitFileRecord;
@@ -34,6 +34,7 @@ import { PgTransactionRecord } from './PgTransactionRecord';
34
34
  import { PgWebhookRecord } from './PgWebhookRecord';
35
35
  import { PgContactRecord } from './PgContactRecord';
36
36
  import { PgFileAllocationRecord } from './PgFileAllocationRecord';
37
+ import { PgReportEventRecord } from './PgReportEventRecord';
37
38
  /** Valid entity types for PgPaymentMethod */
38
39
  export declare type PgPaymentMethodType = 'DEFAULT';
39
40
  /**
@@ -103,6 +104,7 @@ export declare class PgPaymentMethodRecord<TProps = PgPaymentMethodProperties> {
103
104
  private _pgWebhooks?;
104
105
  private _pgContacts?;
105
106
  private _pgFileAllocations?;
107
+ private _pgReportEvents?;
106
108
  /**
107
109
  * Create a record wrapper.
108
110
  * @param record - The underlying record, or null for create operations
@@ -216,6 +218,24 @@ export declare class PgPaymentMethodRecord<TProps = PgPaymentMethodProperties> {
216
218
  * ```
217
219
  */
218
220
  get pgFileAllocations(): RecordLinkManager<PgFileAllocationRecord, typeof PgPaymentMethodRecord['pgFileAllocationsLabels'][number]>;
221
+ /** Valid labels for PgReportEvent associations */
222
+ static readonly pgReportEventsLabels: readonly ["PgPaymentMethod__PgReportEvent"];
223
+ /**
224
+ * Access linked PgReportEvent records
225
+ * @remarks Available labels: PgPaymentMethod__PgReportEvent
226
+ * @throws Error if called on a new (unsaved) record
227
+ *
228
+ * @example
229
+ * ```typescript
230
+ * // Get all linked PgReportEvent records
231
+ * const items = await record.pgReportEvents.list();
232
+ * const first = await record.pgReportEvents.first();
233
+ *
234
+ * // Filter by label
235
+ * const specific = await record.pgReportEvents.first({ label: 'PgPaymentMethod__PgReportEvent' });
236
+ * ```
237
+ */
238
+ get pgReportEvents(): RecordLinkManager<PgReportEventRecord, typeof PgPaymentMethodRecord['pgReportEventsLabels'][number]>;
219
239
  /**
220
240
  * Queue a link to be created with the next action.
221
241
  * Works for both create and update actions.
@@ -36,6 +36,7 @@ const PgTransactionRecord_1 = require("./PgTransactionRecord");
36
36
  const PgWebhookRecord_1 = require("./PgWebhookRecord");
37
37
  const PgContactRecord_1 = require("./PgContactRecord");
38
38
  const PgFileAllocationRecord_1 = require("./PgFileAllocationRecord");
39
+ const PgReportEventRecord_1 = require("./PgReportEventRecord");
39
40
  /**
40
41
  * Builder for action execution with dryRun support
41
42
  *
@@ -285,6 +286,36 @@ class PgPaymentMethodRecord {
285
286
  }
286
287
  return this._pgFileAllocations;
287
288
  }
289
+ /**
290
+ * Access linked PgReportEvent records
291
+ * @remarks Available labels: PgPaymentMethod__PgReportEvent
292
+ * @throws Error if called on a new (unsaved) record
293
+ *
294
+ * @example
295
+ * ```typescript
296
+ * // Get all linked PgReportEvent records
297
+ * const items = await record.pgReportEvents.list();
298
+ * const first = await record.pgReportEvents.first();
299
+ *
300
+ * // Filter by label
301
+ * const specific = await record.pgReportEvents.first({ label: 'PgPaymentMethod__PgReportEvent' });
302
+ * ```
303
+ */
304
+ get pgReportEvents() {
305
+ var _a;
306
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
307
+ throw new Error('Cannot access links on a new (unsaved) record');
308
+ if (!this._pgReportEvents) {
309
+ this._pgReportEvents = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
310
+ sourceEntity: 'BillingModule:PgPaymentMethod',
311
+ targetEntity: 'BillingModule:PgReportEvent',
312
+ targetModuleName: 'BillingModule',
313
+ targetEntityName: 'PgReportEvent',
314
+ labels: ['PgPaymentMethod__PgReportEvent'],
315
+ }, PgReportEventRecord_1.PgReportEventRecord);
316
+ }
317
+ return this._pgReportEvents;
318
+ }
288
319
  // ============================================
289
320
  // LINK MANAGEMENT
290
321
  // ============================================
@@ -971,6 +1002,8 @@ PgPaymentMethodRecord.pgWebhooksLabels = ['PgPaymentMethod__PgWebhook'];
971
1002
  PgPaymentMethodRecord.pgContactsLabels = ['PgContact__PgPaymentMethod'];
972
1003
  /** Valid labels for PgFileAllocation associations */
973
1004
  PgPaymentMethodRecord.pgFileAllocationsLabels = ['PgPaymentMethod__PgFileAllocation'];
1005
+ /** Valid labels for PgReportEvent associations */
1006
+ PgPaymentMethodRecord.pgReportEventsLabels = ['PgPaymentMethod__PgReportEvent'];
974
1007
  /** Type guard to check if an object is a PgPaymentMethodRecord */
975
1008
  function isPgPaymentMethodRecord(obj) {
976
1009
  return obj instanceof PgPaymentMethodRecord;
@@ -0,0 +1,347 @@
1
+ /**
2
+ * PgReportEvent Record Wrapper
3
+ *
4
+ * Provides typed action methods and link management.
5
+ * Works with both ApiProvider and DbProvider.
6
+ *
7
+ * All action methods return an ActionBuilder or FlowBuilder.
8
+ * Call .execute() to run or .dryRun() to get the payload for debugging.
9
+ *
10
+ * Can be instantiated with null record for create operations:
11
+ * ```typescript
12
+ * const record = odinClient.pgReportEvents.new();
13
+ * await record.createPgReportEvent({ ... }).execute();
14
+ * ```
15
+ *
16
+ * Entity Types: DEFAULT
17
+ *
18
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
+ */
20
+ import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
21
+ import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
22
+ import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
23
+ import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
24
+ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
25
+ import { PgReportEventProperties } from '../entities-v2/PgReportEvent';
26
+ import { CreatePgReportEventProperties } from '../actions-v2/CreatePgReportEventDto';
27
+ import { UpdatePgReportEventProperties } from '../actions-v2/UpdatePgReportEventDto';
28
+ import { PgDirectDebitFileRecord } from './PgDirectDebitFileRecord';
29
+ import { PgPaymentMethodRecord } from './PgPaymentMethodRecord';
30
+ import { PgTransactionRecord } from './PgTransactionRecord';
31
+ /** Valid entity types for PgReportEvent */
32
+ export declare type PgReportEventType = 'DEFAULT';
33
+ /**
34
+ * Builder for action execution with dryRun support
35
+ *
36
+ * Provides a consistent API across all action types:
37
+ * - `.execute()` - Execute the action and return results
38
+ * - `.dryRun()` - Return the payload without executing (for debugging)
39
+ */
40
+ declare class ActionBuilder<T = IDbRecordCreateUpdateRes[]> {
41
+ private _provider;
42
+ private _moduleName;
43
+ private _entityName;
44
+ private _payload;
45
+ private _clearPendingLinks;
46
+ constructor(provider: IOdinProvider, moduleName: string, entityName: string, payload: Record<string, any>, clearPendingLinks: () => void);
47
+ /**
48
+ * Set an external system identifier for this record.
49
+ * Links the record to a corresponding entry in an external application.
50
+ *
51
+ * @param externalId - The ID in the external system
52
+ * @param externalAppId - The external application identifier
53
+ * @returns this (for chaining)
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * await record.createOrder({ ... }).withExternalId('SF-123', 'salesforce').execute();
58
+ * ```
59
+ */
60
+ withExternalId(externalId: string, externalAppId: string): this;
61
+ /**
62
+ * Set security/access groups for this record.
63
+ * Controls which user groups can access the record.
64
+ *
65
+ * @param groups - Array of group names
66
+ * @returns this (for chaining)
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * await record.createOrder({ ... }).withGroups(['TenantA', 'BillingTeam']).execute();
71
+ * ```
72
+ */
73
+ withGroups(groups: string[]): this;
74
+ /**
75
+ * Execute the action
76
+ * @returns The result from the API
77
+ */
78
+ execute(): Promise<T>;
79
+ /**
80
+ * Returns the request payload without executing (for debugging)
81
+ * @returns The request payload that would be sent to the API
82
+ */
83
+ dryRun(): Record<string, any>;
84
+ /**
85
+ * Prevents accidental `await actionBuilder` without .execute()
86
+ * Forces developers to explicitly call .execute()
87
+ * @throws Error always - use .execute() or .dryRun() instead
88
+ */
89
+ then(): never;
90
+ }
91
+ export declare class PgReportEventRecord<TProps = PgReportEventProperties> {
92
+ private _record;
93
+ private _provider;
94
+ private _pendingLinks;
95
+ private _preGeneratedId;
96
+ private _pgDirectDebitFiles?;
97
+ private _pgPaymentMethods?;
98
+ private _pgTransactions?;
99
+ /**
100
+ * Create a record wrapper.
101
+ * @param record - The underlying record, or null for create operations
102
+ * @param provider - The API or DB provider
103
+ * @param preGeneratedId - Optional pre-generated ID for new records (auto-generated if not provided)
104
+ */
105
+ constructor(record: OdinRecord<TProps> | null, provider: IOdinProvider, preGeneratedId?: string);
106
+ /** Returns true if this is a new (unsaved) record */
107
+ get isNew(): boolean;
108
+ /** Record ID - always available (pre-generated for new records) */
109
+ get id(): string;
110
+ get entity(): string;
111
+ get type(): PgReportEventType | undefined;
112
+ /** Record properties - empty object for new (unsaved) records */
113
+ get properties(): TProps;
114
+ get title(): string | undefined;
115
+ get recordNumber(): string | undefined;
116
+ get stage(): PipelineStageEntity | undefined;
117
+ get createdAt(): string | undefined;
118
+ get updatedAt(): string | undefined;
119
+ get externalId(): string | undefined;
120
+ get externalAppId(): string | undefined;
121
+ get groups(): string[];
122
+ /** Access the underlying OdinRecord (null for new records) */
123
+ get record(): OdinRecord<TProps> | null;
124
+ /**
125
+ * Type guard: check if this record is of type DEFAULT
126
+ *
127
+ * When this returns true, TypeScript automatically narrows the type,
128
+ * giving you access to DEFAULT-specific properties.
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * if (record.isDefault()) {
133
+ * // TypeScript knows record.properties is PgReportEventProperties
134
+ * console.log(record.properties.SomeTypeSpecificField);
135
+ * }
136
+ * ```
137
+ * @remarks This is the default record type
138
+ */
139
+ isDefault(): this is PgReportEventRecord<PgReportEventProperties>;
140
+ /** Valid labels for PgDirectDebitFile associations */
141
+ static readonly pgDirectDebitFilesLabels: readonly ["PgDirectDebitFile__PgReportEvent"];
142
+ /**
143
+ * Access linked PgDirectDebitFile records
144
+ * @remarks Available labels: PgDirectDebitFile__PgReportEvent
145
+ * @throws Error if called on a new (unsaved) record
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * // Get all linked PgDirectDebitFile records
150
+ * const items = await record.pgDirectDebitFiles.list();
151
+ * const first = await record.pgDirectDebitFiles.first();
152
+ *
153
+ * // Filter by label
154
+ * const specific = await record.pgDirectDebitFiles.first({ label: 'PgDirectDebitFile__PgReportEvent' });
155
+ * ```
156
+ */
157
+ get pgDirectDebitFiles(): RecordLinkManager<PgDirectDebitFileRecord, typeof PgReportEventRecord['pgDirectDebitFilesLabels'][number]>;
158
+ /** Valid labels for PgPaymentMethod associations */
159
+ static readonly pgPaymentMethodsLabels: readonly ["PgPaymentMethod__PgReportEvent"];
160
+ /**
161
+ * Access linked PgPaymentMethod records
162
+ * @remarks Available labels: PgPaymentMethod__PgReportEvent
163
+ * @throws Error if called on a new (unsaved) record
164
+ *
165
+ * @example
166
+ * ```typescript
167
+ * // Get all linked PgPaymentMethod records
168
+ * const items = await record.pgPaymentMethods.list();
169
+ * const first = await record.pgPaymentMethods.first();
170
+ *
171
+ * // Filter by label
172
+ * const specific = await record.pgPaymentMethods.first({ label: 'PgPaymentMethod__PgReportEvent' });
173
+ * ```
174
+ */
175
+ get pgPaymentMethods(): RecordLinkManager<PgPaymentMethodRecord, typeof PgReportEventRecord['pgPaymentMethodsLabels'][number]>;
176
+ /** Valid labels for PgTransaction associations */
177
+ static readonly pgTransactionsLabels: readonly ["PgTransaction__PgReportEvent"];
178
+ /**
179
+ * Access linked PgTransaction records
180
+ * @remarks Available labels: PgTransaction__PgReportEvent
181
+ * @throws Error if called on a new (unsaved) record
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * // Get all linked PgTransaction records
186
+ * const items = await record.pgTransactions.list();
187
+ * const first = await record.pgTransactions.first();
188
+ *
189
+ * // Filter by label
190
+ * const specific = await record.pgTransactions.first({ label: 'PgTransaction__PgReportEvent' });
191
+ * ```
192
+ */
193
+ get pgTransactions(): RecordLinkManager<PgTransactionRecord, typeof PgReportEventRecord['pgTransactionsLabels'][number]>;
194
+ /**
195
+ * Queue a link to be created with the next action.
196
+ * Works for both create and update actions.
197
+ * @returns this (for chaining)
198
+ */
199
+ link(target: OdinRecord<any> | {
200
+ id: string;
201
+ entity: string;
202
+ }): this;
203
+ /** Get the currently queued links */
204
+ get pendingLinks(): OdinRecordLinkDto[];
205
+ /** Clear pending links without executing an action */
206
+ clearPendingLinks(): this;
207
+ /**
208
+ * Immediately unlink a record (API call).
209
+ * Unlike link(), this executes immediately.
210
+ * @throws Error if called on a new (unsaved) record
211
+ */
212
+ unlink(target: OdinRecord<any> | {
213
+ id: string;
214
+ } | string): Promise<void>;
215
+ /**
216
+ * CreatePgReportEvent
217
+ *
218
+ * Creates a new PgReportEvent record with the specified properties.
219
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
220
+ *
221
+ * @remarks Record type: DEFAULT
222
+ *
223
+ * @param properties - The properties for the new record
224
+ * @param options - Optional settings
225
+ * @param options.journeyId - Associate with a journey
226
+ * @param options.stageKey - Set initial pipeline stage
227
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
228
+ *
229
+ * @example
230
+ * ```typescript
231
+ * // Create with properties
232
+ * const record = odinClient.pgReportEvents.new();
233
+ * await record.createPgReportEvent({ ... }).execute();
234
+ *
235
+ * // Dry run (for debugging)
236
+ * const payload = record.createPgReportEvent({ ... }).dryRun();
237
+ * ```
238
+ */
239
+ createPgReportEvent(properties: CreatePgReportEventProperties, options?: {
240
+ journeyId?: string;
241
+ stageKey?: string;
242
+ }): ActionBuilder;
243
+ /**
244
+ * MovePgReportEventToFailed
245
+ *
246
+ * Transitions this PgReportEvent record to a new pipeline stage.
247
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
248
+ *
249
+ * @remarks Transitions to stage: EventStatusStageFailed
250
+ *
251
+ * @param options - Optional settings
252
+ * @param options.journeyId - Associate with a journey
253
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
254
+ * @throws Error if called on a new (unsaved) record
255
+ *
256
+ * @example
257
+ * ```typescript
258
+ * const record = await odinClient.pgReportEvents.get(id);
259
+ * await record.movePgReportEventToFailed().execute();
260
+ *
261
+ * // Dry run (for debugging)
262
+ * const payload = record.movePgReportEventToFailed().dryRun();
263
+ * ```
264
+ */
265
+ movePgReportEventToFailed(options?: {
266
+ journeyId?: string;
267
+ }): ActionBuilder;
268
+ /**
269
+ * MovePgReportEventToSkipped
270
+ *
271
+ * Transitions this PgReportEvent record to a new pipeline stage.
272
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
273
+ *
274
+ * @remarks Transitions to stage: EventStatusStageSkipped
275
+ *
276
+ * @param options - Optional settings
277
+ * @param options.journeyId - Associate with a journey
278
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
279
+ * @throws Error if called on a new (unsaved) record
280
+ *
281
+ * @example
282
+ * ```typescript
283
+ * const record = await odinClient.pgReportEvents.get(id);
284
+ * await record.movePgReportEventToSkipped().execute();
285
+ *
286
+ * // Dry run (for debugging)
287
+ * const payload = record.movePgReportEventToSkipped().dryRun();
288
+ * ```
289
+ */
290
+ movePgReportEventToSkipped(options?: {
291
+ journeyId?: string;
292
+ }): ActionBuilder;
293
+ /**
294
+ * MovePgReportEventToSucceeded
295
+ *
296
+ * Transitions this PgReportEvent record to a new pipeline stage.
297
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
298
+ *
299
+ * @remarks Transitions to stage: EventStatusStageSucceeded
300
+ *
301
+ * @param options - Optional settings
302
+ * @param options.journeyId - Associate with a journey
303
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
304
+ * @throws Error if called on a new (unsaved) record
305
+ *
306
+ * @example
307
+ * ```typescript
308
+ * const record = await odinClient.pgReportEvents.get(id);
309
+ * await record.movePgReportEventToSucceeded().execute();
310
+ *
311
+ * // Dry run (for debugging)
312
+ * const payload = record.movePgReportEventToSucceeded().dryRun();
313
+ * ```
314
+ */
315
+ movePgReportEventToSucceeded(options?: {
316
+ journeyId?: string;
317
+ }): ActionBuilder;
318
+ /**
319
+ * UpdatePgReportEvent
320
+ *
321
+ * Updates this PgReportEvent record with the specified properties.
322
+ * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
323
+ *
324
+ * @param properties - Required properties for this action
325
+ * @param options - Optional settings
326
+ * @param options.journeyId - Associate with a journey
327
+ * @param options.stageKey - Transition to pipeline stage
328
+ * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
329
+ * @throws Error if called on a new (unsaved) record
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * const record = await odinClient.pgReportEvents.get(id);
334
+ * await record.updatePgReportEvent({ ... }).execute();
335
+ *
336
+ * // Dry run (for debugging)
337
+ * const payload = record.updatePgReportEvent({ ... }).dryRun();
338
+ * ```
339
+ */
340
+ updatePgReportEvent(properties: UpdatePgReportEventProperties, options?: {
341
+ journeyId?: string;
342
+ stageKey?: string;
343
+ }): ActionBuilder;
344
+ }
345
+ /** Type guard to check if an object is a PgReportEventRecord */
346
+ export declare function isPgReportEventRecord(obj: any): obj is PgReportEventRecord;
347
+ export {};