@microsoft/managed-apps-codegen 0.2.8 → 0.2.10

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 CHANGED
@@ -1,37 +1,3 @@
1
1
  # @microsoft/managed-apps-codegen
2
2
 
3
- AST-based TypeScript code generation for Managed Apps, built on [ts-morph](https://ts-morph.com/).
4
-
5
- ## Overview
6
-
7
- This package provides the V2 codegen pipeline extracted from `@microsoft/managed-apps-actions`. It uses ts-morph to generate syntactically valid TypeScript by construction, with Prettier formatting applied at commit time.
8
-
9
- See [DESIGN.md](./DESIGN.md) for architectural rationale and [ONBOARDING.md](./ONBOARDING.md) for a practical guide to extending the generators.
10
-
11
- ## Exports
12
-
13
- ### `@microsoft/managed-apps-codegen`
14
-
15
- | Export | Description |
16
- | ----------------------- | ------------------------------------------------------------------------------ |
17
- | `CodegenProject` | In-memory ts-morph project; buffers files and flushes atomically on `commit()` |
18
- | `defaultPrettierConfig` | Shared Prettier config used during `commit()` |
19
- | `ICodegenContext` | Context type passed to generator functions |
20
- | `ICodegenProject` | Interface implemented by `CodegenProject` |
21
-
22
- ### `@microsoft/managed-apps-codegen/dataverse`
23
-
24
- | Export | Description |
25
- | -------------------------- | --------------------------------------------------------------------- |
26
- | `generateDataverseModel` | Generates a Dataverse entity model file (interfaces, optionset enums) |
27
- | `generateDataverseService` | Generates a Dataverse CRUD service file |
28
-
29
- ## Scripts
30
-
31
- ```bash
32
- bun run build # Compile to dist/
33
- bun run check-types # TypeScript type checking
34
- bun run test # Run tests
35
- bun run lint # ESLint
36
- bun run clean # Remove build artifacts
37
- ```
3
+ AST-based TypeScript code generation for the Microsoft Managed Apps stack, built on [ts-morph](https://ts-morph.com/). It generates the typed data-source client code (Dataverse models and services) emitted during developer actions. Internal implementation detail of [`@microsoft/managed-apps-actions`](https://www.npmjs.com/package/@microsoft/managed-apps-actions).
@@ -4,14 +4,68 @@
4
4
  import type { ICodegenContext } from '../shared/types.js';
5
5
  interface GenerateServiceContext {
6
6
  parentContext: ICodegenContext;
7
+ /** Dataverse org URL (e.g. https://contoso.crm.dynamics.com). Baked into the generated file as the `ORG` constant. */
8
+ orgUrl: string;
9
+ /**
10
+ * Dataverse entity logical name (e.g. 'account'). Used as the `dataSourceName` class
11
+ * property — the stable user-facing identifier for the table.
12
+ */
13
+ logicalName: string;
14
+ /**
15
+ * Dataverse entity-set name (e.g. 'accounts'). Baked into the generated file as the
16
+ * `ENTITY` constant and passed to the CDS connector's `entityName` parameter on every
17
+ * call. Always provided by `prepareDataverseSchema` — never derived from the logical
18
+ * name because Dataverse plurals are irregular (e.g. 'opportunity' → 'opportunities').
19
+ */
20
+ entitySetName: string;
21
+ /**
22
+ * Class name of the shared CDS connector service this per-table service delegates to
23
+ * (e.g. `MicrosoftDataverseService`). Resolved from the previously-generated swagger
24
+ * service for `shared_commondataserviceforapps`. The matching file is expected to live
25
+ * alongside the per-table service in the same `services/` folder under this name.
26
+ */
27
+ sharedServiceName: string;
28
+ /**
29
+ * Dataverse primary id attribute (e.g. 'accountid'). Stripped from the `CreateRecord`
30
+ * input type via `Omit<...>` since the server auto-generates it. Empty string disables
31
+ * the omit (kept for minimal inline test fixtures).
32
+ */
7
33
  primaryKey: string;
34
+ /** When the entity has lookup columns, the model splits into `<Model>Base` (write) and `<Model>` (read). */
8
35
  hasLookupColumns: boolean;
9
36
  multiSelectPicklistFields: string[];
10
37
  fileColumnNames: string[];
11
38
  imageColumnNames: string[];
12
39
  serviceFilePath: string;
13
- dataSourcesFilePath: string;
14
40
  }
15
- export declare function generateDataverseService({ parentContext, primaryKey, hasLookupColumns, multiSelectPicklistFields, fileColumnNames, imageColumnNames, serviceFilePath, dataSourcesFilePath, }: GenerateServiceContext): Promise<void>;
41
+ /**
42
+ * Generates a per-table Dataverse service whose methods mirror the
43
+ * `shared_commondataserviceforapps` connector's `*WithOrganization` operations 1:1.
44
+ *
45
+ * Each method:
46
+ * - is named after the underlying connector operation ID with the `WithOrganization` suffix
47
+ * stripped (kept in PascalCase so it matches the connector reference docs verbatim);
48
+ * - accepts the connector op's parameters in the same order and with the same names,
49
+ * minus `organization` and `entityName` (those are module-level constants);
50
+ * - delegates to the shared, generated `CommonDataServiceForAppsService` class which
51
+ * handles the actual `executeAsync({ connectorOperation })` call.
52
+ *
53
+ * Multi-select picklist fields are serialized on writes and deserialized on reads using
54
+ * the existing SDK helpers (the connector forwards/returns these as comma-joined strings).
55
+ *
56
+ * Methods emitted (when applicable to the entity):
57
+ * 1. CreateRecord
58
+ * 2. UpdateRecord (upsert)
59
+ * 3. UpdateOnlyRecord (update only — fails when the record does not exist)
60
+ * 4. DeleteRecord
61
+ * 5. GetItem
62
+ * 6. ListRecords
63
+ * 7. GetEntityFileImageFieldContent (only when the entity has file or image columns)
64
+ * 8. UpdateEntityFileImageFieldContent (only when the entity has file or image columns)
65
+ * 9. AssociateEntities
66
+ * 10. DisassociateEntities
67
+ * 11. PerformBoundAction
68
+ */
69
+ export declare function generateDataverseService({ parentContext, orgUrl, logicalName, entitySetName, sharedServiceName, primaryKey, hasLookupColumns, multiSelectPicklistFields, fileColumnNames, imageColumnNames, serviceFilePath, }: GenerateServiceContext): Promise<void>;
16
70
  export default generateDataverseService;
17
71
  //# sourceMappingURL=generateDataverseService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateDataverseService.d.ts","sourceRoot":"","sources":["../../src/Dataverse/generateDataverseService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,UAAU,sBAAsB;IAC9B,aAAa,EAAE,eAAe,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yBAAyB,EAAE,MAAM,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,wBAAwB,CAAC,EAC7C,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyUxC;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"generateDataverseService.d.ts","sourceRoot":"","sources":["../../src/Dataverse/generateDataverseService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,UAAU,sBAAsB;IAC9B,aAAa,EAAE,eAAe,CAAC;IAC/B,sHAAsH;IACtH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yBAAyB,EAAE,MAAM,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,aAAa,EACb,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyWxC;AAED,eAAe,wBAAwB,CAAC"}
@@ -1,66 +1,64 @@
1
1
  /*!
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
- import { Scope } from 'ts-morph';
4
+ import { Scope, VariableDeclarationKind } from 'ts-morph';
5
5
  import { convertToValidIdentifier } from '../shared/nameUtils.js';
6
- export async function generateDataverseService({ parentContext, primaryKey, hasLookupColumns, multiSelectPicklistFields, fileColumnNames, imageColumnNames, serviceFilePath, dataSourcesFilePath, }) {
7
- const { modelName, dataSourceName, project } = parentContext;
8
- const serviceName = `${convertToValidIdentifier(modelName)}Service`;
9
- // When there are lookup columns the model generator emits a separate ModelNameBase interface
10
- // for write operations (create/update) and ModelName extends it for read operations.
11
- // When there are none, a single ModelName interface covers all operations.
12
- const writeTypeName = hasLookupColumns
13
- ? `${convertToValidIdentifier(modelName)}Base`
14
- : convertToValidIdentifier(modelName);
15
- const readTypeName = convertToValidIdentifier(modelName);
6
+ /**
7
+ * Generates a per-table Dataverse service whose methods mirror the
8
+ * `shared_commondataserviceforapps` connector's `*WithOrganization` operations 1:1.
9
+ *
10
+ * Each method:
11
+ * - is named after the underlying connector operation ID with the `WithOrganization` suffix
12
+ * stripped (kept in PascalCase so it matches the connector reference docs verbatim);
13
+ * - accepts the connector op's parameters in the same order and with the same names,
14
+ * minus `organization` and `entityName` (those are module-level constants);
15
+ * - delegates to the shared, generated `CommonDataServiceForAppsService` class which
16
+ * handles the actual `executeAsync({ connectorOperation })` call.
17
+ *
18
+ * Multi-select picklist fields are serialized on writes and deserialized on reads using
19
+ * the existing SDK helpers (the connector forwards/returns these as comma-joined strings).
20
+ *
21
+ * Methods emitted (when applicable to the entity):
22
+ * 1. CreateRecord
23
+ * 2. UpdateRecord (upsert)
24
+ * 3. UpdateOnlyRecord (update only — fails when the record does not exist)
25
+ * 4. DeleteRecord
26
+ * 5. GetItem
27
+ * 6. ListRecords
28
+ * 7. GetEntityFileImageFieldContent (only when the entity has file or image columns)
29
+ * 8. UpdateEntityFileImageFieldContent (only when the entity has file or image columns)
30
+ * 9. AssociateEntities
31
+ * 10. DisassociateEntities
32
+ * 11. PerformBoundAction
33
+ */
34
+ export async function generateDataverseService({ parentContext, orgUrl, logicalName, entitySetName, sharedServiceName, primaryKey, hasLookupColumns, multiSelectPicklistFields, fileColumnNames, imageColumnNames, serviceFilePath, }) {
35
+ const { modelName, project } = parentContext;
16
36
  const id = convertToValidIdentifier(modelName);
17
- const fileColumnNameType = `${id}FileColumnName`;
18
- const imageColumnNameType = `${id}ImageColumnName`;
37
+ const serviceName = `${id}Service`;
38
+ // Write shape = `<Model>Base` when the entity has lookups (the model emits a `_value` read shape on top);
39
+ // otherwise the single `<Model>` interface covers both.
40
+ const writeTypeName = hasLookupColumns ? `${id}Base` : id;
41
+ const readTypeName = id;
19
42
  const uploadColumnNameType = `${id}UploadColumnName`;
20
43
  const hasFileColumns = fileColumnNames.length > 0;
21
44
  const hasImageColumns = imageColumnNames.length > 0;
22
45
  const hasFileOrImageColumns = hasFileColumns || hasImageColumns;
23
46
  const hasMultiSelectFields = multiSelectPicklistFields.length > 0;
24
- const createParamType = primaryKey !== '' ? `Omit<${writeTypeName}, '${primaryKey}'>` : writeTypeName;
25
- const updateParamType = primaryKey !== '' ? `Partial<Omit<${writeTypeName}, '${primaryKey}'>>` : writeTypeName;
26
47
  const sourceFile = await project.createFile('service', serviceFilePath, '');
27
48
  // External package imports — fixMissingImports cannot resolve these.
28
- const dataValueImports = ['getClient'];
29
- if (hasMultiSelectFields) {
30
- dataValueImports.push('deserializeMultiSelectPicklistFields', 'serializeMultiSelectPicklistFields');
31
- }
32
- sourceFile.addImportDeclaration({
33
- moduleSpecifier: '@microsoft/managed-apps/data',
34
- namedImports: dataValueImports,
35
- });
36
49
  sourceFile.addImportDeclaration({
37
50
  moduleSpecifier: '@microsoft/managed-apps/data',
38
51
  namedImports: ['IOperationResult'],
39
52
  isTypeOnly: true,
40
53
  });
41
- sourceFile.addImportDeclaration({
42
- moduleSpecifier: '@microsoft/managed-apps/data/metadata/dataverse',
43
- namedImports: ['EntityMetadata', 'GetEntityMetadataOptions'],
44
- isTypeOnly: true,
45
- });
46
- sourceFile.addImportDeclaration({
47
- moduleSpecifier: dataSourcesFilePath,
48
- defaultImport: 'dataSources',
49
- });
50
- // Internal in-project type imports - fixMissingImports would auto-add these at commit time,
51
- // but it cannot detect that these are type-only imports. We add them explicitly to make them type-only.
52
- sourceFile.addImportDeclaration({
53
- moduleSpecifier: sourceFile.getRelativePathAsModuleSpecifierTo(project.getSourceFile('commonModel')),
54
- namedImports: ['IGetAllOptions', 'IGetOptions'],
55
- isTypeOnly: true,
56
- });
57
- const modelNamedImports = hasLookupColumns ? [writeTypeName, readTypeName] : [readTypeName];
58
- if (hasFileColumns) {
59
- modelNamedImports.push(fileColumnNameType);
60
- }
61
- if (hasImageColumns) {
62
- modelNamedImports.push(imageColumnNameType);
54
+ if (hasMultiSelectFields) {
55
+ sourceFile.addImportDeclaration({
56
+ moduleSpecifier: '@microsoft/managed-apps/data',
57
+ namedImports: ['deserializeMultiSelectPicklistFields', 'serializeMultiSelectPicklistFields'],
58
+ });
63
59
  }
60
+ // Internal in-project type imports — the model file exists on the project.
61
+ const modelNamedImports = hasLookupColumns ? [writeTypeName, readTypeName] : [readTypeName];
64
62
  if (hasFileOrImageColumns) {
65
63
  modelNamedImports.push(uploadColumnNameType);
66
64
  }
@@ -69,253 +67,311 @@ export async function generateDataverseService({ parentContext, primaryKey, hasL
69
67
  namedImports: modelNamedImports,
70
68
  isTypeOnly: true,
71
69
  });
72
- const multiSelectFieldsInitializer = `[${multiSelectPicklistFields.map((f) => `'${f}'`).join(', ')}] as const`;
70
+ // The shared connector-mirrored service. By convention it lives alongside the per-table
71
+ // services in the same generated `services/` folder. It is a named export (`export class`)
72
+ // from the swagger codegen, so we use a named import here.
73
+ sourceFile.addImportDeclaration({
74
+ moduleSpecifier: `./${sharedServiceName}`,
75
+ namedImports: [sharedServiceName],
76
+ });
77
+ // ── Module-level constants ────────────────────────────────────────────────
78
+ sourceFile.addVariableStatement({
79
+ declarationKind: VariableDeclarationKind.Const,
80
+ declarations: [{ name: 'ORG', initializer: JSON.stringify(orgUrl) }],
81
+ });
82
+ sourceFile.addVariableStatement({
83
+ declarationKind: VariableDeclarationKind.Const,
84
+ declarations: [{ name: 'ENTITY', initializer: JSON.stringify(entitySetName) }],
85
+ });
86
+ // Header-style swagger params are hidden from the per-table surface (spec §11.4).
87
+ // We always ask the connector to return the representation as JSON, and use the
88
+ // wildcard `If-Match` for update-only operations so the connector returns 412 when
89
+ // the record does not exist (which is what distinguishes "update only" from upsert).
90
+ sourceFile.addVariableStatement({
91
+ declarationKind: VariableDeclarationKind.Const,
92
+ declarations: [{ name: 'PREFER_REPRESENTATION', initializer: `'return=representation'` }],
93
+ });
94
+ sourceFile.addVariableStatement({
95
+ declarationKind: VariableDeclarationKind.Const,
96
+ declarations: [{ name: 'ACCEPT_JSON', initializer: `'application/json'` }],
97
+ });
98
+ sourceFile.addVariableStatement({
99
+ declarationKind: VariableDeclarationKind.Const,
100
+ declarations: [{ name: 'IF_MATCH_ANY', initializer: `'*'` }],
101
+ });
102
+ if (hasMultiSelectFields) {
103
+ const initializer = `[${multiSelectPicklistFields.map((f) => `'${f}'`).join(', ')}] as const`;
104
+ sourceFile.addVariableStatement({
105
+ declarationKind: VariableDeclarationKind.Const,
106
+ declarations: [{ name: 'MULTI_SELECT_FIELDS', initializer }],
107
+ });
108
+ }
109
+ // Base64 helpers: the connector marshals binary content as base64-encoded strings.
110
+ // Emit them only when this entity actually has file or image columns.
111
+ if (hasFileOrImageColumns) {
112
+ sourceFile.addFunction({
113
+ name: 'toBase64',
114
+ parameters: [{ name: 'bytes', type: 'Uint8Array' }],
115
+ returnType: 'string',
116
+ statements: [
117
+ `let binary = '';`,
118
+ `for (let i = 0; i < bytes.length; i++) { binary += String.fromCharCode(bytes[i]); }`,
119
+ `return btoa(binary);`,
120
+ ],
121
+ });
122
+ sourceFile.addFunction({
123
+ name: 'fromBase64',
124
+ parameters: [{ name: 'value', type: 'string' }],
125
+ returnType: 'Uint8Array',
126
+ statements: [
127
+ `const binary = atob(value);`,
128
+ `const bytes = new Uint8Array(binary.length);`,
129
+ `for (let i = 0; i < binary.length; i++) { bytes[i] = binary.charCodeAt(i); }`,
130
+ `return bytes;`,
131
+ ],
132
+ });
133
+ }
134
+ // ── Class body ────────────────────────────────────────────────────────────
135
+ // CreateRecord drops the primary id since the server auto-generates it (mirrors
136
+ // power-apps-cli codegen). Defensive: only apply `Omit` when we have a non-empty
137
+ // string primary key — defaults render as `Omit<…, 'undefined'>` otherwise.
138
+ const createParamType = typeof primaryKey === 'string' && primaryKey.length > 0
139
+ ? `Omit<${writeTypeName}, '${primaryKey}'>`
140
+ : writeTypeName;
141
+ const partialWriteType = `Partial<${writeTypeName}>`;
142
+ const readRecord = `Record<string, unknown>`;
143
+ // Statement helpers.
144
+ // The write shape is a generated interface (`<Model>Base` or `<Model>`) which has no
145
+ // string index signature, so TS rejects a direct cast to `Record<string, unknown>` —
146
+ // we go through `unknown` to make the structural-mismatch deliberate.
147
+ const serializeOnWrite = (paramName) => hasMultiSelectFields
148
+ ? `const serialized = serializeMultiSelectPicklistFields(${paramName} as unknown as ${readRecord}, MULTI_SELECT_FIELDS);`
149
+ : `const serialized = ${paramName} as unknown as ${readRecord};`;
150
+ const deserializeIfPresent = (resultVar) => hasMultiSelectFields
151
+ ? `if (${resultVar}.data) { deserializeMultiSelectPicklistFields(${resultVar}.data as ${readRecord}, MULTI_SELECT_FIELDS); }`
152
+ : '';
153
+ const deserializeArrayIfPresent = (resultVar) => hasMultiSelectFields
154
+ ? `if (${resultVar}.data) { for (const row of ${resultVar}.data) { deserializeMultiSelectPicklistFields(row as ${readRecord}, MULTI_SELECT_FIELDS); } }`
155
+ : '';
73
156
  sourceFile.addClass({
74
157
  name: serviceName,
75
158
  isExported: true,
159
+ isDefaultExport: true,
76
160
  properties: [
77
161
  {
78
162
  name: 'dataSourceName',
79
163
  isStatic: true,
80
164
  isReadonly: true,
81
- scope: Scope.Private,
82
- initializer: `'${dataSourceName.toLowerCase()}'`,
83
- },
84
- {
85
- name: 'client',
86
- isStatic: true,
87
- isReadonly: true,
88
- scope: Scope.Private,
89
- initializer: 'getClient(dataSources)',
165
+ scope: Scope.Public,
166
+ initializer: JSON.stringify(logicalName),
90
167
  },
91
- // Emitted only when the entity has MultiSelectPicklist columns. Used as the field list
92
- // passed to serializeMultiSelectPicklistFields / deserializeMultiSelectPicklistFields.
93
- ...(hasMultiSelectFields
94
- ? [
95
- {
96
- name: 'multiSelectPicklistFields',
97
- isStatic: true,
98
- isReadonly: true,
99
- scope: Scope.Private,
100
- initializer: multiSelectFieldsInitializer,
101
- },
102
- ]
103
- : []),
104
168
  ],
105
169
  methods: [
170
+ // ── 1. CreateRecord ────────────────────────────────────────────────
106
171
  {
107
- name: 'create',
172
+ name: 'CreateRecord',
108
173
  isStatic: true,
109
174
  isAsync: true,
110
175
  scope: Scope.Public,
111
- parameters: [{ name: 'record', type: createParamType }],
176
+ parameters: [{ name: 'item', type: createParamType }],
112
177
  returnType: `Promise<IOperationResult<${readTypeName}>>`,
113
- statements: hasMultiSelectFields
114
- ? [
115
- `const result = await ${serviceName}.client.createRecordAsync<Record<string, unknown>, ${readTypeName}>(${serviceName}.dataSourceName, serializeMultiSelectPicklistFields(record as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields));`,
116
- `if (result.data) { deserializeMultiSelectPicklistFields(result.data as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields); }`,
117
- 'return result;',
118
- ]
119
- : [
120
- `const result = await ${serviceName}.client.createRecordAsync<${createParamType}, ${readTypeName}>(${serviceName}.dataSourceName, record);`,
121
- 'return result;',
122
- ],
178
+ statements: [
179
+ serializeOnWrite('item'),
180
+ `const result = await ${sharedServiceName}.CreateRecordWithOrganization(PREFER_REPRESENTATION, ACCEPT_JSON, ORG, ENTITY, serialized);`,
181
+ deserializeIfPresent('result'),
182
+ `return result as unknown as IOperationResult<${readTypeName}>;`,
183
+ ].filter(Boolean),
123
184
  },
185
+ // ── 2. UpdateRecord (upsert) ───────────────────────────────────────
124
186
  {
125
- name: 'update',
187
+ name: 'UpdateRecord',
126
188
  isStatic: true,
127
189
  isAsync: true,
128
190
  scope: Scope.Public,
129
191
  parameters: [
130
- { name: 'id', type: 'string' },
131
- { name: 'changedFields', type: updateParamType },
192
+ { name: 'recordId', type: 'string' },
193
+ { name: 'item', type: partialWriteType },
132
194
  ],
133
195
  returnType: `Promise<IOperationResult<${readTypeName}>>`,
134
- statements: hasMultiSelectFields
135
- ? [
136
- `const result = await ${serviceName}.client.updateRecordAsync<Record<string, unknown>, ${readTypeName}>(${serviceName}.dataSourceName, id, serializeMultiSelectPicklistFields(changedFields as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields));`,
137
- `if (result.data) { deserializeMultiSelectPicklistFields(result.data as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields); }`,
138
- 'return result;',
139
- ]
140
- : [
141
- `const result = await ${serviceName}.client.updateRecordAsync<${updateParamType}, ${readTypeName}>(${serviceName}.dataSourceName, id, changedFields);`,
142
- 'return result;',
143
- ],
196
+ statements: [
197
+ serializeOnWrite('item'),
198
+ `const result = await ${sharedServiceName}.UpdateRecordWithOrganization(PREFER_REPRESENTATION, ACCEPT_JSON, ORG, ENTITY, recordId, serialized);`,
199
+ deserializeIfPresent('result'),
200
+ `return result as unknown as IOperationResult<${readTypeName}>;`,
201
+ ].filter(Boolean),
144
202
  },
203
+ // ── 3. UpdateOnlyRecord ────────────────────────────────────────────
204
+ // `If-Match: '*'` makes the connector return 412 when the record does not exist,
205
+ // distinguishing "update only" from the upsert behavior of `UpdateRecord`.
145
206
  {
146
- name: 'delete',
207
+ name: 'UpdateOnlyRecord',
147
208
  isStatic: true,
148
209
  isAsync: true,
149
210
  scope: Scope.Public,
150
- parameters: [{ name: 'id', type: 'string' }],
151
- returnType: 'Promise<void>',
152
- statements: [
153
- `await ${serviceName}.client.deleteRecordAsync(${serviceName}.dataSourceName, id);`,
211
+ parameters: [
212
+ { name: 'recordId', type: 'string' },
213
+ { name: 'item', type: partialWriteType },
154
214
  ],
215
+ returnType: `Promise<IOperationResult<${readTypeName}>>`,
216
+ statements: [
217
+ serializeOnWrite('item'),
218
+ `const result = await ${sharedServiceName}.UpdateOnlyRecordWithOrganization(PREFER_REPRESENTATION, ACCEPT_JSON, IF_MATCH_ANY, ORG, ENTITY, recordId, serialized);`,
219
+ deserializeIfPresent('result'),
220
+ `return result as unknown as IOperationResult<${readTypeName}>;`,
221
+ ].filter(Boolean),
155
222
  },
223
+ // ── 4. DeleteRecord ────────────────────────────────────────────────
156
224
  {
157
- name: 'get',
225
+ name: 'DeleteRecord',
158
226
  isStatic: true,
159
227
  isAsync: true,
160
228
  scope: Scope.Public,
161
229
  parameters: [
162
- { name: 'id', type: 'string' },
163
- { name: 'options', type: 'IGetOptions', hasQuestionToken: true },
230
+ { name: 'recordId', type: 'string' },
231
+ { name: 'partitionId', type: 'string', hasQuestionToken: true },
232
+ ],
233
+ returnType: 'Promise<IOperationResult<void>>',
234
+ statements: [
235
+ `return ${sharedServiceName}.DeleteRecordWithOrganization(ORG, ENTITY, recordId, partitionId);`,
164
236
  ],
165
- returnType: `Promise<IOperationResult<${readTypeName}>>`,
166
- statements: hasMultiSelectFields
167
- ? [
168
- `const result = await ${serviceName}.client.retrieveRecordAsync<${readTypeName}>(${serviceName}.dataSourceName, id, options);`,
169
- `if (result.data) { deserializeMultiSelectPicklistFields(result.data as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields); }`,
170
- 'return result;',
171
- ]
172
- : [
173
- `const result = await ${serviceName}.client.retrieveRecordAsync<${readTypeName}>(${serviceName}.dataSourceName, id, options);`,
174
- 'return result;',
175
- ],
176
237
  },
238
+ // ── 5. GetItem ─────────────────────────────────────────────────────
239
+ // The connector op exposes `x-ms-odata-metadata-full` and `MSCRM-IncludeMipSensitivityLabel`
240
+ // as header-style params — hidden here per the table-service surface spec.
177
241
  {
178
- name: 'getAll',
242
+ name: 'GetItem',
179
243
  isStatic: true,
180
244
  isAsync: true,
181
245
  scope: Scope.Public,
182
- parameters: [{ name: 'options', type: 'IGetAllOptions', hasQuestionToken: true }],
183
- returnType: `Promise<IOperationResult<${readTypeName}[]>>`,
184
- statements: hasMultiSelectFields
185
- ? [
186
- `const result = await ${serviceName}.client.retrieveMultipleRecordsAsync<${readTypeName}>(${serviceName}.dataSourceName, options);`,
187
- `result.data?.forEach(record => deserializeMultiSelectPicklistFields(record as Record<string, unknown>, ${serviceName}.multiSelectPicklistFields));`,
188
- 'return result;',
189
- ]
190
- : [
191
- `const result = await ${serviceName}.client.retrieveMultipleRecordsAsync<${readTypeName}>(${serviceName}.dataSourceName, options);`,
192
- 'return result;',
193
- ],
246
+ parameters: [
247
+ { name: 'recordId', type: 'string' },
248
+ { name: '$select', type: 'string', hasQuestionToken: true },
249
+ { name: '$expand', type: 'string', hasQuestionToken: true },
250
+ { name: 'partitionId', type: 'string', hasQuestionToken: true },
251
+ ],
252
+ returnType: `Promise<IOperationResult<${readTypeName}>>`,
253
+ statements: [
254
+ `const result = await ${sharedServiceName}.GetItemWithOrganization(PREFER_REPRESENTATION, ACCEPT_JSON, ORG, ENTITY, recordId, undefined, undefined, $select, $expand, partitionId);`,
255
+ deserializeIfPresent('result'),
256
+ `return result as unknown as IOperationResult<${readTypeName}>;`,
257
+ ].filter(Boolean),
194
258
  },
259
+ // ── 6. ListRecords ─────────────────────────────────────────────────
260
+ // `prefer`, `accept`, `x-ms-odata-metadata-full`, and `MSCRM-IncludeMipSensitivityLabel`
261
+ // are header-style params on the connector op — hidden here.
195
262
  {
196
- name: 'getMetadata',
263
+ name: 'ListRecords',
197
264
  isStatic: true,
265
+ isAsync: true,
198
266
  scope: Scope.Public,
199
267
  parameters: [
200
268
  {
201
269
  name: 'options',
202
- type: `GetEntityMetadataOptions<${readTypeName}>`,
203
- initializer: '{}',
270
+ type: `{ $select?: string; $filter?: string; $orderby?: string; $expand?: string; fetchXml?: string; $top?: number; $skiptoken?: string; partitionId?: string }`,
271
+ hasQuestionToken: true,
204
272
  },
205
273
  ],
206
- returnType: `Promise<IOperationResult<Partial<EntityMetadata>>>`,
274
+ returnType: `Promise<IOperationResult<${readTypeName}[]>>`,
207
275
  statements: [
208
- `return ${serviceName}.client.executeAsync({`,
209
- ` dataverseRequest: {`,
210
- ` action: 'getEntityMetadata',`,
211
- ` parameters: {`,
212
- ` tableName: ${serviceName}.dataSourceName,`,
213
- ` options: options as GetEntityMetadataOptions,`,
214
- ` },`,
215
- ` },`,
216
- `});`,
217
- ],
276
+ `const result = await ${sharedServiceName}.ListRecordsWithOrganization(ORG, ENTITY, undefined, undefined, undefined, undefined, options?.$select, options?.$filter, options?.$orderby, options?.$expand, options?.fetchXml, options?.$top, options?.$skiptoken, options?.partitionId);`,
277
+ deserializeArrayIfPresent('result'),
278
+ `return result as unknown as IOperationResult<${readTypeName}[]>;`,
279
+ ].filter(Boolean),
218
280
  },
281
+ // ── 7. GetEntityFileImageFieldContent (file/image only) ────────────
282
+ // The connector returns a base64 string from the `Range`-style swagger op;
283
+ // we decode to a `Uint8Array` to keep the table-service surface binary-typed.
219
284
  ...(hasFileOrImageColumns
220
285
  ? [
221
286
  {
222
- name: 'upload',
287
+ name: 'GetEntityFileImageFieldContent',
223
288
  isStatic: true,
224
289
  isAsync: true,
225
290
  scope: Scope.Public,
226
291
  parameters: [
227
- { name: 'id', type: 'string' },
228
- { name: 'columnName', type: uploadColumnNameType },
229
- { name: 'file', type: 'File' },
230
- { name: 'fileDisplayName', type: 'string', hasQuestionToken: true },
231
- ],
232
- returnType: 'Promise<IOperationResult<void>>',
233
- statements: [
234
- 'const arrayBuffer = await file.arrayBuffer();',
235
- 'const data = new Uint8Array(arrayBuffer);',
236
- `const result = await ${serviceName}.client.uploadFileToRecord(`,
237
- ` ${serviceName}.dataSourceName,`,
238
- ` id,`,
239
- ` columnName,`,
240
- ` fileDisplayName || file.name,`,
241
- ` data,`,
242
- `);`,
243
- 'return result;',
244
- ],
245
- },
246
- ]
247
- : []),
248
- ...(hasFileColumns
249
- ? [
250
- {
251
- name: 'downloadFile',
252
- isStatic: true,
253
- isAsync: true,
254
- scope: Scope.Public,
255
- parameters: [
256
- { name: 'id', type: 'string' },
257
- { name: 'columnName', type: fileColumnNameType },
292
+ { name: 'recordId', type: 'string' },
293
+ { name: 'fileImageFieldName', type: uploadColumnNameType },
294
+ { name: 'size', type: `'full' | 'thumbnail'`, hasQuestionToken: true },
258
295
  ],
259
296
  returnType: 'Promise<IOperationResult<Uint8Array>>',
260
297
  statements: [
261
- `const result = await ${serviceName}.client.downloadFileFromRecord(`,
262
- ` ${serviceName}.dataSourceName,`,
263
- ` id,`,
264
- ` columnName,`,
265
- `);`,
266
- 'return result;',
298
+ `const result = await ${sharedServiceName}.GetEntityFileImageFieldContentWithOrganization('', ORG, ENTITY, recordId, fileImageFieldName, size);`,
299
+ `return { ...result, data: result.data ? fromBase64(result.data) : undefined } as IOperationResult<Uint8Array>;`,
267
300
  ],
268
301
  },
269
- ]
270
- : []),
271
- ...(hasImageColumns
272
- ? [
273
- {
274
- name: 'downloadImage',
275
- isStatic: true,
276
- isAsync: true,
277
- scope: Scope.Public,
278
- parameters: [
279
- { name: 'id', type: 'string' },
280
- { name: 'columnName', type: imageColumnNameType },
281
- { name: 'fullSize', type: 'boolean', initializer: 'false' },
282
- ],
283
- returnType: 'Promise<IOperationResult<Uint8Array>>',
284
- statements: [
285
- `const result = await ${serviceName}.client.downloadImageFromRecord(`,
286
- ` ${serviceName}.dataSourceName,`,
287
- ` id,`,
288
- ` columnName,`,
289
- ` fullSize,`,
290
- `);`,
291
- 'return result;',
292
- ],
293
- },
294
- ]
295
- : []),
296
- ...(hasFileOrImageColumns
297
- ? [
302
+ // ── 8. UpdateEntityFileImageFieldContent ───────────────────────
303
+ // The connector expects a base64-encoded `item: string`; the table-service
304
+ // surface accepts a `Uint8Array` and we encode here.
298
305
  {
299
- name: 'deleteFileOrImage',
306
+ name: 'UpdateEntityFileImageFieldContent',
300
307
  isStatic: true,
301
308
  isAsync: true,
302
309
  scope: Scope.Public,
303
310
  parameters: [
304
- { name: 'id', type: 'string' },
305
- { name: 'columnName', type: uploadColumnNameType },
311
+ { name: 'recordId', type: 'string' },
312
+ { name: 'fileImageFieldName', type: uploadColumnNameType },
313
+ { name: 'item', type: 'Uint8Array' },
314
+ { name: 'fileName', type: 'string' },
306
315
  ],
307
316
  returnType: 'Promise<IOperationResult<void>>',
308
317
  statements: [
309
- `const result = await ${serviceName}.client.deleteFileOrImageFromRecord(`,
310
- ` ${serviceName}.dataSourceName,`,
311
- ` id,`,
312
- ` columnName,`,
313
- `);`,
314
- 'return result;',
318
+ `return ${sharedServiceName}.UpdateEntityFileImageFieldContentWithOrganization('application/octet-stream', ORG, ENTITY, recordId, fileImageFieldName, toBase64(item), fileName);`,
315
319
  ],
316
320
  },
317
321
  ]
318
322
  : []),
323
+ // ── 9. AssociateEntities ───────────────────────────────────────────
324
+ // Connector expects `item: { '@odata.id': string }`; we accept the URL directly
325
+ // and wrap it here.
326
+ {
327
+ name: 'AssociateEntities',
328
+ isStatic: true,
329
+ isAsync: true,
330
+ scope: Scope.Public,
331
+ parameters: [
332
+ { name: 'recordId', type: 'string' },
333
+ { name: 'associationEntityRelationship', type: 'string' },
334
+ { name: 'odataId', type: 'string' },
335
+ ],
336
+ returnType: 'Promise<IOperationResult<void>>',
337
+ statements: [
338
+ `return ${sharedServiceName}.AssociateEntitiesWithOrganization(ORG, ENTITY, recordId, associationEntityRelationship, { '@odata.id': odataId });`,
339
+ ],
340
+ },
341
+ // ── 10. DisassociateEntities ───────────────────────────────────────
342
+ // Connector parameter is named `$id` on the wire — we expose it as `id` and
343
+ // pass through positionally.
344
+ {
345
+ name: 'DisassociateEntities',
346
+ isStatic: true,
347
+ isAsync: true,
348
+ scope: Scope.Public,
349
+ parameters: [
350
+ { name: 'recordId', type: 'string' },
351
+ { name: 'associationEntityRelationship', type: 'string' },
352
+ { name: 'id', type: 'string' },
353
+ ],
354
+ returnType: 'Promise<IOperationResult<void>>',
355
+ statements: [
356
+ `return ${sharedServiceName}.DisassociateEntitiesWithOrganization(ORG, ENTITY, recordId, associationEntityRelationship, id);`,
357
+ ],
358
+ },
359
+ // ── 11. PerformBoundAction ─────────────────────────────────────────
360
+ {
361
+ name: 'PerformBoundAction',
362
+ isStatic: true,
363
+ isAsync: true,
364
+ scope: Scope.Public,
365
+ parameters: [
366
+ { name: 'actionName', type: 'string' },
367
+ { name: 'recordId', type: 'string' },
368
+ { name: 'item', type: readRecord, hasQuestionToken: true },
369
+ ],
370
+ returnType: `Promise<IOperationResult<${readRecord}>>`,
371
+ statements: [
372
+ `return ${sharedServiceName}.PerformBoundActionWithOrganization(ORG, ENTITY, actionName, recordId, item);`,
373
+ ],
374
+ },
319
375
  ],
320
376
  });
321
377
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generateDataverseService.js","sourceRoot":"","sources":["../../src/Dataverse/generateDataverseService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAc/D,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACI;IACvB,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC;IAE7D,MAAM,WAAW,GAAG,GAAG,wBAAwB,CAAC,SAAS,CAAC,SAAS,CAAC;IACpE,6FAA6F;IAC7F,qFAAqF;IACrF,2EAA2E;IAC3E,MAAM,aAAa,GAAG,gBAAgB;QACpC,CAAC,CAAC,GAAG,wBAAwB,CAAC,SAAS,CAAC,MAAM;QAC9C,CAAC,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IACxC,MAAM,YAAY,GAAG,wBAAwB,CAAC,SAAS,CAAC,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AC"}
1
+ {"version":3,"file":"generateDataverseService.js","sourceRoot":"","sources":["../../src/Dataverse/generateDataverseService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAwC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,aAAa,EACb,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,eAAe,GACQ;IACvB,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC;IAE7C,MAAM,EAAE,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,GAAG,EAAE,SAAS,CAAC;IAEnC,0GAA0G;IAC1G,wDAAwD;IACxD,MAAM,aAAa,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1D,MAAM,YAAY,GAAG,EAAE,CAAC;IAExB,MAAM,oBAAoB,GAAG,GAAG,EAAE,kBAAkB,CAAC;IACrD,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IAClD,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;IACpD,MAAM,qBAAqB,GAAG,cAAc,IAAI,eAAe,CAAC;IAChE,MAAM,oBAAoB,GAAG,yBAAyB,CAAC,MAAM,GAAG,CAAC,CAAC;IAElE,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;IAE5E,qEAAqE;IACrE,UAAU,CAAC,oBAAoB,CAAC;QAC9B,eA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,EAAE,QAAQ,EAAE;iBACpC;gBACD,UAAU,EAAE,iCAAiC;gBAC7C,UAAU,EAAE;oBACV,UAAU,iBAAiB,qHAAqH;iBACjJ;aACF;YACD,sEAAsE;YACtE,4EAA4E;YAC5E,6BAA6B;YAC7B;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,KAAK,CAAC,MAAM;gBACnB,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACpC,EAAE,IAAI,EAAE,+BAA+B,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC/B;gBACD,UAAU,EAAE,iCAAiC;gBAC7C,UAAU,EAAE;oBACV,UAAU,iBAAiB,kGAAkG;iBAC9H;aACF;YACD,sEAAsE;YACtE;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,KAAK,CAAC,MAAM;gBACnB,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACtC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACpC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE;iBAC3D;gBACD,UAAU,EAAE,4BAA4B,UAAU,IAAI;gBACtD,UAAU,EAAE;oBACV,UAAU,iBAAiB,+EAA+E;iBAC3G;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,eAAe,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microsoft/managed-apps-codegen",
3
- "version": "0.2.8",
4
- "description": "V2 ts-morph based code generation for Power Apps code apps",
3
+ "version": "0.2.10",
4
+ "description": "AST-based TypeScript code generation for Microsoft Managed Apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -45,12 +45,12 @@
45
45
  "clean": "bun ../../scripts/clean.ts dist .turbo tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo"
46
46
  },
47
47
  "dependencies": {
48
- "@microsoft/managed-apps-common": "0.10.0",
48
+ "@microsoft/managed-apps-common": "0.11.0",
49
49
  "prettier": "3.8.1",
50
50
  "ts-morph": "27.0.2"
51
51
  },
52
52
  "engines": {
53
- "node": ">=22"
53
+ "node": ">=24.11.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@repo/repo-config": "0.0.0",