@rippling/rippling-sdk 0.2.0-alpha.34 → 0.2.0-alpha.35
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/lib/manifest/app.d.mts +81 -13
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +81 -13
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +37 -16
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +37 -16
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/category.d.mts +63 -7
- package/lib/manifest/category.d.mts.map +1 -1
- package/lib/manifest/category.d.ts +63 -7
- package/lib/manifest/category.d.ts.map +1 -1
- package/lib/manifest/category.js +45 -10
- package/lib/manifest/category.js.map +1 -1
- package/lib/manifest/category.mjs +43 -8
- package/lib/manifest/category.mjs.map +1 -1
- package/lib/manifest/custom-object-field-section.d.mts +56 -6
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
- package/lib/manifest/custom-object-field-section.d.ts +56 -6
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
- package/lib/manifest/custom-object-field-section.js +41 -14
- package/lib/manifest/custom-object-field-section.js.map +1 -1
- package/lib/manifest/custom-object-field-section.mjs +39 -12
- package/lib/manifest/custom-object-field-section.mjs.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.mts +201 -41
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +201 -41
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +76 -30
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +74 -28
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/custom-object.d.mts +128 -15
- package/lib/manifest/custom-object.d.mts.map +1 -1
- package/lib/manifest/custom-object.d.ts +128 -15
- package/lib/manifest/custom-object.d.ts.map +1 -1
- package/lib/manifest/custom-object.js +61 -26
- package/lib/manifest/custom-object.js.map +1 -1
- package/lib/manifest/custom-object.mjs +61 -26
- package/lib/manifest/custom-object.mjs.map +1 -1
- package/lib/manifest/field.d.mts +265 -54
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +265 -54
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +100 -57
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +100 -57
- package/lib/manifest/field.mjs.map +1 -1
- package/lib/manifest/list-view.d.mts +105 -14
- package/lib/manifest/list-view.d.mts.map +1 -1
- package/lib/manifest/list-view.d.ts +105 -14
- package/lib/manifest/list-view.d.ts.map +1 -1
- package/lib/manifest/list-view.js +50 -14
- package/lib/manifest/list-view.js.map +1 -1
- package/lib/manifest/list-view.mjs +48 -12
- package/lib/manifest/list-view.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +77 -11
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +77 -11
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js +46 -24
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs +44 -22
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +92 -12
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +92 -12
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +40 -11
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +38 -9
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/rule.d.mts +94 -16
- package/lib/manifest/rule.d.mts.map +1 -1
- package/lib/manifest/rule.d.ts +94 -16
- package/lib/manifest/rule.d.ts.map +1 -1
- package/lib/manifest/rule.js +36 -15
- package/lib/manifest/rule.js.map +1 -1
- package/lib/manifest/rule.mjs +36 -15
- package/lib/manifest/rule.mjs.map +1 -1
- package/lib/manifest/sdui-page.d.mts +67 -11
- package/lib/manifest/sdui-page.d.mts.map +1 -1
- package/lib/manifest/sdui-page.d.ts +67 -11
- package/lib/manifest/sdui-page.d.ts.map +1 -1
- package/lib/manifest/sdui-page.js +44 -13
- package/lib/manifest/sdui-page.js.map +1 -1
- package/lib/manifest/sdui-page.mjs +42 -11
- package/lib/manifest/sdui-page.mjs.map +1 -1
- package/lib/manifest/validation.d.mts +87 -12
- package/lib/manifest/validation.d.mts.map +1 -1
- package/lib/manifest/validation.d.ts +87 -12
- package/lib/manifest/validation.d.ts.map +1 -1
- package/lib/manifest/validation.js +41 -15
- package/lib/manifest/validation.js.map +1 -1
- package/lib/manifest/validation.mjs +39 -13
- package/lib/manifest/validation.mjs.map +1 -1
- package/lib/sdui/actions.d.mts +25 -0
- package/lib/sdui/actions.d.mts.map +1 -0
- package/lib/sdui/actions.d.ts +25 -0
- package/lib/sdui/actions.d.ts.map +1 -0
- package/lib/sdui/actions.js +53 -0
- package/lib/sdui/actions.js.map +1 -0
- package/lib/sdui/actions.mjs +42 -0
- package/lib/sdui/actions.mjs.map +1 -0
- package/lib/sdui/component.d.mts +41 -0
- package/lib/sdui/component.d.mts.map +1 -0
- package/lib/sdui/component.d.ts +41 -0
- package/lib/sdui/component.d.ts.map +1 -0
- package/lib/sdui/component.js +95 -0
- package/lib/sdui/component.js.map +1 -0
- package/lib/sdui/component.mjs +91 -0
- package/lib/sdui/component.mjs.map +1 -0
- package/lib/sdui/components.d.mts +149 -0
- package/lib/sdui/components.d.mts.map +1 -0
- package/lib/sdui/components.d.ts +149 -0
- package/lib/sdui/components.d.ts.map +1 -0
- package/lib/sdui/components.js +303 -0
- package/lib/sdui/components.js.map +1 -0
- package/lib/sdui/components.mjs +298 -0
- package/lib/sdui/components.mjs.map +1 -0
- package/lib/sdui/conditions.d.mts +25 -0
- package/lib/sdui/conditions.d.mts.map +1 -0
- package/lib/sdui/conditions.d.ts +25 -0
- package/lib/sdui/conditions.d.ts.map +1 -0
- package/lib/sdui/conditions.js +47 -0
- package/lib/sdui/conditions.js.map +1 -0
- package/lib/sdui/conditions.mjs +35 -0
- package/lib/sdui/conditions.mjs.map +1 -0
- package/lib/sdui/directives.d.mts +18 -0
- package/lib/sdui/directives.d.mts.map +1 -0
- package/lib/sdui/directives.d.ts +18 -0
- package/lib/sdui/directives.d.ts.map +1 -0
- package/lib/sdui/directives.js +28 -0
- package/lib/sdui/directives.js.map +1 -0
- package/lib/sdui/directives.mjs +21 -0
- package/lib/sdui/directives.mjs.map +1 -0
- package/lib/sdui/index.d.mts +362 -0
- package/lib/sdui/index.d.mts.map +1 -0
- package/lib/sdui/index.d.ts +362 -0
- package/lib/sdui/index.d.ts.map +1 -0
- package/lib/sdui/index.js +375 -0
- package/lib/sdui/index.js.map +1 -0
- package/lib/sdui/index.mjs +199 -0
- package/lib/sdui/index.mjs.map +1 -0
- package/lib/sdui/props.d.mts +12 -0
- package/lib/sdui/props.d.mts.map +1 -0
- package/lib/sdui/props.d.ts +12 -0
- package/lib/sdui/props.d.ts.map +1 -0
- package/lib/sdui/props.js +25 -0
- package/lib/sdui/props.js.map +1 -0
- package/lib/sdui/props.mjs +21 -0
- package/lib/sdui/props.mjs.map +1 -0
- package/lib/sdui/render.d.mts +23 -0
- package/lib/sdui/render.d.mts.map +1 -0
- package/lib/sdui/render.d.ts +23 -0
- package/lib/sdui/render.d.ts.map +1 -0
- package/lib/sdui/render.js +40 -0
- package/lib/sdui/render.js.map +1 -0
- package/lib/sdui/render.mjs +37 -0
- package/lib/sdui/render.mjs.map +1 -0
- package/lib/sdui/state.d.mts +22 -0
- package/lib/sdui/state.d.mts.map +1 -0
- package/lib/sdui/state.d.ts +22 -0
- package/lib/sdui/state.d.ts.map +1 -0
- package/lib/sdui/state.js +57 -0
- package/lib/sdui/state.js.map +1 -0
- package/lib/sdui/state.mjs +53 -0
- package/lib/sdui/state.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/draft-hires.d.mts +4 -0
- package/resources/draft-hires.d.mts.map +1 -1
- package/resources/draft-hires.d.ts +4 -0
- package/resources/draft-hires.d.ts.map +1 -1
- package/resources/files.d.mts +16 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +16 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/headcount-positions.d.mts +2 -2
- package/resources/headcount-positions.d.mts.map +1 -1
- package/resources/headcount-positions.d.ts +2 -2
- package/resources/headcount-positions.d.ts.map +1 -1
- package/resources/legal-entities.d.mts +1 -1
- package/resources/legal-entities.d.mts.map +1 -1
- package/resources/legal-entities.d.ts +1 -1
- package/resources/legal-entities.d.ts.map +1 -1
- package/resources/location-factors.d.mts +2 -2
- package/resources/location-factors.d.mts.map +1 -1
- package/resources/location-factors.d.ts +2 -2
- package/resources/location-factors.d.ts.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/workers.d.mts +2 -2
- package/resources/workers.d.mts.map +1 -1
- package/resources/workers.d.ts +2 -2
- package/resources/workers.d.ts.map +1 -1
- package/src/lib/manifest/app.ts +81 -26
- package/src/lib/manifest/category.ts +63 -14
- package/src/lib/manifest/custom-object-field-section.ts +56 -17
- package/src/lib/manifest/custom-object-page-layout.ts +201 -66
- package/src/lib/manifest/custom-object.ts +128 -37
- package/src/lib/manifest/field.ts +265 -75
- package/src/lib/manifest/list-view.ts +105 -25
- package/src/lib/manifest/manifest-builder.ts +75 -32
- package/src/lib/manifest/manifest-function.ts +92 -22
- package/src/lib/manifest/rule.ts +95 -29
- package/src/lib/manifest/sdui-page.ts +67 -21
- package/src/lib/manifest/validation.ts +87 -24
- package/src/lib/sdui/actions.ts +58 -0
- package/src/lib/sdui/component.ts +122 -0
- package/src/lib/sdui/components.ts +308 -0
- package/src/lib/sdui/conditions.ts +59 -0
- package/src/lib/sdui/directives.ts +42 -0
- package/src/lib/sdui/index.ts +365 -0
- package/src/lib/sdui/props.ts +32 -0
- package/src/lib/sdui/render.ts +58 -0
- package/src/lib/sdui/state.ts +60 -0
- package/src/resources/draft-hires.ts +5 -0
- package/src/resources/files.ts +18 -1
- package/src/resources/headcount-positions.ts +2 -0
- package/src/resources/legal-entities.ts +1 -0
- package/src/resources/location-factors.ts +2 -0
- package/src/resources/shared.ts +1 -0
- package/src/resources/workers.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/lib/manifest/category.js
CHANGED
|
@@ -1,29 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
4
|
-
*
|
|
5
|
-
* Rippling category definitions for grouping objects in navigation.
|
|
6
|
-
* Backend schema: CUSTOM_CATEGORY (v2)
|
|
7
|
-
*/
|
|
8
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
3
|
exports.Category = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Defines a category and registers it with the manifest.
|
|
6
|
+
*
|
|
7
|
+
* A category is the navigation grouping that organizes related custom objects
|
|
8
|
+
* in the Rippling sidebar. You would normally define one category per domain,
|
|
9
|
+
* then pass it (or its api_name string) to each {@link CustomObject} in that domain.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const manifest = new ManifestBuilder({
|
|
14
|
+
* key: 'gym_membership_management',
|
|
15
|
+
* name: 'Gym Membership Management',
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* const gymCategory = new Category(manifest, {
|
|
19
|
+
* apiName: 'gym__c',
|
|
20
|
+
* name: 'Gym',
|
|
21
|
+
* description: 'Memberships, staff, schedules, and attendance',
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* // Pass the instance to any CustomObject in this domain:
|
|
25
|
+
* const memberObj = new CustomObject(manifest, {
|
|
26
|
+
* apiName: 'gym_member__c',
|
|
27
|
+
* name: 'Member',
|
|
28
|
+
* category: gymCategory,
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
33
|
+
*/
|
|
10
34
|
class Category {
|
|
11
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @param scope - The manifest to register this category with.
|
|
37
|
+
* @param props - Initialization properties.
|
|
38
|
+
*/
|
|
12
39
|
constructor(scope, props) {
|
|
13
40
|
this._apiName = props.apiName;
|
|
14
41
|
this._name = props.name;
|
|
15
42
|
this._description = props.description ?? null;
|
|
16
43
|
scope._register(this);
|
|
17
44
|
}
|
|
18
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
47
|
+
*/
|
|
19
48
|
getApiName() {
|
|
20
49
|
return this._apiName;
|
|
21
50
|
}
|
|
22
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Returns the display name of this category (e.g. `'Gym'`).
|
|
53
|
+
*/
|
|
23
54
|
getName() {
|
|
24
55
|
return this._name;
|
|
25
56
|
}
|
|
26
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Serializes this category to the wire format consumed by the manifest install endpoint.
|
|
59
|
+
*
|
|
60
|
+
* @returns A plain object with `type: 'CUSTOM_CATEGORY'` and all configured fields.
|
|
61
|
+
*/
|
|
27
62
|
toDict() {
|
|
28
63
|
return {
|
|
29
64
|
type: 'CUSTOM_CATEGORY',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":";;;AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,QAAQ;IAKnB;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC;QAC9C,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,WAAW,EAAE,IAAI,CAAC,YAAY,IAAI,IAAI;SACvC,CAAC;IACJ,CAAC;CACF;AA3CD,4BA2CC"}
|
|
@@ -1,26 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* Defines a category and registers it with the manifest.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* A category is the navigation grouping that organizes related custom objects
|
|
5
|
+
* in the Rippling sidebar. You would normally define one category per domain,
|
|
6
|
+
* then pass it (or its api_name string) to each {@link CustomObject} in that domain.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const manifest = new ManifestBuilder({
|
|
11
|
+
* key: 'gym_membership_management',
|
|
12
|
+
* name: 'Gym Membership Management',
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* const gymCategory = new Category(manifest, {
|
|
16
|
+
* apiName: 'gym__c',
|
|
17
|
+
* name: 'Gym',
|
|
18
|
+
* description: 'Memberships, staff, schedules, and attendance',
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // Pass the instance to any CustomObject in this domain:
|
|
22
|
+
* const memberObj = new CustomObject(manifest, {
|
|
23
|
+
* apiName: 'gym_member__c',
|
|
24
|
+
* name: 'Member',
|
|
25
|
+
* category: gymCategory,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
6
30
|
*/
|
|
7
31
|
export class Category {
|
|
8
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* @param scope - The manifest to register this category with.
|
|
34
|
+
* @param props - Initialization properties.
|
|
35
|
+
*/
|
|
9
36
|
constructor(scope, props) {
|
|
10
37
|
this._apiName = props.apiName;
|
|
11
38
|
this._name = props.name;
|
|
12
39
|
this._description = props.description ?? null;
|
|
13
40
|
scope._register(this);
|
|
14
41
|
}
|
|
15
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
44
|
+
*/
|
|
16
45
|
getApiName() {
|
|
17
46
|
return this._apiName;
|
|
18
47
|
}
|
|
19
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Returns the display name of this category (e.g. `'Gym'`).
|
|
50
|
+
*/
|
|
20
51
|
getName() {
|
|
21
52
|
return this._name;
|
|
22
53
|
}
|
|
23
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Serializes this category to the wire format consumed by the manifest install endpoint.
|
|
56
|
+
*
|
|
57
|
+
* @returns A plain object with `type: 'CUSTOM_CATEGORY'` and all configured fields.
|
|
58
|
+
*/
|
|
24
59
|
toDict() {
|
|
25
60
|
return {
|
|
26
61
|
type: 'CUSTOM_CATEGORY',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.mjs","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"category.mjs","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,QAAQ;IAKnB;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC;QAC9C,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,WAAW,EAAE,IAAI,CAAC,YAAY,IAAI,IAAI;SACvC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,21 +1,71 @@
|
|
|
1
1
|
import type { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Initialization properties for {@link CustomObjectFieldSection}.
|
|
4
|
+
*/
|
|
2
5
|
export interface CustomObjectFieldSectionProps {
|
|
3
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Display name of the section shown as a group header on the detail page
|
|
8
|
+
* (e.g. `'Profile'`, `'Membership'`).
|
|
9
|
+
*
|
|
10
|
+
* Required.
|
|
11
|
+
*/
|
|
4
12
|
name: string;
|
|
5
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Stable identifier for this section. Pass a human-readable slug
|
|
15
|
+
* (e.g. `'sec_gm_profile'`) to keep it stable across manifest regenerations.
|
|
16
|
+
*
|
|
17
|
+
* Optional. Auto-generated when omitted. @default generateId('sec')
|
|
18
|
+
*/
|
|
6
19
|
sectionId?: string;
|
|
7
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Defines a field section and registers it with the manifest.
|
|
23
|
+
*
|
|
24
|
+
* A field section is a named group of fields displayed together on a custom
|
|
25
|
+
* object's detail page. After creating a section, pass it as the `section`
|
|
26
|
+
* prop on any field that should belong to it.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const profileSection = new CustomObjectFieldSection(memberObj, {
|
|
31
|
+
* name: 'Profile',
|
|
32
|
+
* sectionId: 'sec_gm_profile',
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* const firstName = new TextField(memberObj, {
|
|
36
|
+
* apiName: 'first_name__c',
|
|
37
|
+
* displayName: 'First name',
|
|
38
|
+
* section: profileSection,
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
43
|
+
*/
|
|
8
44
|
export declare class CustomObjectFieldSection {
|
|
9
45
|
private readonly _sectionId;
|
|
10
46
|
private readonly _name;
|
|
11
47
|
private readonly _model;
|
|
12
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @param customObject - The custom object this section belongs to.
|
|
50
|
+
* @param props - Initialization properties.
|
|
51
|
+
*/
|
|
13
52
|
constructor(customObject: CustomObject, props: CustomObjectFieldSectionProps);
|
|
14
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
55
|
+
*
|
|
56
|
+
* Use this value in page layout field entries via `getSectionId()`, or pass
|
|
57
|
+
* the section instance directly to field `section` props.
|
|
58
|
+
*/
|
|
15
59
|
getSectionId(): string;
|
|
16
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Returns the api_name of the custom object this section belongs to.
|
|
62
|
+
*/
|
|
17
63
|
getModelApiName(): string;
|
|
18
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Serializes this section to the wire format consumed by the manifest install endpoint.
|
|
66
|
+
*
|
|
67
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_FIELD_SECTION'`.
|
|
68
|
+
*/
|
|
19
69
|
toDict(): Record<string, any>;
|
|
20
70
|
}
|
|
21
71
|
//# sourceMappingURL=custom-object-field-section.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;AAE5B;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,6BAA6B;IAO5E;;;;;OAKG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -1,21 +1,71 @@
|
|
|
1
1
|
import type { CustomObject } from "./custom-object.js";
|
|
2
|
+
/**
|
|
3
|
+
* Initialization properties for {@link CustomObjectFieldSection}.
|
|
4
|
+
*/
|
|
2
5
|
export interface CustomObjectFieldSectionProps {
|
|
3
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Display name of the section shown as a group header on the detail page
|
|
8
|
+
* (e.g. `'Profile'`, `'Membership'`).
|
|
9
|
+
*
|
|
10
|
+
* Required.
|
|
11
|
+
*/
|
|
4
12
|
name: string;
|
|
5
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Stable identifier for this section. Pass a human-readable slug
|
|
15
|
+
* (e.g. `'sec_gm_profile'`) to keep it stable across manifest regenerations.
|
|
16
|
+
*
|
|
17
|
+
* Optional. Auto-generated when omitted. @default generateId('sec')
|
|
18
|
+
*/
|
|
6
19
|
sectionId?: string;
|
|
7
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Defines a field section and registers it with the manifest.
|
|
23
|
+
*
|
|
24
|
+
* A field section is a named group of fields displayed together on a custom
|
|
25
|
+
* object's detail page. After creating a section, pass it as the `section`
|
|
26
|
+
* prop on any field that should belong to it.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const profileSection = new CustomObjectFieldSection(memberObj, {
|
|
31
|
+
* name: 'Profile',
|
|
32
|
+
* sectionId: 'sec_gm_profile',
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* const firstName = new TextField(memberObj, {
|
|
36
|
+
* apiName: 'first_name__c',
|
|
37
|
+
* displayName: 'First name',
|
|
38
|
+
* section: profileSection,
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
43
|
+
*/
|
|
8
44
|
export declare class CustomObjectFieldSection {
|
|
9
45
|
private readonly _sectionId;
|
|
10
46
|
private readonly _name;
|
|
11
47
|
private readonly _model;
|
|
12
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @param customObject - The custom object this section belongs to.
|
|
50
|
+
* @param props - Initialization properties.
|
|
51
|
+
*/
|
|
13
52
|
constructor(customObject: CustomObject, props: CustomObjectFieldSectionProps);
|
|
14
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
55
|
+
*
|
|
56
|
+
* Use this value in page layout field entries via `getSectionId()`, or pass
|
|
57
|
+
* the section instance directly to field `section` props.
|
|
58
|
+
*/
|
|
15
59
|
getSectionId(): string;
|
|
16
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Returns the api_name of the custom object this section belongs to.
|
|
62
|
+
*/
|
|
17
63
|
getModelApiName(): string;
|
|
18
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Serializes this section to the wire format consumed by the manifest install endpoint.
|
|
66
|
+
*
|
|
67
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_FIELD_SECTION'`.
|
|
68
|
+
*/
|
|
19
69
|
toDict(): Record<string, any>;
|
|
20
70
|
}
|
|
21
71
|
//# sourceMappingURL=custom-object-field-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;AAE5B;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,6BAA6B;IAO5E;;;;;OAKG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -1,34 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
4
|
-
*
|
|
5
|
-
* Custom object field sections (UI grouping of fields on detail pages).
|
|
6
|
-
* Backend schema: CUSTOM_OBJECT_FIELD_SECTION (v2)
|
|
7
|
-
*
|
|
8
|
-
* Construction is CDK-style: `new CustomObjectFieldSection(customObject, props)`
|
|
9
|
-
* — the CO is the first positional arg, and the section auto-registers with
|
|
10
|
-
* the manifest via the CO's scope chain.
|
|
11
|
-
*/
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.CustomObjectFieldSection = void 0;
|
|
14
4
|
const _helpers_1 = require("./_helpers.js");
|
|
5
|
+
/**
|
|
6
|
+
* Defines a field section and registers it with the manifest.
|
|
7
|
+
*
|
|
8
|
+
* A field section is a named group of fields displayed together on a custom
|
|
9
|
+
* object's detail page. After creating a section, pass it as the `section`
|
|
10
|
+
* prop on any field that should belong to it.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const profileSection = new CustomObjectFieldSection(memberObj, {
|
|
15
|
+
* name: 'Profile',
|
|
16
|
+
* sectionId: 'sec_gm_profile',
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* const firstName = new TextField(memberObj, {
|
|
20
|
+
* apiName: 'first_name__c',
|
|
21
|
+
* displayName: 'First name',
|
|
22
|
+
* section: profileSection,
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
27
|
+
*/
|
|
15
28
|
class CustomObjectFieldSection {
|
|
16
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @param customObject - The custom object this section belongs to.
|
|
31
|
+
* @param props - Initialization properties.
|
|
32
|
+
*/
|
|
17
33
|
constructor(customObject, props) {
|
|
18
34
|
this._sectionId = props.sectionId ?? (0, _helpers_1.generateId)('sec');
|
|
19
35
|
this._name = props.name;
|
|
20
36
|
this._model = customObject;
|
|
21
37
|
customObject._register(this);
|
|
22
38
|
}
|
|
23
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
41
|
+
*
|
|
42
|
+
* Use this value in page layout field entries via `getSectionId()`, or pass
|
|
43
|
+
* the section instance directly to field `section` props.
|
|
44
|
+
*/
|
|
24
45
|
getSectionId() {
|
|
25
46
|
return this._sectionId;
|
|
26
47
|
}
|
|
27
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Returns the api_name of the custom object this section belongs to.
|
|
50
|
+
*/
|
|
28
51
|
getModelApiName() {
|
|
29
52
|
return this._model.getApiName();
|
|
30
53
|
}
|
|
31
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Serializes this section to the wire format consumed by the manifest install endpoint.
|
|
56
|
+
*
|
|
57
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_FIELD_SECTION'`.
|
|
58
|
+
*/
|
|
32
59
|
toDict() {
|
|
33
60
|
return {
|
|
34
61
|
type: 'CUSTOM_OBJECT_FIELD_SECTION',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.js","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.js","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;AAuBxC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,wBAAwB;IAKnC;;;OAGG;IACH,YAAY,YAA0B,EAAE,KAAoC;QAC1E,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,IAAI,IAAA,qBAAU,EAAC,KAAK,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,6BAA6B;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACpC,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;IACJ,CAAC;CACF;AA9CD,4DA8CC"}
|
|
@@ -1,31 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { generateId } from "./_helpers.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Defines a field section and registers it with the manifest.
|
|
4
|
+
*
|
|
5
|
+
* A field section is a named group of fields displayed together on a custom
|
|
6
|
+
* object's detail page. After creating a section, pass it as the `section`
|
|
7
|
+
* prop on any field that should belong to it.
|
|
3
8
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const profileSection = new CustomObjectFieldSection(memberObj, {
|
|
12
|
+
* name: 'Profile',
|
|
13
|
+
* sectionId: 'sec_gm_profile',
|
|
14
|
+
* });
|
|
6
15
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
16
|
+
* const firstName = new TextField(memberObj, {
|
|
17
|
+
* apiName: 'first_name__c',
|
|
18
|
+
* displayName: 'First name',
|
|
19
|
+
* section: profileSection,
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
10
24
|
*/
|
|
11
|
-
import { generateId } from "./_helpers.mjs";
|
|
12
25
|
export class CustomObjectFieldSection {
|
|
13
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @param customObject - The custom object this section belongs to.
|
|
28
|
+
* @param props - Initialization properties.
|
|
29
|
+
*/
|
|
14
30
|
constructor(customObject, props) {
|
|
15
31
|
this._sectionId = props.sectionId ?? generateId('sec');
|
|
16
32
|
this._name = props.name;
|
|
17
33
|
this._model = customObject;
|
|
18
34
|
customObject._register(this);
|
|
19
35
|
}
|
|
20
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
38
|
+
*
|
|
39
|
+
* Use this value in page layout field entries via `getSectionId()`, or pass
|
|
40
|
+
* the section instance directly to field `section` props.
|
|
41
|
+
*/
|
|
21
42
|
getSectionId() {
|
|
22
43
|
return this._sectionId;
|
|
23
44
|
}
|
|
24
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Returns the api_name of the custom object this section belongs to.
|
|
47
|
+
*/
|
|
25
48
|
getModelApiName() {
|
|
26
49
|
return this._model.getApiName();
|
|
27
50
|
}
|
|
28
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Serializes this section to the wire format consumed by the manifest install endpoint.
|
|
53
|
+
*
|
|
54
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_FIELD_SECTION'`.
|
|
55
|
+
*/
|
|
29
56
|
toDict() {
|
|
30
57
|
return {
|
|
31
58
|
type: 'CUSTOM_OBJECT_FIELD_SECTION',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE;AAuBrB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,wBAAwB;IAKnC;;;OAGG;IACH,YAAY,YAA0B,EAAE,KAAoC;QAC1E,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,6BAA6B;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACpC,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;IACJ,CAAC;CACF"}
|