sf-plugin-data 0.1.0 → 0.3.0
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/LICENSE +21 -21
- package/README.md +618 -240
- package/docs/artifact-format.md +528 -633
- package/docs/capabilities.md +1160 -168
- package/docs/git-workflow.md +135 -12
- package/docs/handover.md +7826 -12
- package/lib/api.d.ts +13 -0
- package/lib/api.js +10 -0
- package/lib/artifacts/code-fields.d.ts +49 -0
- package/lib/artifacts/code-fields.js +142 -0
- package/lib/artifacts/data-graph-document.d.ts +29 -0
- package/lib/artifacts/data-graph-document.js +52 -0
- package/lib/artifacts/data-space-field.d.ts +65 -0
- package/lib/artifacts/data-space-field.js +98 -0
- package/lib/artifacts/data-stream-document.d.ts +264 -0
- package/lib/artifacts/data-stream-document.js +680 -0
- package/lib/artifacts/data-transform-document.d.ts +152 -0
- package/lib/artifacts/data-transform-document.js +560 -0
- package/lib/artifacts/dependency-selection.d.ts +51 -0
- package/lib/artifacts/dependency-selection.js +154 -0
- package/lib/artifacts/dlo-document.d.ts +93 -0
- package/lib/artifacts/dlo-document.js +253 -0
- package/lib/artifacts/enum-case.d.ts +39 -0
- package/lib/artifacts/enum-case.js +67 -0
- package/lib/artifacts/git-deploy-selection.d.ts +68 -0
- package/lib/artifacts/git-deploy-selection.js +474 -0
- package/lib/artifacts/identity-resolution-document.d.ts +133 -0
- package/lib/artifacts/identity-resolution-document.js +625 -0
- package/lib/artifacts/mapping-document.d.ts +1 -0
- package/lib/artifacts/mapping-document.js +1 -0
- package/lib/artifacts/native-calculated-insight-document.d.ts +142 -0
- package/lib/artifacts/native-calculated-insight-document.js +321 -0
- package/lib/artifacts/native-data-graph-document.d.ts +124 -0
- package/lib/artifacts/native-data-graph-document.js +780 -0
- package/lib/artifacts/native-dmo-document.d.ts +151 -0
- package/lib/artifacts/native-dmo-document.js +313 -0
- package/lib/artifacts/native-mapping-document.d.ts +67 -0
- package/lib/artifacts/native-mapping-document.js +187 -0
- package/lib/artifacts/native-relationship-document.d.ts +76 -0
- package/lib/artifacts/native-relationship-document.js +232 -0
- package/lib/artifacts/path-selector.d.ts +55 -0
- package/lib/artifacts/path-selector.js +167 -0
- package/lib/artifacts/read-deploy-input.d.ts +222 -6
- package/lib/artifacts/read-deploy-input.js +1213 -53
- package/lib/artifacts/segment-document.d.ts +183 -0
- package/lib/artifacts/segment-document.js +570 -0
- package/lib/artifacts/verbatim-document.d.ts +203 -0
- package/lib/artifacts/verbatim-document.js +339 -0
- package/lib/artifacts/write-data-graph.d.ts +17 -0
- package/lib/artifacts/write-data-graph.js +162 -0
- package/lib/artifacts/write-data-stream.d.ts +11 -0
- package/lib/artifacts/write-data-stream.js +175 -0
- package/lib/artifacts/write-data-transform.d.ts +11 -0
- package/lib/artifacts/write-data-transform.js +180 -0
- package/lib/artifacts/write-dlo.d.ts +11 -0
- package/lib/artifacts/write-dlo.js +158 -0
- package/lib/artifacts/write-identity-resolution.d.ts +18 -0
- package/lib/artifacts/write-identity-resolution.js +165 -0
- package/lib/artifacts/write-mapping-definition.d.ts +17 -0
- package/lib/artifacts/write-mapping-definition.js +127 -0
- package/lib/artifacts/write-member-export.d.ts +88 -0
- package/lib/artifacts/write-member-export.js +199 -0
- package/lib/artifacts/write-native-calculated-insight.d.ts +21 -0
- package/lib/artifacts/write-native-calculated-insight.js +176 -0
- package/lib/artifacts/write-native-dmo.d.ts +11 -0
- package/lib/artifacts/write-native-dmo.js +158 -0
- package/lib/artifacts/write-native-mapping.d.ts +11 -0
- package/lib/artifacts/write-native-mapping.js +157 -0
- package/lib/artifacts/write-native-relationship.d.ts +11 -0
- package/lib/artifacts/write-native-relationship.js +157 -0
- package/lib/artifacts/write-segment.d.ts +26 -0
- package/lib/artifacts/write-segment.js +212 -0
- package/lib/commands/data360/delete.d.ts +280 -0
- package/lib/commands/data360/delete.js +2347 -0
- package/lib/commands/data360/deploy.d.ts +235 -16
- package/lib/commands/data360/deploy.js +2339 -102
- package/lib/commands/data360/list/dataspace.d.ts +53 -0
- package/lib/commands/data360/list/dataspace.js +109 -0
- package/lib/commands/data360/publish.d.ts +93 -0
- package/lib/commands/data360/publish.js +298 -0
- package/lib/commands/data360/retrieve.d.ts +283 -14
- package/lib/commands/data360/retrieve.js +1945 -95
- package/lib/commands/data360/segment/members/export.d.ts +101 -0
- package/lib/commands/data360/segment/members/export.js +320 -0
- package/lib/errors/codes/calculated-insight.d.ts +2 -0
- package/lib/errors/codes/calculated-insight.js +25 -0
- package/lib/errors/codes/data-graph.d.ts +2 -0
- package/lib/errors/codes/data-graph.js +22 -0
- package/lib/errors/codes/data-stream.d.ts +2 -0
- package/lib/errors/codes/data-stream.js +70 -0
- package/lib/errors/codes/data-transform.d.ts +2 -0
- package/lib/errors/codes/data-transform.js +35 -0
- package/lib/errors/codes/dependency.d.ts +2 -0
- package/lib/errors/codes/dependency.js +11 -0
- package/lib/errors/codes/dlo.d.ts +2 -0
- package/lib/errors/codes/dlo.js +31 -0
- package/lib/errors/codes/dmo.d.ts +2 -0
- package/lib/errors/codes/dmo.js +28 -0
- package/lib/errors/codes/general.d.ts +2 -0
- package/lib/errors/codes/general.js +58 -0
- package/lib/errors/codes/identity-resolution.d.ts +2 -0
- package/lib/errors/codes/identity-resolution.js +24 -0
- package/lib/errors/codes/mapping.d.ts +2 -0
- package/lib/errors/codes/mapping.js +42 -0
- package/lib/errors/codes/relationship.d.ts +2 -0
- package/lib/errors/codes/relationship.js +21 -0
- package/lib/errors/codes/segment.d.ts +2 -0
- package/lib/errors/codes/segment.js +49 -0
- package/lib/errors/registry.d.ts +60 -0
- package/lib/errors/registry.js +123 -0
- package/lib/exit-code.d.ts +10 -0
- package/lib/exit-code.js +24 -0
- package/lib/plugin.d.ts +1 -0
- package/lib/plugin.js +3 -1
- package/lib/services/acquire-retrieve-selection.d.ts +43 -0
- package/lib/services/acquire-retrieve-selection.js +145 -0
- package/lib/services/bind-identity-resolution-dependencies.d.ts +53 -0
- package/lib/services/bind-identity-resolution-dependencies.js +238 -0
- package/lib/services/bind-segment-dependencies.d.ts +49 -0
- package/lib/services/bind-segment-dependencies.js +115 -0
- package/lib/services/bounded-reads.d.ts +17 -0
- package/lib/services/bounded-reads.js +42 -0
- package/lib/services/calculated-insight-sql-checks.d.ts +33 -0
- package/lib/services/calculated-insight-sql-checks.js +193 -0
- package/lib/services/command-dlo.d.ts +48 -0
- package/lib/services/command-dlo.js +103 -0
- package/lib/services/command-native-data-graph.d.ts +54 -0
- package/lib/services/command-native-data-graph.js +485 -0
- package/lib/services/command-native-data-stream.d.ts +104 -0
- package/lib/services/command-native-data-stream.js +257 -0
- package/lib/services/command-native-dmo.d.ts +124 -0
- package/lib/services/command-native-dmo.js +338 -0
- package/lib/services/command-native-mapping.d.ts +65 -0
- package/lib/services/command-native-mapping.js +129 -0
- package/lib/services/command-native-relationship.d.ts +46 -0
- package/lib/services/command-native-relationship.js +103 -0
- package/lib/services/cross-dataspace-deploy.d.ts +111 -0
- package/lib/services/cross-dataspace-deploy.js +493 -0
- package/lib/services/cross-dataspace-rename.d.ts +74 -0
- package/lib/services/cross-dataspace-rename.js +1314 -0
- package/lib/services/cross-dataspace-sql.d.ts +109 -0
- package/lib/services/cross-dataspace-sql.js +1301 -0
- package/lib/services/cross-space-context.d.ts +23 -0
- package/lib/services/cross-space-context.js +38 -0
- package/lib/services/crud-plan.d.ts +137 -0
- package/lib/services/crud-plan.js +408 -0
- package/lib/services/data-space-check.d.ts +92 -0
- package/lib/services/data-space-check.js +169 -0
- package/lib/services/data-space-prefix.d.ts +77 -0
- package/lib/services/data-space-prefix.js +127 -0
- package/lib/services/data-transform-space.d.ts +31 -0
- package/lib/services/data-transform-space.js +79 -0
- package/lib/services/delete-calculated-insight.d.ts +44 -0
- package/lib/services/delete-calculated-insight.js +101 -0
- package/lib/services/delete-data-transform.d.ts +52 -0
- package/lib/services/delete-data-transform.js +222 -0
- package/lib/services/delete-dmo-field.d.ts +211 -0
- package/lib/services/delete-dmo-field.js +472 -0
- package/lib/services/delete-identity-resolution.d.ts +43 -0
- package/lib/services/delete-identity-resolution.js +295 -0
- package/lib/services/delete-segment.d.ts +42 -0
- package/lib/services/delete-segment.js +248 -0
- package/lib/services/deploy-result.d.ts +54 -0
- package/lib/services/deploy-result.js +60 -0
- package/lib/services/escaped-copy.d.ts +23 -0
- package/lib/services/escaped-copy.js +88 -0
- package/lib/services/execute-calculated-insight-deploy.d.ts +42 -0
- package/lib/services/execute-calculated-insight-deploy.js +96 -0
- package/lib/services/execute-data-transform-deploy.d.ts +56 -0
- package/lib/services/execute-data-transform-deploy.js +168 -0
- package/lib/services/execute-native-identity-resolution-deploy.d.ts +48 -0
- package/lib/services/execute-native-identity-resolution-deploy.js +360 -0
- package/lib/services/execute-segment-deploy.d.ts +45 -0
- package/lib/services/execute-segment-deploy.js +393 -0
- package/lib/services/list-data-spaces.d.ts +17 -0
- package/lib/services/list-data-spaces.js +24 -0
- package/lib/services/local-file-removal.d.ts +36 -0
- package/lib/services/local-file-removal.js +103 -0
- package/lib/services/native-calculated-insight.d.ts +87 -0
- package/lib/services/native-calculated-insight.js +164 -0
- package/lib/services/native-crm-data-stream.d.ts +91 -0
- package/lib/services/native-crm-data-stream.js +272 -0
- package/lib/services/native-data-graph-context.d.ts +12 -0
- package/lib/services/native-data-graph-context.js +139 -0
- package/lib/services/native-data-graph-crd.d.ts +261 -0
- package/lib/services/native-data-graph-crd.js +866 -0
- package/lib/services/native-data-stream.d.ts +329 -0
- package/lib/services/native-data-stream.js +1830 -0
- package/lib/services/native-dlo.d.ts +163 -0
- package/lib/services/native-dlo.js +402 -0
- package/lib/services/native-dmo.d.ts +191 -0
- package/lib/services/native-dmo.js +614 -0
- package/lib/services/native-mapping.d.ts +255 -0
- package/lib/services/native-mapping.js +1226 -0
- package/lib/services/native-relationship.d.ts +132 -0
- package/lib/services/native-relationship.js +512 -0
- package/lib/services/operation-diagnostic.d.ts +83 -0
- package/lib/services/operation-diagnostic.js +272 -0
- package/lib/services/preflight-calculated-insight-deploy.d.ts +58 -0
- package/lib/services/preflight-calculated-insight-deploy.js +95 -0
- package/lib/services/preflight-data-transform-deploy.d.ts +33 -0
- package/lib/services/preflight-data-transform-deploy.js +104 -0
- package/lib/services/preflight-identity-resolution-deploy.d.ts +107 -0
- package/lib/services/preflight-identity-resolution-deploy.js +281 -0
- package/lib/services/preflight-segment-deploy.d.ts +31 -0
- package/lib/services/preflight-segment-deploy.js +109 -0
- package/lib/services/publish-calculated-insight.d.ts +40 -0
- package/lib/services/publish-calculated-insight.js +95 -0
- package/lib/services/publish-segment.d.ts +65 -0
- package/lib/services/publish-segment.js +194 -0
- package/lib/services/readback-pace.d.ts +16 -0
- package/lib/services/readback-pace.js +23 -0
- package/lib/services/retrieve-data-transform.d.ts +26 -0
- package/lib/services/retrieve-data-transform.js +65 -0
- package/lib/services/retrieve-identity-resolution.d.ts +40 -0
- package/lib/services/retrieve-identity-resolution.js +87 -0
- package/lib/services/retrieve-inventory.d.ts +32 -0
- package/lib/services/retrieve-inventory.js +151 -0
- package/lib/services/retrieve-segment.d.ts +120 -0
- package/lib/services/retrieve-segment.js +502 -0
- package/lib/services/run-retrieve.d.ts +24 -0
- package/lib/services/run-retrieve.js +51 -0
- package/lib/services/segment-lookup.d.ts +46 -0
- package/lib/services/segment-lookup.js +108 -0
- package/lib/services/segment-members.d.ts +144 -0
- package/lib/services/segment-members.js +402 -0
- package/lib/services/select-native-retrieve.d.ts +60 -0
- package/lib/services/select-native-retrieve.js +226 -0
- package/lib/services/settle-calculated-insight.d.ts +22 -0
- package/lib/services/settle-calculated-insight.js +53 -0
- package/lib/services/sql-tokens.d.ts +58 -0
- package/lib/services/sql-tokens.js +147 -0
- package/lib/transport/api-version.d.ts +36 -0
- package/lib/transport/api-version.js +89 -0
- package/lib/transport/bound-ssot.d.ts +27 -0
- package/lib/transport/bound-ssot.js +116 -0
- package/lib/transport/calculated-insight-rest.d.ts +28 -0
- package/lib/transport/calculated-insight-rest.js +62 -0
- package/lib/transport/connect-client.d.ts +94 -32
- package/lib/transport/connect-client.js +318 -178
- package/lib/transport/connect-diagnostic.d.ts +89 -0
- package/lib/transport/connect-diagnostic.js +331 -0
- package/lib/transport/data-graph-rest.d.ts +27 -0
- package/lib/transport/data-graph-rest.js +76 -0
- package/lib/transport/data-stream-rest.d.ts +62 -0
- package/lib/transport/data-stream-rest.js +348 -0
- package/lib/transport/data-transform-rest.d.ts +25 -0
- package/lib/transport/data-transform-rest.js +100 -0
- package/lib/transport/dlo-native-rest.d.ts +22 -0
- package/lib/transport/dlo-native-rest.js +89 -0
- package/lib/transport/dlo-rest.d.ts +23 -0
- package/lib/transport/dlo-rest.js +135 -0
- package/lib/transport/dmo-native-rest.d.ts +18 -0
- package/lib/transport/dmo-native-rest.js +55 -0
- package/lib/transport/dmo-rest.d.ts +30 -0
- package/lib/transport/dmo-rest.js +163 -0
- package/lib/transport/mapping-rest.d.ts +63 -0
- package/lib/transport/mapping-rest.js +341 -0
- package/lib/transport/project-metadata.d.ts +36 -0
- package/lib/transport/project-metadata.js +118 -0
- package/lib/transport/relationship-rest.d.ts +43 -0
- package/lib/transport/relationship-rest.js +201 -0
- package/package.json +29 -6
- package/lib/artifacts/dmo-document.d.ts +0 -181
- package/lib/artifacts/dmo-document.js +0 -848
- package/lib/artifacts/dmo-update-delta.d.ts +0 -28
- package/lib/artifacts/dmo-update-delta.js +0 -86
- package/lib/artifacts/write-other-dmo.d.ts +0 -17
- package/lib/artifacts/write-other-dmo.js +0 -140
- package/lib/services/execute-dmo-create.d.ts +0 -24
- package/lib/services/execute-dmo-create.js +0 -118
- package/lib/services/execute-dmo-deploy.d.ts +0 -33
- package/lib/services/execute-dmo-deploy.js +0 -197
- package/lib/services/preflight-dmo-deploy.d.ts +0 -69
- package/lib/services/preflight-dmo-deploy.js +0 -161
- package/lib/services/retrieve-other-dmo.d.ts +0 -46
- package/lib/services/retrieve-other-dmo.js +0 -140
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { NativeDmoDocument } from '../artifacts/native-dmo-document.js';
|
|
2
|
+
import type { DmoClient } from '../transport/dmo-rest.js';
|
|
3
|
+
import type { DocumentMode } from '../artifacts/verbatim-document.js';
|
|
4
|
+
export type NativeDmoDeployPlan = {
|
|
5
|
+
operation: 'create';
|
|
6
|
+
apiName: string;
|
|
7
|
+
body: Record<string, unknown>;
|
|
8
|
+
} | {
|
|
9
|
+
operation: 'update';
|
|
10
|
+
apiName: string;
|
|
11
|
+
targetApiName: string;
|
|
12
|
+
/** Read-only field keys whose file value differs from the target; they are never sent. */
|
|
13
|
+
notSent?: NotSentFieldKey[];
|
|
14
|
+
/** Absent when field removals are the only change, so no PATCH is sent. */
|
|
15
|
+
body?: Record<string, unknown>;
|
|
16
|
+
/** Custom target fields missing from the file; set only with allowFieldRemoval. */
|
|
17
|
+
removeFields?: string[];
|
|
18
|
+
/** Set for a standard DMO: readback confirms custom fields, label and description only. */
|
|
19
|
+
standard?: true;
|
|
20
|
+
} | {
|
|
21
|
+
operation: 'unchanged';
|
|
22
|
+
apiName: string;
|
|
23
|
+
document: NativeDmoDocument;
|
|
24
|
+
/** Read-only field keys whose file value differs from the target; they are never sent. */
|
|
25
|
+
notSent?: NotSentFieldKey[];
|
|
26
|
+
};
|
|
27
|
+
/** A read-only field key whose file value differs from the org; the API takes no such input. */
|
|
28
|
+
export type NotSentFieldKey = {
|
|
29
|
+
field: string;
|
|
30
|
+
key: string;
|
|
31
|
+
};
|
|
32
|
+
export type NativeDmoDeployOptions = {
|
|
33
|
+
/** Remove custom target fields missing from the file through the Metadata API. */
|
|
34
|
+
allowFieldRemoval?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Prefix of the run's data space as the org's data space list names it (`ds2`), outside the
|
|
37
|
+
* default data space only: a DMO file for a standard DMO copy that does not exist yet is
|
|
38
|
+
* refused instead of being created as a custom DMO.
|
|
39
|
+
*/
|
|
40
|
+
dataSpacePrefix?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Mapped fields whose pairs the selected mapping files of the same deployment drop. They are
|
|
43
|
+
* removed instead of refused; Salesforce drops their pairs together with the fields.
|
|
44
|
+
*/
|
|
45
|
+
coveredMappedFields?: string[];
|
|
46
|
+
/** Source DLOs of the selected mapping files that target this DMO. */
|
|
47
|
+
coveredMappingSources?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Wraps the single field removal in reads before and after it, and returns the mapping pairs
|
|
50
|
+
* Salesforce dropped with the fields. Without it the removal is sent unwrapped.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Read-only check of a planned field removal, run before the PATCH of the same deployment so a
|
|
54
|
+
* removal that would be refused stops the item before any write.
|
|
55
|
+
*/
|
|
56
|
+
precheckRemoval?: (targetApiName: string, fields: string[], coverage: {
|
|
57
|
+
fields: string[];
|
|
58
|
+
sources: string[];
|
|
59
|
+
}) => Promise<void>;
|
|
60
|
+
removeChecked?: (targetApiName: string, fields: string[], remove: () => Promise<void>, coverage: {
|
|
61
|
+
fields: string[];
|
|
62
|
+
sources: string[];
|
|
63
|
+
}) => Promise<DroppedPair[]>;
|
|
64
|
+
};
|
|
65
|
+
/** A mapping pair Salesforce dropped together with its removed target field. */
|
|
66
|
+
export type DroppedPair = {
|
|
67
|
+
mapping: string;
|
|
68
|
+
sourceFieldDeveloperName: string;
|
|
69
|
+
targetFieldDeveloperName: string;
|
|
70
|
+
};
|
|
71
|
+
/** Bounded post-write readback; the single write is never repeated. */
|
|
72
|
+
export type NativeDmoSettle = {
|
|
73
|
+
attempts: number;
|
|
74
|
+
delayMs: number;
|
|
75
|
+
sleep: (milliseconds: number) => Promise<void>;
|
|
76
|
+
};
|
|
77
|
+
export declare const defaultNativeDmoSettle: NativeDmoSettle;
|
|
78
|
+
/**
|
|
79
|
+
* Name the DMO and every mapped field a DMO_FIELD_REMOVAL_MAPPED refusal was raised for.
|
|
80
|
+
* @param {unknown} error Caught error.
|
|
81
|
+
* @returns {{apiName: string, fields: string[]} | undefined} Refused removal, or nothing for any other error.
|
|
82
|
+
*/
|
|
83
|
+
export declare function mappedFieldRemoval(error: unknown): {
|
|
84
|
+
apiName: string;
|
|
85
|
+
fields: string[];
|
|
86
|
+
} | undefined;
|
|
87
|
+
export { isGeneratedDmoField } from '../artifacts/native-dmo-document.js';
|
|
88
|
+
/**
|
|
89
|
+
* The read-only field keys whose file value differs from the org. The API rejects them as input,
|
|
90
|
+
* so they are never sent and the org keeps its own value. Standard and system fields of a standard
|
|
91
|
+
* DMO are left out: they are compared as a whole before any write.
|
|
92
|
+
* @param {NativeDmoDocument} desired Requested definition.
|
|
93
|
+
* @param {NativeDmoDocument} actual Target definition.
|
|
94
|
+
* @param {boolean} [standard] Standard DMO.
|
|
95
|
+
* @returns {NotSentFieldKey[]} Field and key of every differing read-only key, in file order.
|
|
96
|
+
*/
|
|
97
|
+
export declare function notSentFieldKeys(desired: NativeDmoDocument, actual: NativeDmoDocument, standard?: boolean): NotSentFieldKey[];
|
|
98
|
+
/**
|
|
99
|
+
* Retrieve an exact portable definition including all generated fields.
|
|
100
|
+
* @param {string} apiName Full name ending in __dlm.
|
|
101
|
+
* @param {Pick<DmoClient, 'get'>} client Authenticated client.
|
|
102
|
+
* @param {string} requestScope The run's data space: expected on reads, sent on writes.
|
|
103
|
+
* @param {DocumentMode} [mode] `retrieve` for the retrieve command; other callers stay strict.
|
|
104
|
+
* @returns {Promise<NativeDmoDocument>} Portable definition, without runtime observations.
|
|
105
|
+
*/
|
|
106
|
+
export declare function retrieveNativeDmo(apiName: string, client: Pick<DmoClient, 'get'>, requestScope: string, mode?: DocumentMode): Promise<NativeDmoDocument>;
|
|
107
|
+
/**
|
|
108
|
+
* Preflight a create or update without mutation. Category, data types, labels and optional keys
|
|
109
|
+
* are passed through for the API to judge; only edits the API cannot perform are refused here.
|
|
110
|
+
* On any DMO but an unprefixed custom one (standard, platform-generated, namespaced) only custom
|
|
111
|
+
* fields, the labels of the other fields, the object label and the object description are
|
|
112
|
+
* written: the other properties of standard, system and generated fields are compared and never
|
|
113
|
+
* sent, and the category is ignored because Salesforce changes it when the DMO is first mapped.
|
|
114
|
+
* @param {unknown} value Portable document.
|
|
115
|
+
* @param {Pick<DmoClient, 'get'>} client Target client.
|
|
116
|
+
* @param {string} requestScope The run's data space: expected on reads, sent on writes.
|
|
117
|
+
* @param {NativeDmoDeployOptions} [options] Opt-in field removal.
|
|
118
|
+
* @returns {Promise<NativeDmoDeployPlan>} Fresh name-bound write plan.
|
|
119
|
+
*/
|
|
120
|
+
export declare function preflightNativeDmo(value: unknown, client: Pick<DmoClient, 'get'>, requestScope: string, options?: NativeDmoDeployOptions): Promise<NativeDmoDeployPlan>;
|
|
121
|
+
/**
|
|
122
|
+
* Confirm a requested definition against an independent read, allowing server-added defaults.
|
|
123
|
+
* Keys the API accepts but does not return cannot be confirmed and are not compared; read-only
|
|
124
|
+
* keys are never sent, so they are not compared either.
|
|
125
|
+
* @param {NativeDmoDocument} desired Requested portable state.
|
|
126
|
+
* @param {NativeDmoDocument} actual Independent GET state.
|
|
127
|
+
* @param {string[]} [removed] Fields whose removal was requested and must be absent.
|
|
128
|
+
* @param {boolean} [standard] Standard scope: the category is not compared, and of its standard, system and generated fields only the label.
|
|
129
|
+
* @returns {boolean} Whether every requested, readable property survived and every removal took effect.
|
|
130
|
+
*/
|
|
131
|
+
export declare function nativeDmoConfirmed(desired: NativeDmoDocument, actual: NativeDmoDocument, removed?: string[], standard?: boolean): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Skip unchanged definitions, otherwise write once and require independent bounded GET confirmation.
|
|
134
|
+
* An update sends at most one PATCH, then at most one Metadata API field removal, each exactly once.
|
|
135
|
+
* Stale PATCH bodies never establish persistence; failed readback never triggers another write.
|
|
136
|
+
* @param {unknown} value Portable requested definition.
|
|
137
|
+
* @param {DmoClient} client Target client.
|
|
138
|
+
* @param {string} requestScope The run's data space: expected on reads, sent on writes.
|
|
139
|
+
* @param {NativeDmoSettle} [settle] Readback attempts and spacing.
|
|
140
|
+
* @param {NativeDmoDeployOptions} [options] Opt-in field removal.
|
|
141
|
+
* @returns {Promise<{operation: 'create' | 'update' | 'unchanged', document: NativeDmoDocument, removedFields?: string[], droppedPairs?: DroppedPair[], notSent?: NotSentFieldKey[]}>} Observed or confirmed definition, not activation proof.
|
|
142
|
+
*/
|
|
143
|
+
export declare function deployNativeDmo(value: unknown, client: DmoClient, requestScope: string, settle?: NativeDmoSettle, options?: NativeDmoDeployOptions): Promise<{
|
|
144
|
+
operation: 'create' | 'update' | 'unchanged';
|
|
145
|
+
document: NativeDmoDocument;
|
|
146
|
+
removedFields?: string[];
|
|
147
|
+
/** Mapping pairs Salesforce dropped together with the removed fields. */
|
|
148
|
+
droppedPairs?: DroppedPair[];
|
|
149
|
+
/** Read-only field keys whose file value differs from the org; they are never sent. */
|
|
150
|
+
notSent?: NotSentFieldKey[];
|
|
151
|
+
}>;
|
|
152
|
+
/**
|
|
153
|
+
* Read-only delete preview: resolve the exact target and apply the same guard as delete.
|
|
154
|
+
* @param {string} apiName Requested full name.
|
|
155
|
+
* @param {Pick<DmoClient, 'get'>} client Target client.
|
|
156
|
+
* @param {string} requestScope The run's data space, expected on the read.
|
|
157
|
+
* @returns {Promise<{identity: {apiName: string; dataSpace: string}}>} Identity a delete would remove.
|
|
158
|
+
*/
|
|
159
|
+
export declare function previewDeleteNativeDmo(apiName: string, client: Pick<DmoClient, 'get'>, requestScope: string): Promise<{
|
|
160
|
+
identity: {
|
|
161
|
+
apiName: string;
|
|
162
|
+
dataSpace: string;
|
|
163
|
+
};
|
|
164
|
+
}>;
|
|
165
|
+
/**
|
|
166
|
+
* Read-only admission of a field-level delete: resolve the exact target and require a custom or
|
|
167
|
+
* standard DMO. Which of its fields may be removed is decided by the caller from the scope.
|
|
168
|
+
* @param {string} apiName Requested full name.
|
|
169
|
+
* @param {Pick<DmoClient, 'get'>} client Target client.
|
|
170
|
+
* @param {string} requestScope The run's data space, expected on the read.
|
|
171
|
+
* @returns {Promise<{document: NativeDmoDocument, scope: 'custom' | 'standard'}>} Definition and its write scope.
|
|
172
|
+
*/
|
|
173
|
+
export declare function previewFieldDeleteNativeDmo(apiName: string, client: Pick<DmoClient, 'get'>, requestScope: string): Promise<{
|
|
174
|
+
document: NativeDmoDocument;
|
|
175
|
+
scope: 'custom' | 'standard';
|
|
176
|
+
}>;
|
|
177
|
+
/**
|
|
178
|
+
* Delete only the freshly resolved exact full name, without cascade or local deletion.
|
|
179
|
+
* One read after the DELETE confirms it: 404 is deleted, the same name in a DELETING state is
|
|
180
|
+
* still processing, and anything else (including a failed read) is never reported as deleted.
|
|
181
|
+
* @param {string} apiName Requested full name.
|
|
182
|
+
* @param {Pick<DmoClient, 'get' | 'delete'>} client Target client.
|
|
183
|
+
* @param {string} requestScope The run's data space: expected on reads, sent on writes.
|
|
184
|
+
* @returns {Promise<{apiName: string, targetApiName: string, dataSpace: string, processing?: true}>} Exact deleted target identity.
|
|
185
|
+
*/
|
|
186
|
+
export declare function deleteNativeDmo(apiName: string, client: Pick<DmoClient, 'get' | 'delete'>, requestScope: string): Promise<{
|
|
187
|
+
apiName: string;
|
|
188
|
+
targetApiName: string;
|
|
189
|
+
dataSpace: string;
|
|
190
|
+
processing?: true;
|
|
191
|
+
}>;
|