@d19n/youfibre-odin-sdk 2.0.285 → 2.0.286

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.
@@ -0,0 +1,63 @@
1
+ /**
2
+ * CreateRecontract Action DTO
3
+ *
4
+ * Create Recontract
5
+ *
6
+ * @module OrderModule
7
+ * @entity Recontract
8
+ * @entityType DEFAULT
9
+ * @actionKey CreateRecontract
10
+ * @event k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
15
+ /**
16
+ * RabbitMQ message payload for CreateRecontract created events
17
+ *
18
+ * @event k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract
19
+ */
20
+ export interface CreateRecontractMessage extends OdinRecordCreatedEvent<CreateRecontractDto, CreateRecontractProperties> {
21
+ }
22
+ /**
23
+ * Properties for CreateRecontract action
24
+ *
25
+ */
26
+ export interface CreateRecontractProperties {
27
+ }
28
+ /**
29
+ * CreateRecontract
30
+ *
31
+ * Create Recontract
32
+ *
33
+ * @actionType CREATE - Creates a new Recontract record
34
+ * @module OrderModule
35
+ * @entity Recontract
36
+ * @entityType DEFAULT (Default)
37
+ * @event k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract
38
+ * @permission schema.action.createrecontract.trigger
39
+ * @benchmark This action is tracked for performance benchmarks
40
+ */
41
+ export declare class CreateRecontractDto extends OdinRecordCreateDto<CreateRecontractProperties> {
42
+ /** Used by SDK generators to identify action type */
43
+ static readonly ACTION_TYPE = "CREATE";
44
+ static readonly ACTION_KEY = "CreateRecontract";
45
+ static readonly MODULE_NAME = "OrderModule";
46
+ static readonly ENTITIES: string[];
47
+ static readonly ENTITY_TYPE = "DEFAULT";
48
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract";
49
+ static readonly PERMISSION = "schema.action.createrecontract.trigger";
50
+ /** Step metadata - entity this action targets */
51
+ static readonly STEP_ENTITY = "OrderModule:Recontract";
52
+ static readonly STEP_SCHEMA_ID = "737797cf-3ab0-49da-827c-18ec499db889";
53
+ static readonly STEP_SCHEMA_ACTION_ID = "ca8242d6-738e-49b0-9822-8804ac5c379e";
54
+ static readonly STEP_SCHEMA_TYPE_ID = "61db803a-cf84-4fee-b460-eb0cba01b705";
55
+ static readonly STEP_TYPE = "DEFAULT";
56
+ static readonly AUTO_LINK_PARENT = true;
57
+ readonly actionName: string;
58
+ readonly schemaActionId: string;
59
+ readonly entity: string;
60
+ constructor(properties: CreateRecontractProperties, options?: {
61
+ journeyId?: string;
62
+ });
63
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * CreateRecontract Action DTO
4
+ *
5
+ * Create Recontract
6
+ *
7
+ * @module OrderModule
8
+ * @entity Recontract
9
+ * @entityType DEFAULT
10
+ * @actionKey CreateRecontract
11
+ * @event k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract
12
+ *
13
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CreateRecontractDto = void 0;
17
+ const core_1 = require("@d19n/odin-types/dist/core");
18
+ /**
19
+ * CreateRecontract
20
+ *
21
+ * Create Recontract
22
+ *
23
+ * @actionType CREATE - Creates a new Recontract record
24
+ * @module OrderModule
25
+ * @entity Recontract
26
+ * @entityType DEFAULT (Default)
27
+ * @event k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract
28
+ * @permission schema.action.createrecontract.trigger
29
+ * @benchmark This action is tracked for performance benchmarks
30
+ */
31
+ class CreateRecontractDto extends core_1.OdinRecordCreateDto {
32
+ constructor(properties, options) {
33
+ super({
34
+ entity: 'OrderModule:Recontract',
35
+ type: 'DEFAULT',
36
+ properties,
37
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
38
+ });
39
+ this.actionName = 'CreateRecontract';
40
+ this.schemaActionId = 'ca8242d6-738e-49b0-9822-8804ac5c379e';
41
+ this.entity = 'OrderModule:Recontract';
42
+ }
43
+ }
44
+ exports.CreateRecontractDto = CreateRecontractDto;
45
+ /** Used by SDK generators to identify action type */
46
+ CreateRecontractDto.ACTION_TYPE = 'CREATE';
47
+ CreateRecontractDto.ACTION_KEY = 'CreateRecontract';
48
+ CreateRecontractDto.MODULE_NAME = 'OrderModule';
49
+ CreateRecontractDto.ENTITIES = ['Recontract'];
50
+ CreateRecontractDto.ENTITY_TYPE = 'DEFAULT';
51
+ CreateRecontractDto.EVENT_NAME = 'k1.t-hEOJjsDb.OrderModule.Recontract.Create.CreateRecontract';
52
+ CreateRecontractDto.PERMISSION = 'schema.action.createrecontract.trigger';
53
+ /** Step metadata - entity this action targets */
54
+ CreateRecontractDto.STEP_ENTITY = 'OrderModule:Recontract';
55
+ CreateRecontractDto.STEP_SCHEMA_ID = '737797cf-3ab0-49da-827c-18ec499db889';
56
+ CreateRecontractDto.STEP_SCHEMA_ACTION_ID = 'ca8242d6-738e-49b0-9822-8804ac5c379e';
57
+ CreateRecontractDto.STEP_SCHEMA_TYPE_ID = '61db803a-cf84-4fee-b460-eb0cba01b705';
58
+ CreateRecontractDto.STEP_TYPE = 'DEFAULT';
59
+ CreateRecontractDto.AUTO_LINK_PARENT = true;
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Recontract DB Accessor
3
+ *
4
+ * Provides typed access to Recontract records via direct database access.
5
+ * For use in backend services with principal + dbService.
6
+ * Returns wrapped records with typed action methods.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Simple get
11
+ * const record = await accessor.get(id);
12
+ *
13
+ * // With related entities
14
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
15
+ *
16
+ * // With permissions bypass (separate options)
17
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
18
+ *
19
+ * // Silent write (no RabbitMQ events)
20
+ * const result = await accessor.upsert([dto], { omitWriteEvents: true });
21
+ *
22
+ * // Constructor-level default (applies to all calls)
23
+ * const accessor = new RecontractDbAccessor(principal, dbService, { omitPermissionsCheck: true });
24
+ * ```
25
+ *
26
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
27
+ */
28
+ import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
29
+ import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
30
+ import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
31
+ import { RecontractProperties } from '../entities-v2/Recontract';
32
+ import { RecontractRecord } from '../records-v2/RecontractRecord';
33
+ /** Search response with wrapped records */
34
+ export interface RecontractDbSearchResponse {
35
+ records: RecontractRecord[];
36
+ totalRecords: number;
37
+ hasMore: boolean;
38
+ }
39
+ export declare class RecontractDbAccessor {
40
+ private readonly _provider;
41
+ private readonly _moduleName;
42
+ private readonly _entityName;
43
+ private readonly _defaultOptions?;
44
+ /**
45
+ * Create a new RecontractDbAccessor
46
+ * @param principal - The authenticated principal
47
+ * @param dbService - The database service instance
48
+ * @param defaultOptions - Default provider options applied to all operations
49
+ */
50
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
51
+ get moduleName(): string;
52
+ get entityName(): string;
53
+ /**
54
+ * Create a new empty Recontract record instance for create operations.
55
+ * Pre-generates an ID that can be referenced before the record is saved.
56
+ *
57
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
58
+ * @returns A new record wrapper with pre-generated ID
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * // Auto-generated ID
63
+ * const note = odinDb.notes.new();
64
+ * console.log(note.id); // UUID available immediately
65
+ *
66
+ * // Custom ID
67
+ * const order = odinDb.orders.new("custom-id-123");
68
+ *
69
+ * // Reference ID before save
70
+ * const account = odinDb.accounts.new();
71
+ * const contact = odinDb.contacts.new();
72
+ * await contact
73
+ * .link({ id: account.id, entity: "CrmModule:Account" })
74
+ * .createContact({ FirstName: "John" });
75
+ * ```
76
+ */
77
+ new(id?: string): RecontractRecord;
78
+ /**
79
+ * Get a single Recontract record by ID
80
+ *
81
+ * @param id - The record ID
82
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
83
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * // Simple get
88
+ * const record = await accessor.get(id);
89
+ *
90
+ * // With related entities
91
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
92
+ *
93
+ * // With permissions bypass
94
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
95
+ *
96
+ * // Both options
97
+ * const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
98
+ * ```
99
+ */
100
+ get(id: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<RecontractRecord>;
101
+ /**
102
+ * Get multiple Recontract records by IDs
103
+ *
104
+ * @param ids - Array of record IDs
105
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
106
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
107
+ */
108
+ getMany(ids: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<RecontractRecord[]>;
109
+ /**
110
+ * Search Recontract records
111
+ *
112
+ * @param params - Search parameters
113
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
114
+ */
115
+ search(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<RecontractDbSearchResponse>;
116
+ /**
117
+ * Search all Recontract records with automatic pagination
118
+ *
119
+ * @param params - Search parameters
120
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
121
+ */
122
+ searchAll(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<RecontractRecord[]>;
123
+ /**
124
+ * Async generator for paginating through all matching records.
125
+ * Yields batches of wrapped records.
126
+ *
127
+ * @param params - Search parameters
128
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
129
+ */
130
+ paginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): AsyncGenerator<RecontractRecord[]>;
131
+ /**
132
+ * Create a fluent query builder for Recontract records
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * const results = await accessor
137
+ * .query()
138
+ * .where('Status', 'in', ['Active', 'Pending'])
139
+ * .where('CreatedAt', 'gte', '2025-01-01')
140
+ * .select('id', 'title', 'properties.*')
141
+ * .sortBy('createdAt', 'desc')
142
+ * .limit(100)
143
+ * .execute();
144
+ * ```
145
+ */
146
+ query(): QueryBuilder<RecontractProperties, RecontractRecord>;
147
+ /** Access the underlying DbProvider */
148
+ get provider(): DbProvider;
149
+ }
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+ /**
3
+ * Recontract DB Accessor
4
+ *
5
+ * Provides typed access to Recontract records via direct database access.
6
+ * For use in backend services with principal + dbService.
7
+ * Returns wrapped records with typed action methods.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Simple get
12
+ * const record = await accessor.get(id);
13
+ *
14
+ * // With related entities
15
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
16
+ *
17
+ * // With permissions bypass (separate options)
18
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
19
+ *
20
+ * // Silent write (no RabbitMQ events)
21
+ * const result = await accessor.upsert([dto], { omitWriteEvents: true });
22
+ *
23
+ * // Constructor-level default (applies to all calls)
24
+ * const accessor = new RecontractDbAccessor(principal, dbService, { omitPermissionsCheck: true });
25
+ * ```
26
+ *
27
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
28
+ */
29
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
30
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
31
+ return new (P || (P = Promise))(function (resolve, reject) {
32
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
33
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
34
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
35
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
36
+ });
37
+ };
38
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
39
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
40
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
41
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
42
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
43
+ 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); }); }; }
44
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
45
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
46
+ function fulfill(value) { resume("next", value); }
47
+ function reject(value) { resume("throw", value); }
48
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.RecontractDbAccessor = void 0;
52
+ const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
53
+ const query_builder_1 = require("@d19n/odin-sdk-generator/dist/query-builder");
54
+ const RecontractRecord_1 = require("../records-v2/RecontractRecord");
55
+ class RecontractDbAccessor {
56
+ /**
57
+ * Create a new RecontractDbAccessor
58
+ * @param principal - The authenticated principal
59
+ * @param dbService - The database service instance
60
+ * @param defaultOptions - Default provider options applied to all operations
61
+ */
62
+ constructor(principal, dbService, defaultOptions) {
63
+ this._moduleName = 'OrderModule';
64
+ this._entityName = 'Recontract';
65
+ this._provider = new db_provider_1.DbProvider(principal, dbService, defaultOptions);
66
+ this._defaultOptions = defaultOptions;
67
+ }
68
+ get moduleName() { return this._moduleName; }
69
+ get entityName() { return this._entityName; }
70
+ // ============================================
71
+ // RECORD CREATION
72
+ // ============================================
73
+ /**
74
+ * Create a new empty Recontract record instance for create operations.
75
+ * Pre-generates an ID that can be referenced before the record is saved.
76
+ *
77
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
78
+ * @returns A new record wrapper with pre-generated ID
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * // Auto-generated ID
83
+ * const note = odinDb.notes.new();
84
+ * console.log(note.id); // UUID available immediately
85
+ *
86
+ * // Custom ID
87
+ * const order = odinDb.orders.new("custom-id-123");
88
+ *
89
+ * // Reference ID before save
90
+ * const account = odinDb.accounts.new();
91
+ * const contact = odinDb.contacts.new();
92
+ * await contact
93
+ * .link({ id: account.id, entity: "CrmModule:Account" })
94
+ * .createContact({ FirstName: "John" });
95
+ * ```
96
+ */
97
+ new(id) {
98
+ return new RecontractRecord_1.RecontractRecord(null, this._provider, id);
99
+ }
100
+ // ============================================
101
+ // RECORD RETRIEVAL
102
+ // ============================================
103
+ /**
104
+ * Get a single Recontract record by ID
105
+ *
106
+ * @param id - The record ID
107
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
108
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * // Simple get
113
+ * const record = await accessor.get(id);
114
+ *
115
+ * // With related entities
116
+ * const record = await accessor.get(id, { entities: ["Contact", "Address"] });
117
+ *
118
+ * // With permissions bypass
119
+ * const record = await accessor.get(id, {}, { omitPermissionsCheck: true });
120
+ *
121
+ * // Both options
122
+ * const record = await accessor.get(id, { entities: ["Invoice"] }, { omitPermissionsCheck: true });
123
+ * ```
124
+ */
125
+ get(id, queryOptions, providerOptions) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ const record = yield this._provider._getByPrimaryKey(this._moduleName, this._entityName, id, queryOptions, providerOptions);
128
+ return new RecontractRecord_1.RecontractRecord(record, this._provider);
129
+ });
130
+ }
131
+ /**
132
+ * Get multiple Recontract records by IDs
133
+ *
134
+ * @param ids - Array of record IDs
135
+ * @param queryOptions - Query options (WHAT to fetch: entities to include)
136
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
137
+ */
138
+ getMany(ids, queryOptions, providerOptions) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ if (ids.length === 0)
141
+ return [];
142
+ const records = yield this._provider._getManyByPrimaryKey(this._moduleName, this._entityName, ids, queryOptions, providerOptions);
143
+ return records.map((r) => new RecontractRecord_1.RecontractRecord(r, this._provider));
144
+ });
145
+ }
146
+ // ============================================
147
+ // SEARCH OPERATIONS
148
+ // ============================================
149
+ /**
150
+ * Search Recontract records
151
+ *
152
+ * @param params - Search parameters
153
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
154
+ */
155
+ search(params, providerOptions) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const result = yield this._provider._searchRecords(this._moduleName, this._entityName, params, providerOptions);
158
+ return {
159
+ records: result.records.map((r) => new RecontractRecord_1.RecontractRecord(r, this._provider)),
160
+ totalRecords: result.totalRecords,
161
+ hasMore: result.hasMore,
162
+ };
163
+ });
164
+ }
165
+ /**
166
+ * Search all Recontract records with automatic pagination
167
+ *
168
+ * @param params - Search parameters
169
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
170
+ */
171
+ searchAll(params, providerOptions) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params, 0, providerOptions);
174
+ return result.records.map((r) => new RecontractRecord_1.RecontractRecord(r, this._provider));
175
+ });
176
+ }
177
+ /**
178
+ * Async generator for paginating through all matching records.
179
+ * Yields batches of wrapped records.
180
+ *
181
+ * @param params - Search parameters
182
+ * @param providerOptions - Provider options (HOW to fetch: omitPermissionsCheck)
183
+ */
184
+ paginate(params, providerOptions) {
185
+ var _a;
186
+ return __asyncGenerator(this, arguments, function* paginate_1() {
187
+ let hasMore = true;
188
+ let searchAfter;
189
+ const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
190
+ while (hasMore) {
191
+ const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) }), providerOptions));
192
+ if (result.records.length > 0) {
193
+ yield yield __await(result.records.map((r) => new RecontractRecord_1.RecontractRecord(r, this._provider)));
194
+ const lastRecord = result.records[result.records.length - 1];
195
+ searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
196
+ }
197
+ hasMore = result.hasMore && result.records.length >= query.pageSize;
198
+ }
199
+ });
200
+ }
201
+ // ============================================
202
+ // QUERY BUILDER
203
+ // ============================================
204
+ /**
205
+ * Create a fluent query builder for Recontract records
206
+ *
207
+ * @example
208
+ * ```typescript
209
+ * const results = await accessor
210
+ * .query()
211
+ * .where('Status', 'in', ['Active', 'Pending'])
212
+ * .where('CreatedAt', 'gte', '2025-01-01')
213
+ * .select('id', 'title', 'properties.*')
214
+ * .sortBy('createdAt', 'desc')
215
+ * .limit(100)
216
+ * .execute();
217
+ * ```
218
+ */
219
+ query() {
220
+ return (0, query_builder_1.createQueryBuilder)(this);
221
+ }
222
+ /** Access the underlying DbProvider */
223
+ get provider() {
224
+ return this._provider;
225
+ }
226
+ }
227
+ exports.RecontractDbAccessor = RecontractDbAccessor;
@@ -93,6 +93,7 @@ export { PgWebhookDbAccessor, PgWebhookDbSearchResponse } from './PgWebhookDbAcc
93
93
  export { PriceBookDbAccessor, PriceBookDbSearchResponse } from './PriceBookDbAccessor';
94
94
  export { ProductDbAccessor, ProductDbSearchResponse } from './ProductDbAccessor';
95
95
  export { PushNotificationDbAccessor, PushNotificationDbSearchResponse } from './PushNotificationDbAccessor';
96
+ export { RecontractDbAccessor, RecontractDbSearchResponse } from './RecontractDbAccessor';
96
97
  export { ReferralDbAccessor, ReferralDbSearchResponse } from './ReferralDbAccessor';
97
98
  export { RegionDbAccessor, RegionDbSearchResponse } from './RegionDbAccessor';
98
99
  export { RemediationOutcomeFormDbAccessor, RemediationOutcomeFormDbSearchResponse } from './RemediationOutcomeFormDbAccessor';
@@ -10,8 +10,8 @@
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.NoteDbAccessor = exports.NetworkDeviceDbAccessor = exports.ModifyServiceRequestDbAccessor = exports.MessageDbAccessor = exports.LeadDbAccessor = exports.KnowledgeArticleDbAccessor = exports.InvoiceDbAccessor = exports.InvoiceItemDbAccessor = exports.ImpersonationTrackerDbAccessor = exports.FileDbAccessor = exports.FieldServiceProductDbAccessor = exports.FieldServiceDispatchedProductDbAccessor = exports.ExchangeDbAccessor = exports.EmailTemplateDbAccessor = exports.EmailSenderDbAccessor = exports.EmailDbAccessor = exports.DiscountDbAccessor = exports.DataIssueDbAccessor = exports.CustomerPhonePortingDbAccessor = exports.CustomerDeviceRouterDbAccessor = exports.CustomerDeviceDbAccessor = exports.CustomerDeviceOntDbAccessor = exports.CustomerDeviceConfigurationDbAccessor = exports.CustomerDeviceAtaDbAccessor = exports.CrmDatasetDbAccessor = exports.CreditNoteDbAccessor = exports.ConversationSummaryFeedbackDbAccessor = exports.ConversationDbAccessor = exports.ContractBuyOutDbAccessor = exports.ContactDbAccessor = exports.ContactIdentityDbAccessor = exports.ConfigDbAccessor = exports.ChurnRequestDbAccessor = exports.ChangeReasonDbAccessor = exports.CaseDbAccessor = exports.CampaignDbAccessor = exports.CallDbAccessor = exports.CallLegDbAccessor = exports.BrskEntityMigrationErrorDbAccessor = exports.BngProvisionDbAccessor = exports.BillingRequestDbAccessor = exports.BillingAdjustmentDbAccessor = exports.AppointmentDbAccessor = exports.AffiliateCodeDbAccessor = exports.AddressDbAccessor = exports.AddressInteractionDbAccessor = exports.ActivityDbAccessor = exports.ActivityLogDbAccessor = exports.AccountDbAccessor = exports.AccountCreditDbAccessor = void 0;
13
- exports.SmsTemplateDbAccessor = exports.SmsMessageDbAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormDbAccessor = exports.ServiceDbAccessor = exports.ServiceAppointmentDbAccessor = exports.ServiceAppointmentConfigDbAccessor = exports.ScheduleSlotDbAccessor = exports.SalesTerritoryDbAccessor = exports.RewardDbAccessor = exports.ReturnsDbAccessor = exports.RemediationRequiredReasonDbAccessor = exports.RemediationOutcomeFormDbAccessor = exports.RegionDbAccessor = exports.ReferralDbAccessor = exports.PushNotificationDbAccessor = exports.ProductDbAccessor = exports.PriceBookDbAccessor = exports.PgWebhookDbAccessor = exports.PgWebhookAttemptDbAccessor = exports.PgVocalinkDbAccessor = exports.PgTransactionDbAccessor = exports.PgSortCodeSubstitutionDbAccessor = exports.PgReportEventDbAccessor = exports.PgPaymentMethodDbAccessor = exports.PgLogDbAccessor = exports.PgFileAllocationDbAccessor = exports.PgDisputeDbAccessor = exports.PgDirectDebitFileDbAccessor = exports.PgContactDbAccessor = exports.PgAccountValidationDbAccessor = exports.PermissionToFailDbAccessor = exports.PaymentDbAccessor = exports.PaymentMethodRefundDbAccessor = exports.PaymentMethodDbAccessor = exports.PICRequestDbAccessor = exports.OverlayRealA55DbAccessor = exports.OutboundDialSessionDbAccessor = exports.OutboundDialCampaignDbAccessor = exports.OutboundDialCampaignCaseDbAccessor = exports.OutageDbAccessor = exports.OrderDbAccessor = exports.OrderKciDbAccessor = exports.OrderItemDbAccessor = exports.OrderCheckDbAccessor = exports.OntReplacementApprovalDbAccessor = exports.OneTouchSwitchDbAccessor = exports.OhExternalAuditDbAccessor = exports.OfferTemplateDbAccessor = exports.OfferDbAccessor = exports.NotificationTemplateDbAccessor = void 0;
14
- exports.YfWifiSurveyDbAccessor = exports.YfFieldServiceVisitDbAccessor = exports.YfAgentLocationDbAccessor = exports.WorkOrderStatusUpdateDbAccessor = exports.WorkOrderDbAccessor = exports.WayleaveAuditDbAccessor = exports.VoiceConfigurationDbAccessor = exports.VisitDbAccessor = exports.UserDbAccessor = exports.UgExternalAuditDbAccessor = exports.TwilioWorkerDbAccessor = exports.TwilioUserUpdateDbAccessor = exports.TwilioTaskQueueDbAccessor = exports.TwilioCallEventDbAccessor = exports.TwilioActivityDbAccessor = exports.TransactionDbAccessor = exports.TimeSlotDbAccessor = exports.TeamDbAccessor = void 0;
13
+ exports.SmsMessageDbAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormDbAccessor = exports.ServiceDbAccessor = exports.ServiceAppointmentDbAccessor = exports.ServiceAppointmentConfigDbAccessor = exports.ScheduleSlotDbAccessor = exports.SalesTerritoryDbAccessor = exports.RewardDbAccessor = exports.ReturnsDbAccessor = exports.RemediationRequiredReasonDbAccessor = exports.RemediationOutcomeFormDbAccessor = exports.RegionDbAccessor = exports.ReferralDbAccessor = exports.RecontractDbAccessor = exports.PushNotificationDbAccessor = exports.ProductDbAccessor = exports.PriceBookDbAccessor = exports.PgWebhookDbAccessor = exports.PgWebhookAttemptDbAccessor = exports.PgVocalinkDbAccessor = exports.PgTransactionDbAccessor = exports.PgSortCodeSubstitutionDbAccessor = exports.PgReportEventDbAccessor = exports.PgPaymentMethodDbAccessor = exports.PgLogDbAccessor = exports.PgFileAllocationDbAccessor = exports.PgDisputeDbAccessor = exports.PgDirectDebitFileDbAccessor = exports.PgContactDbAccessor = exports.PgAccountValidationDbAccessor = exports.PermissionToFailDbAccessor = exports.PaymentDbAccessor = exports.PaymentMethodRefundDbAccessor = exports.PaymentMethodDbAccessor = exports.PICRequestDbAccessor = exports.OverlayRealA55DbAccessor = exports.OutboundDialSessionDbAccessor = exports.OutboundDialCampaignDbAccessor = exports.OutboundDialCampaignCaseDbAccessor = exports.OutageDbAccessor = exports.OrderDbAccessor = exports.OrderKciDbAccessor = exports.OrderItemDbAccessor = exports.OrderCheckDbAccessor = exports.OntReplacementApprovalDbAccessor = exports.OneTouchSwitchDbAccessor = exports.OhExternalAuditDbAccessor = exports.OfferTemplateDbAccessor = exports.OfferDbAccessor = exports.NotificationTemplateDbAccessor = void 0;
14
+ exports.YfWifiSurveyDbAccessor = exports.YfFieldServiceVisitDbAccessor = exports.YfAgentLocationDbAccessor = exports.WorkOrderStatusUpdateDbAccessor = exports.WorkOrderDbAccessor = exports.WayleaveAuditDbAccessor = exports.VoiceConfigurationDbAccessor = exports.VisitDbAccessor = exports.UserDbAccessor = exports.UgExternalAuditDbAccessor = exports.TwilioWorkerDbAccessor = exports.TwilioUserUpdateDbAccessor = exports.TwilioTaskQueueDbAccessor = exports.TwilioCallEventDbAccessor = exports.TwilioActivityDbAccessor = exports.TransactionDbAccessor = exports.TimeSlotDbAccessor = exports.TeamDbAccessor = exports.SmsTemplateDbAccessor = void 0;
15
15
  var AccountCreditDbAccessor_1 = require("./AccountCreditDbAccessor");
16
16
  Object.defineProperty(exports, "AccountCreditDbAccessor", { enumerable: true, get: function () { return AccountCreditDbAccessor_1.AccountCreditDbAccessor; } });
17
17
  var AccountDbAccessor_1 = require("./AccountDbAccessor");
@@ -184,6 +184,8 @@ var ProductDbAccessor_1 = require("./ProductDbAccessor");
184
184
  Object.defineProperty(exports, "ProductDbAccessor", { enumerable: true, get: function () { return ProductDbAccessor_1.ProductDbAccessor; } });
185
185
  var PushNotificationDbAccessor_1 = require("./PushNotificationDbAccessor");
186
186
  Object.defineProperty(exports, "PushNotificationDbAccessor", { enumerable: true, get: function () { return PushNotificationDbAccessor_1.PushNotificationDbAccessor; } });
187
+ var RecontractDbAccessor_1 = require("./RecontractDbAccessor");
188
+ Object.defineProperty(exports, "RecontractDbAccessor", { enumerable: true, get: function () { return RecontractDbAccessor_1.RecontractDbAccessor; } });
187
189
  var ReferralDbAccessor_1 = require("./ReferralDbAccessor");
188
190
  Object.defineProperty(exports, "ReferralDbAccessor", { enumerable: true, get: function () { return ReferralDbAccessor_1.ReferralDbAccessor; } });
189
191
  var RegionDbAccessor_1 = require("./RegionDbAccessor");
@@ -21,6 +21,7 @@ import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/
21
21
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
22
22
  import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
23
23
  import { CustomerDeviceRouterProperties } from '../entities-v2/CustomerDeviceRouter';
24
+ import { CreateCustomerDeviceRouterFromDispatchProperties } from '../actions-v2/CreateCustomerDeviceRouterFromDispatchDto';
24
25
  import { CustomerDeviceRouterCreateProperties } from '../actions-v2/CustomerDeviceRouterCreateDto';
25
26
  import { CustomerDeviceRouterUpdateProperties } from '../actions-v2/CustomerDeviceRouterUpdateDto';
26
27
  import { FileRecord } from './FileRecord';
@@ -272,6 +273,34 @@ export declare class CustomerDeviceRouterRecord<TProps = CustomerDeviceRouterPro
272
273
  unlink(target: OdinRecord<any> | {
273
274
  id: string;
274
275
  } | string): Promise<void>;
276
+ /**
277
+ * CreateCustomerDeviceRouterFromDispatch
278
+ *
279
+ * Creates a new CustomerDeviceRouter record with the specified properties.
280
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
281
+ *
282
+ * @param properties - The properties for the new record
283
+ * @param options - Optional settings
284
+ * @param options.type - Override the record type
285
+ * @param options.journeyId - Associate with a journey
286
+ * @param options.stageKey - Set initial pipeline stage
287
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
288
+ *
289
+ * @example
290
+ * ```typescript
291
+ * // Create with properties
292
+ * const record = odinClient.customerDeviceRouters.new();
293
+ * await record.createCustomerDeviceRouterFromDispatch({ ... }).execute();
294
+ *
295
+ * // Dry run (for debugging)
296
+ * const payload = record.createCustomerDeviceRouterFromDispatch({ ... }).dryRun();
297
+ * ```
298
+ */
299
+ createCustomerDeviceRouterFromDispatch(properties?: CreateCustomerDeviceRouterFromDispatchProperties, options?: {
300
+ type?: string;
301
+ journeyId?: string;
302
+ stageKey?: string;
303
+ }): ActionBuilder;
275
304
  /**
276
305
  * CustomerDeviceRouterCreate
277
306
  *
@@ -395,6 +395,42 @@ class CustomerDeviceRouterRecord {
395
395
  // ============================================
396
396
  // CREATE ACTIONS (no existing record required)
397
397
  // ============================================
398
+ /**
399
+ * CreateCustomerDeviceRouterFromDispatch
400
+ *
401
+ * Creates a new CustomerDeviceRouter record with the specified properties.
402
+ * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
403
+ *
404
+ * @param properties - The properties for the new record
405
+ * @param options - Optional settings
406
+ * @param options.type - Override the record type
407
+ * @param options.journeyId - Associate with a journey
408
+ * @param options.stageKey - Set initial pipeline stage
409
+ * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
410
+ *
411
+ * @example
412
+ * ```typescript
413
+ * // Create with properties
414
+ * const record = odinClient.customerDeviceRouters.new();
415
+ * await record.createCustomerDeviceRouterFromDispatch({ ... }).execute();
416
+ *
417
+ * // Dry run (for debugging)
418
+ * const payload = record.createCustomerDeviceRouterFromDispatch({ ... }).dryRun();
419
+ * ```
420
+ */
421
+ createCustomerDeviceRouterFromDispatch(properties, options) {
422
+ var _a, _b;
423
+ const payload = {
424
+ entity: 'ServiceModule:CustomerDeviceRouter',
425
+ type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
426
+ actionName: 'CreateCustomerDeviceRouterFromDispatch',
427
+ properties: properties || {},
428
+ associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
429
+ journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
430
+ stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
431
+ };
432
+ return new ActionBuilder(this._provider, 'ServiceModule', 'CustomerDeviceRouter', payload, () => { this._pendingLinks = []; });
433
+ }
398
434
  /**
399
435
  * CustomerDeviceRouterCreate
400
436
  *
@@ -70,6 +70,7 @@ import { ActivityLogRecord } from './ActivityLogRecord';
70
70
  import { InvoiceRecord } from './InvoiceRecord';
71
71
  import { ModifyServiceRequestRecord } from './ModifyServiceRequestRecord';
72
72
  import { ContactRecord } from './ContactRecord';
73
+ import { RecontractRecord } from './RecontractRecord';
73
74
  import { DataIssueRecord } from './DataIssueRecord';
74
75
  import { WorkOrderRecord } from './WorkOrderRecord';
75
76
  /**
@@ -727,6 +728,7 @@ export declare class OrderRecord<TProps = OrderProperties> {
727
728
  private _invoices?;
728
729
  private _modifyServiceRequests?;
729
730
  private _contacts?;
731
+ private _recontracts?;
730
732
  private _dataIssues?;
731
733
  private _workOrders?;
732
734
  /**
@@ -1312,6 +1314,24 @@ export declare class OrderRecord<TProps = OrderProperties> {
1312
1314
  * ```
1313
1315
  */
1314
1316
  get contacts(): RecordLinkManager<ContactRecord, typeof OrderRecord['contactsLabels'][number]>;
1317
+ /** Valid labels for Recontract associations */
1318
+ static readonly recontractsLabels: readonly ["Recontract__Order"];
1319
+ /**
1320
+ * Access linked Recontract records
1321
+ * @remarks Available labels: Recontract__Order
1322
+ * @throws Error if called on a new (unsaved) record
1323
+ *
1324
+ * @example
1325
+ * ```typescript
1326
+ * // Get all linked Recontract records
1327
+ * const items = await record.recontracts.list();
1328
+ * const first = await record.recontracts.first();
1329
+ *
1330
+ * // Filter by label
1331
+ * const specific = await record.recontracts.first({ label: 'Recontract__Order' });
1332
+ * ```
1333
+ */
1334
+ get recontracts(): RecordLinkManager<RecontractRecord, typeof OrderRecord['recontractsLabels'][number]>;
1315
1335
  /** Valid labels for DataIssue associations */
1316
1336
  static readonly dataIssuesLabels: readonly ["DataIssue__Order"];
1317
1337
  /**