@d19n/youfibre-odin-sdk 2.0.84 → 2.0.85
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 +7 -1
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/ContactIdentityAccessor.d.ts +111 -0
- package/dist/accessors-v2/ContactIdentityAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +5 -3
- package/dist/actions-v2/AddressUpdateDto.d.ts +8 -1
- package/dist/actions-v2/CreateContactIdentityDto.d.ts +58 -0
- package/dist/actions-v2/CreateContactIdentityDto.js +54 -0
- package/dist/db-accessors-v2/ContactIdentityDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/ContactIdentityDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +5 -3
- package/dist/db-sdk-v2/FileDb.d.ts +122 -122
- package/dist/db-sdk-v2/FileDb.js +248 -248
- package/dist/entities-v2/File.d.ts +6 -0
- package/dist/entities-v2/File.js +5 -1
- package/dist/entities-v2/PgDirectDebitFile.d.ts +6 -2
- package/dist/entities-v2/PgDirectDebitFile.js +4 -0
- package/dist/records-v2/ContactIdentityRecord.d.ts +244 -0
- package/dist/records-v2/ContactIdentityRecord.js +357 -0
- package/dist/records-v2/ContactRecord.d.ts +20 -0
- package/dist/records-v2/ContactRecord.js +33 -0
- package/dist/records-v2/OrderRecord.d.ts +20 -0
- package/dist/records-v2/OrderRecord.js +33 -0
- package/dist/records-v2/PaymentMethodRecord.d.ts +20 -0
- package/dist/records-v2/PaymentMethodRecord.js +33 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +6 -3
- package/package.json +3 -3
|
@@ -768,6 +768,8 @@ export declare class File extends OdinRecord<FileProperties> {
|
|
|
768
768
|
type: FileEntityTypes;
|
|
769
769
|
schemaId: 'e553681c-76a3-4637-bace-9aae7d9ab7bd';
|
|
770
770
|
properties: FileProperties;
|
|
771
|
+
/** Linked File records (Appointment__File) */
|
|
772
|
+
File: OdinLink<LinkedOdinRecord<FileProperties>>;
|
|
771
773
|
/** Linked Appointment records (Appointment__File) */
|
|
772
774
|
Appointment: OdinLink<LinkedOdinRecord<AppointmentProperties>>;
|
|
773
775
|
/** Linked UgExternalAudit records (UgExternalAudit_File) */
|
|
@@ -955,6 +957,10 @@ export declare const ROUTING_KEY_FILE_OTDR_CREATED = "SchemaModule.File.OTDR.Sub
|
|
|
955
957
|
export declare const ROUTING_KEY_FILE_OTDR_UPDATED = "SchemaModule.File.OTDR.SubDbRecordUpdated";
|
|
956
958
|
/** OTDR evidence for L1 and L2 closures deleted */
|
|
957
959
|
export declare const ROUTING_KEY_FILE_OTDR_DELETED = "SchemaModule.File.OTDR.SubDbRecordDeleted";
|
|
960
|
+
/** Event: Appointment__File link created */
|
|
961
|
+
export declare const ROUTING_KEY_LINK_APPOINTMENT_FILE_CREATED = "SchemaModule.File.File.SubDbRecordAssociationCreated";
|
|
962
|
+
/** Event: Appointment__File link deleted */
|
|
963
|
+
export declare const ROUTING_KEY_LINK_APPOINTMENT_FILE_DELETED = "SchemaModule.File.File.SubDbRecordAssociationDeleted";
|
|
958
964
|
/** Event: File__Note link created */
|
|
959
965
|
export declare const ROUTING_KEY_LINK_FILE_NOTE_CREATED = "SchemaModule.File.Note.SubDbRecordAssociationCreated";
|
|
960
966
|
/** Event: File__Note link deleted */
|
package/dist/entities-v2/File.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Generated from Odin schema definition
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ROUTING_KEY_LINK_FILE_NOTE_DELETED = exports.ROUTING_KEY_LINK_FILE_NOTE_CREATED = exports.ROUTING_KEY_FILE_OTDR_DELETED = exports.ROUTING_KEY_FILE_OTDR_UPDATED = exports.ROUTING_KEY_FILE_OTDR_CREATED = exports.ROUTING_KEY_FILE_OPENREACH_A55_DELETED = exports.ROUTING_KEY_FILE_OPENREACH_A55_UPDATED = exports.ROUTING_KEY_FILE_OPENREACH_A55_CREATED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_DELETED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_UPDATED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_CREATED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_DELETED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_UPDATED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_CREATED = exports.ROUTING_KEY_FILE_INVOICE_DELETED = exports.ROUTING_KEY_FILE_INVOICE_UPDATED = exports.ROUTING_KEY_FILE_INVOICE_CREATED = exports.ROUTING_KEY_FILE_EMAIL_DELETED = exports.ROUTING_KEY_FILE_EMAIL_UPDATED = exports.ROUTING_KEY_FILE_EMAIL_CREATED = exports.ROUTING_KEY_FILE_DEFAULT_DELETED = exports.ROUTING_KEY_FILE_DEFAULT_UPDATED = exports.ROUTING_KEY_FILE_DEFAULT_CREATED = exports.ROUTING_KEY_FILE_CSV_DELETED = exports.ROUTING_KEY_FILE_CSV_UPDATED = exports.ROUTING_KEY_FILE_CSV_CREATED = exports.ROUTING_KEY_FILE_AFP_INVOICE_DELETED = exports.ROUTING_KEY_FILE_AFP_INVOICE_UPDATED = exports.ROUTING_KEY_FILE_AFP_INVOICE_CREATED = exports.ROUTING_KEY_FILE_DELETED = exports.ROUTING_KEY_FILE_UPDATED = exports.ROUTING_KEY_FILE_CREATED = exports.File = exports.FilePropertyKeys = exports.FileCategory = exports.FileDevice = exports.FileDataStore = exports.FileEntityTypes = void 0;
|
|
15
|
+
exports.ROUTING_KEY_LINK_FILE_NOTE_DELETED = exports.ROUTING_KEY_LINK_FILE_NOTE_CREATED = exports.ROUTING_KEY_LINK_APPOINTMENT_FILE_DELETED = exports.ROUTING_KEY_LINK_APPOINTMENT_FILE_CREATED = exports.ROUTING_KEY_FILE_OTDR_DELETED = exports.ROUTING_KEY_FILE_OTDR_UPDATED = exports.ROUTING_KEY_FILE_OTDR_CREATED = exports.ROUTING_KEY_FILE_OPENREACH_A55_DELETED = exports.ROUTING_KEY_FILE_OPENREACH_A55_UPDATED = exports.ROUTING_KEY_FILE_OPENREACH_A55_CREATED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_DELETED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_UPDATED = exports.ROUTING_KEY_FILE_NA_SOLUTION_EVIDENCE_CREATED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_DELETED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_UPDATED = exports.ROUTING_KEY_FILE_NA_PROBLEM_EVIDENCE_CREATED = exports.ROUTING_KEY_FILE_INVOICE_DELETED = exports.ROUTING_KEY_FILE_INVOICE_UPDATED = exports.ROUTING_KEY_FILE_INVOICE_CREATED = exports.ROUTING_KEY_FILE_EMAIL_DELETED = exports.ROUTING_KEY_FILE_EMAIL_UPDATED = exports.ROUTING_KEY_FILE_EMAIL_CREATED = exports.ROUTING_KEY_FILE_DEFAULT_DELETED = exports.ROUTING_KEY_FILE_DEFAULT_UPDATED = exports.ROUTING_KEY_FILE_DEFAULT_CREATED = exports.ROUTING_KEY_FILE_CSV_DELETED = exports.ROUTING_KEY_FILE_CSV_UPDATED = exports.ROUTING_KEY_FILE_CSV_CREATED = exports.ROUTING_KEY_FILE_AFP_INVOICE_DELETED = exports.ROUTING_KEY_FILE_AFP_INVOICE_UPDATED = exports.ROUTING_KEY_FILE_AFP_INVOICE_CREATED = exports.ROUTING_KEY_FILE_DELETED = exports.ROUTING_KEY_FILE_UPDATED = exports.ROUTING_KEY_FILE_CREATED = exports.File = exports.FilePropertyKeys = exports.FileCategory = exports.FileDevice = exports.FileDataStore = exports.FileEntityTypes = void 0;
|
|
16
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
17
|
/**
|
|
18
18
|
* Available types for File records
|
|
@@ -186,6 +186,10 @@ exports.ROUTING_KEY_FILE_OTDR_CREATED = 'SchemaModule.File.OTDR.SubDbRecordCreat
|
|
|
186
186
|
exports.ROUTING_KEY_FILE_OTDR_UPDATED = 'SchemaModule.File.OTDR.SubDbRecordUpdated';
|
|
187
187
|
/** OTDR evidence for L1 and L2 closures deleted */
|
|
188
188
|
exports.ROUTING_KEY_FILE_OTDR_DELETED = 'SchemaModule.File.OTDR.SubDbRecordDeleted';
|
|
189
|
+
/** Event: Appointment__File link created */
|
|
190
|
+
exports.ROUTING_KEY_LINK_APPOINTMENT_FILE_CREATED = 'SchemaModule.File.File.SubDbRecordAssociationCreated';
|
|
191
|
+
/** Event: Appointment__File link deleted */
|
|
192
|
+
exports.ROUTING_KEY_LINK_APPOINTMENT_FILE_DELETED = 'SchemaModule.File.File.SubDbRecordAssociationDeleted';
|
|
189
193
|
/** Event: File__Note link created */
|
|
190
194
|
exports.ROUTING_KEY_LINK_FILE_NOTE_CREATED = 'SchemaModule.File.Note.SubDbRecordAssociationCreated';
|
|
191
195
|
/** Event: File__Note link deleted */
|
|
@@ -74,7 +74,9 @@ export declare enum SubmissionPgDirectDebitFileStageNames {
|
|
|
74
74
|
/** Submission Failed (fail) */
|
|
75
75
|
SubmissionFailed = "Submission Failed",
|
|
76
76
|
/** File Rejected (fail) */
|
|
77
|
-
FileRejected = "File Rejected"
|
|
77
|
+
FileRejected = "File Rejected",
|
|
78
|
+
/** Failed (fail) */
|
|
79
|
+
Failed = "Failed"
|
|
78
80
|
}
|
|
79
81
|
/**
|
|
80
82
|
* Pipeline stage keys for SUBMISSION PgDirectDebitFile
|
|
@@ -96,7 +98,9 @@ export declare enum SubmissionPgDirectDebitFileStageKeys {
|
|
|
96
98
|
/** Submission Failed */
|
|
97
99
|
SubmissionStatusStageSubmissionFailed = "SubmissionStatusStageSubmissionFailed",
|
|
98
100
|
/** File Rejected */
|
|
99
|
-
SubmissionStatusStageFileRejected = "SubmissionStatusStageFileRejected"
|
|
101
|
+
SubmissionStatusStageFileRejected = "SubmissionStatusStageFileRejected",
|
|
102
|
+
/** Failed */
|
|
103
|
+
SubmissionStatusStageFailed = "SubmissionStatusStageFailed"
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
102
106
|
* Valid values for PgDirectDebitFile.Company
|
|
@@ -80,6 +80,8 @@ var SubmissionPgDirectDebitFileStageNames;
|
|
|
80
80
|
SubmissionPgDirectDebitFileStageNames["SubmissionFailed"] = "Submission Failed";
|
|
81
81
|
/** File Rejected (fail) */
|
|
82
82
|
SubmissionPgDirectDebitFileStageNames["FileRejected"] = "File Rejected";
|
|
83
|
+
/** Failed (fail) */
|
|
84
|
+
SubmissionPgDirectDebitFileStageNames["Failed"] = "Failed";
|
|
83
85
|
})(SubmissionPgDirectDebitFileStageNames = exports.SubmissionPgDirectDebitFileStageNames || (exports.SubmissionPgDirectDebitFileStageNames = {}));
|
|
84
86
|
/**
|
|
85
87
|
* Pipeline stage keys for SUBMISSION PgDirectDebitFile
|
|
@@ -103,6 +105,8 @@ var SubmissionPgDirectDebitFileStageKeys;
|
|
|
103
105
|
SubmissionPgDirectDebitFileStageKeys["SubmissionStatusStageSubmissionFailed"] = "SubmissionStatusStageSubmissionFailed";
|
|
104
106
|
/** File Rejected */
|
|
105
107
|
SubmissionPgDirectDebitFileStageKeys["SubmissionStatusStageFileRejected"] = "SubmissionStatusStageFileRejected";
|
|
108
|
+
/** Failed */
|
|
109
|
+
SubmissionPgDirectDebitFileStageKeys["SubmissionStatusStageFailed"] = "SubmissionStatusStageFailed";
|
|
106
110
|
})(SubmissionPgDirectDebitFileStageKeys = exports.SubmissionPgDirectDebitFileStageKeys || (exports.SubmissionPgDirectDebitFileStageKeys = {}));
|
|
107
111
|
/**
|
|
108
112
|
* Valid values for PgDirectDebitFile.Company
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContactIdentity 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.contactIdentitys.new();
|
|
13
|
+
* await record.createContactIdentity({ ... }).execute();
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
17
|
+
*/
|
|
18
|
+
import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
19
|
+
import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
|
|
20
|
+
import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
|
|
21
|
+
import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
22
|
+
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
23
|
+
import { ContactIdentityProperties } from '../entities-v2/ContactIdentity';
|
|
24
|
+
import { CreateContactIdentityProperties } from '../actions-v2/CreateContactIdentityDto';
|
|
25
|
+
import { PaymentMethodRecord } from './PaymentMethodRecord';
|
|
26
|
+
import { ContactRecord } from './ContactRecord';
|
|
27
|
+
import { OrderRecord } from './OrderRecord';
|
|
28
|
+
/**
|
|
29
|
+
* Builder for action execution with dryRun support
|
|
30
|
+
*
|
|
31
|
+
* Provides a consistent API across all action types:
|
|
32
|
+
* - `.execute()` - Execute the action and return results
|
|
33
|
+
* - `.dryRun()` - Return the payload without executing (for debugging)
|
|
34
|
+
*/
|
|
35
|
+
declare class ActionBuilder<T = IDbRecordCreateUpdateRes[]> {
|
|
36
|
+
private _provider;
|
|
37
|
+
private _moduleName;
|
|
38
|
+
private _entityName;
|
|
39
|
+
private _payload;
|
|
40
|
+
private _clearPendingLinks;
|
|
41
|
+
constructor(provider: IOdinProvider, moduleName: string, entityName: string, payload: Record<string, any>, clearPendingLinks: () => void);
|
|
42
|
+
/**
|
|
43
|
+
* Set an external system identifier for this record.
|
|
44
|
+
* Links the record to a corresponding entry in an external application.
|
|
45
|
+
*
|
|
46
|
+
* @param externalId - The ID in the external system
|
|
47
|
+
* @param externalAppId - The external application identifier
|
|
48
|
+
* @returns this (for chaining)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* await record.createOrder({ ... }).withExternalId('SF-123', 'salesforce').execute();
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
withExternalId(externalId: string, externalAppId: string): this;
|
|
56
|
+
/**
|
|
57
|
+
* Set security/access groups for this record.
|
|
58
|
+
* Controls which user groups can access the record.
|
|
59
|
+
*
|
|
60
|
+
* @param groups - Array of group names
|
|
61
|
+
* @returns this (for chaining)
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* await record.createOrder({ ... }).withGroups(['TenantA', 'BillingTeam']).execute();
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
withGroups(groups: string[]): this;
|
|
69
|
+
/**
|
|
70
|
+
* Execute the action
|
|
71
|
+
* @returns The result from the API
|
|
72
|
+
*/
|
|
73
|
+
execute(): Promise<T>;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the request payload without executing (for debugging)
|
|
76
|
+
* @returns The request payload that would be sent to the API
|
|
77
|
+
*/
|
|
78
|
+
dryRun(): Record<string, any>;
|
|
79
|
+
/**
|
|
80
|
+
* Prevents accidental `await actionBuilder` without .execute()
|
|
81
|
+
* Forces developers to explicitly call .execute()
|
|
82
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
83
|
+
*/
|
|
84
|
+
then(): never;
|
|
85
|
+
}
|
|
86
|
+
export declare class ContactIdentityRecord<TProps = ContactIdentityProperties> {
|
|
87
|
+
private _record;
|
|
88
|
+
private _provider;
|
|
89
|
+
private _pendingLinks;
|
|
90
|
+
private _preGeneratedId;
|
|
91
|
+
private _paymentMethods?;
|
|
92
|
+
private _contactIdentities?;
|
|
93
|
+
private _contacts?;
|
|
94
|
+
private _orders?;
|
|
95
|
+
/**
|
|
96
|
+
* Create a record wrapper.
|
|
97
|
+
* @param record - The underlying record, or null for create operations
|
|
98
|
+
* @param provider - The API or DB provider
|
|
99
|
+
* @param preGeneratedId - Optional pre-generated ID for new records (auto-generated if not provided)
|
|
100
|
+
*/
|
|
101
|
+
constructor(record: OdinRecord<TProps> | null, provider: IOdinProvider, preGeneratedId?: string);
|
|
102
|
+
/** Returns true if this is a new (unsaved) record */
|
|
103
|
+
get isNew(): boolean;
|
|
104
|
+
/** Record ID - always available (pre-generated for new records) */
|
|
105
|
+
get id(): string;
|
|
106
|
+
get entity(): string;
|
|
107
|
+
get type(): string | undefined;
|
|
108
|
+
/** Record properties - empty object for new (unsaved) records */
|
|
109
|
+
get properties(): TProps;
|
|
110
|
+
get title(): string | undefined;
|
|
111
|
+
get recordNumber(): string | undefined;
|
|
112
|
+
get stage(): PipelineStageEntity | undefined;
|
|
113
|
+
get createdAt(): string | undefined;
|
|
114
|
+
get updatedAt(): string | undefined;
|
|
115
|
+
get externalId(): string | undefined;
|
|
116
|
+
get externalAppId(): string | undefined;
|
|
117
|
+
get groups(): string[];
|
|
118
|
+
/** Access the underlying OdinRecord (null for new records) */
|
|
119
|
+
get record(): OdinRecord<TProps> | null;
|
|
120
|
+
/** Valid labels for PaymentMethod associations */
|
|
121
|
+
static readonly paymentMethodsLabels: readonly ["ContactIdentity__PaymentMethod"];
|
|
122
|
+
/**
|
|
123
|
+
* Access linked PaymentMethod records
|
|
124
|
+
* @remarks Available labels: ContactIdentity__PaymentMethod
|
|
125
|
+
* @throws Error if called on a new (unsaved) record
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```typescript
|
|
129
|
+
* // Get all linked PaymentMethod records
|
|
130
|
+
* const items = await record.paymentMethods.list();
|
|
131
|
+
* const first = await record.paymentMethods.first();
|
|
132
|
+
*
|
|
133
|
+
* // Filter by label
|
|
134
|
+
* const specific = await record.paymentMethods.first({ label: 'ContactIdentity__PaymentMethod' });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
get paymentMethods(): RecordLinkManager<PaymentMethodRecord, typeof ContactIdentityRecord['paymentMethodsLabels'][number]>;
|
|
138
|
+
/** Valid labels for ContactIdentity associations */
|
|
139
|
+
static readonly contactIdentitiesLabels: readonly ["ContactIdentity__ContactIdentity"];
|
|
140
|
+
/**
|
|
141
|
+
* Access linked ContactIdentity records
|
|
142
|
+
* @remarks Available labels: ContactIdentity__ContactIdentity
|
|
143
|
+
* @throws Error if called on a new (unsaved) record
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* // Get all linked ContactIdentity records
|
|
148
|
+
* const items = await record.contactIdentities.list();
|
|
149
|
+
* const first = await record.contactIdentities.first();
|
|
150
|
+
*
|
|
151
|
+
* // Filter by label
|
|
152
|
+
* const specific = await record.contactIdentities.first({ label: 'ContactIdentity__ContactIdentity' });
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
get contactIdentities(): RecordLinkManager<ContactIdentityRecord, typeof ContactIdentityRecord['contactIdentitiesLabels'][number]>;
|
|
156
|
+
/** Valid labels for Contact associations */
|
|
157
|
+
static readonly contactsLabels: readonly ["Contact__ContactIdentity"];
|
|
158
|
+
/**
|
|
159
|
+
* Access linked Contact records
|
|
160
|
+
* @remarks Available labels: Contact__ContactIdentity
|
|
161
|
+
* @throws Error if called on a new (unsaved) record
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* // Get all linked Contact records
|
|
166
|
+
* const items = await record.contacts.list();
|
|
167
|
+
* const first = await record.contacts.first();
|
|
168
|
+
*
|
|
169
|
+
* // Filter by label
|
|
170
|
+
* const specific = await record.contacts.first({ label: 'Contact__ContactIdentity' });
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
get contacts(): RecordLinkManager<ContactRecord, typeof ContactIdentityRecord['contactsLabels'][number]>;
|
|
174
|
+
/** Valid labels for Order associations */
|
|
175
|
+
static readonly ordersLabels: readonly ["Order__ContactIdentity"];
|
|
176
|
+
/**
|
|
177
|
+
* Access linked Order records
|
|
178
|
+
* @remarks Available labels: Order__ContactIdentity
|
|
179
|
+
* @throws Error if called on a new (unsaved) record
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* // Get all linked Order records
|
|
184
|
+
* const items = await record.orders.list();
|
|
185
|
+
* const first = await record.orders.first();
|
|
186
|
+
*
|
|
187
|
+
* // Filter by label
|
|
188
|
+
* const specific = await record.orders.first({ label: 'Order__ContactIdentity' });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
get orders(): RecordLinkManager<OrderRecord, typeof ContactIdentityRecord['ordersLabels'][number]>;
|
|
192
|
+
/**
|
|
193
|
+
* Queue a link to be created with the next action.
|
|
194
|
+
* Works for both create and update actions.
|
|
195
|
+
* @returns this (for chaining)
|
|
196
|
+
*/
|
|
197
|
+
link(target: OdinRecord<any> | {
|
|
198
|
+
id: string;
|
|
199
|
+
entity: string;
|
|
200
|
+
}): this;
|
|
201
|
+
/** Get the currently queued links */
|
|
202
|
+
get pendingLinks(): OdinRecordLinkDto[];
|
|
203
|
+
/** Clear pending links without executing an action */
|
|
204
|
+
clearPendingLinks(): this;
|
|
205
|
+
/**
|
|
206
|
+
* Immediately unlink a record (API call).
|
|
207
|
+
* Unlike link(), this executes immediately.
|
|
208
|
+
* @throws Error if called on a new (unsaved) record
|
|
209
|
+
*/
|
|
210
|
+
unlink(target: OdinRecord<any> | {
|
|
211
|
+
id: string;
|
|
212
|
+
} | string): Promise<void>;
|
|
213
|
+
/**
|
|
214
|
+
* createContactIdentity
|
|
215
|
+
*
|
|
216
|
+
* Creates a new ContactIdentity record with the specified properties.
|
|
217
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
218
|
+
*
|
|
219
|
+
* @param properties - The properties for the new record
|
|
220
|
+
* @param options - Optional settings
|
|
221
|
+
* @param options.type - Override the record type
|
|
222
|
+
* @param options.journeyId - Associate with a journey
|
|
223
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
224
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* // Create with properties
|
|
229
|
+
* const record = odinClient.contactIdentitys.new();
|
|
230
|
+
* await record.createContactIdentity({ ... }).execute();
|
|
231
|
+
*
|
|
232
|
+
* // Dry run (for debugging)
|
|
233
|
+
* const payload = record.createContactIdentity({ ... }).dryRun();
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
createContactIdentity(properties?: CreateContactIdentityProperties, options?: {
|
|
237
|
+
type?: string;
|
|
238
|
+
journeyId?: string;
|
|
239
|
+
stageKey?: string;
|
|
240
|
+
}): ActionBuilder;
|
|
241
|
+
}
|
|
242
|
+
/** Type guard to check if an object is a ContactIdentityRecord */
|
|
243
|
+
export declare function isContactIdentityRecord(obj: any): obj is ContactIdentityRecord;
|
|
244
|
+
export {};
|