@rippling/rippling-sdk 0.2.0-alpha.33 → 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/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +17 -0
- package/client.js.map +1 -1
- package/client.mjs +17 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/lib/manifest/_helpers.d.mts +91 -0
- package/lib/manifest/_helpers.d.mts.map +1 -0
- package/lib/manifest/_helpers.d.ts +91 -0
- package/lib/manifest/_helpers.d.ts.map +1 -0
- package/lib/manifest/_helpers.js +65 -0
- package/lib/manifest/_helpers.js.map +1 -0
- package/lib/manifest/_helpers.mjs +61 -0
- package/lib/manifest/_helpers.mjs.map +1 -0
- package/lib/manifest/app.d.mts +113 -0
- package/lib/manifest/app.d.mts.map +1 -0
- package/lib/manifest/app.d.ts +113 -0
- package/lib/manifest/app.d.ts.map +1 -0
- package/lib/manifest/app.js +95 -0
- package/lib/manifest/app.js.map +1 -0
- package/lib/manifest/app.mjs +91 -0
- package/lib/manifest/app.mjs.map +1 -0
- package/lib/manifest/category.d.mts +79 -0
- package/lib/manifest/category.d.mts.map +1 -0
- package/lib/manifest/category.d.ts +79 -0
- package/lib/manifest/category.d.ts.map +1 -0
- package/lib/manifest/category.js +72 -0
- package/lib/manifest/category.js.map +1 -0
- package/lib/manifest/category.mjs +68 -0
- package/lib/manifest/category.mjs.map +1 -0
- package/lib/manifest/custom-object-field-section.d.mts +71 -0
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -0
- package/lib/manifest/custom-object-field-section.d.ts +71 -0
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -0
- package/lib/manifest/custom-object-field-section.js +69 -0
- package/lib/manifest/custom-object-field-section.js.map +1 -0
- package/lib/manifest/custom-object-field-section.mjs +65 -0
- package/lib/manifest/custom-object-field-section.mjs.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.mts +318 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.ts +318 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -0
- package/lib/manifest/custom-object-page-layout.js +158 -0
- package/lib/manifest/custom-object-page-layout.js.map +1 -0
- package/lib/manifest/custom-object-page-layout.mjs +154 -0
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -0
- package/lib/manifest/custom-object.d.mts +165 -0
- package/lib/manifest/custom-object.d.mts.map +1 -0
- package/lib/manifest/custom-object.d.ts +165 -0
- package/lib/manifest/custom-object.d.ts.map +1 -0
- package/lib/manifest/custom-object.js +254 -0
- package/lib/manifest/custom-object.js.map +1 -0
- package/lib/manifest/custom-object.mjs +250 -0
- package/lib/manifest/custom-object.mjs.map +1 -0
- package/lib/manifest/field.d.mts +487 -0
- package/lib/manifest/field.d.mts.map +1 -0
- package/lib/manifest/field.d.ts +487 -0
- package/lib/manifest/field.d.ts.map +1 -0
- package/lib/manifest/field.js +461 -0
- package/lib/manifest/field.js.map +1 -0
- package/lib/manifest/field.mjs +438 -0
- package/lib/manifest/field.mjs.map +1 -0
- package/lib/manifest/index.d.mts +15 -0
- package/lib/manifest/index.d.mts.map +1 -0
- package/lib/manifest/index.d.ts +15 -0
- package/lib/manifest/index.d.ts.map +1 -0
- package/lib/manifest/index.js +53 -0
- package/lib/manifest/index.js.map +1 -0
- package/lib/manifest/index.mjs +18 -0
- package/lib/manifest/index.mjs.map +1 -0
- package/lib/manifest/list-view.d.mts +138 -0
- package/lib/manifest/list-view.d.mts.map +1 -0
- package/lib/manifest/list-view.d.ts +138 -0
- package/lib/manifest/list-view.d.ts.map +1 -0
- package/lib/manifest/list-view.js +109 -0
- package/lib/manifest/list-view.js.map +1 -0
- package/lib/manifest/list-view.mjs +105 -0
- package/lib/manifest/list-view.mjs.map +1 -0
- package/lib/manifest/manifest-builder.d.mts +110 -0
- package/lib/manifest/manifest-builder.d.mts.map +1 -0
- package/lib/manifest/manifest-builder.d.ts +110 -0
- package/lib/manifest/manifest-builder.d.ts.map +1 -0
- package/lib/manifest/manifest-builder.js +91 -0
- package/lib/manifest/manifest-builder.js.map +1 -0
- package/lib/manifest/manifest-builder.mjs +87 -0
- package/lib/manifest/manifest-builder.mjs.map +1 -0
- package/lib/manifest/manifest-function.d.mts +119 -0
- package/lib/manifest/manifest-function.d.mts.map +1 -0
- package/lib/manifest/manifest-function.d.ts +119 -0
- package/lib/manifest/manifest-function.d.ts.map +1 -0
- package/lib/manifest/manifest-function.js +85 -0
- package/lib/manifest/manifest-function.js.map +1 -0
- package/lib/manifest/manifest-function.mjs +81 -0
- package/lib/manifest/manifest-function.mjs.map +1 -0
- package/lib/manifest/rule.d.mts +128 -0
- package/lib/manifest/rule.d.mts.map +1 -0
- package/lib/manifest/rule.d.ts +128 -0
- package/lib/manifest/rule.d.ts.map +1 -0
- package/lib/manifest/rule.js +105 -0
- package/lib/manifest/rule.js.map +1 -0
- package/lib/manifest/rule.mjs +101 -0
- package/lib/manifest/rule.mjs.map +1 -0
- package/lib/manifest/sdui-page.d.mts +89 -0
- package/lib/manifest/sdui-page.d.mts.map +1 -0
- package/lib/manifest/sdui-page.d.ts +89 -0
- package/lib/manifest/sdui-page.d.ts.map +1 -0
- package/lib/manifest/sdui-page.js +83 -0
- package/lib/manifest/sdui-page.js.map +1 -0
- package/lib/manifest/sdui-page.mjs +79 -0
- package/lib/manifest/sdui-page.mjs.map +1 -0
- package/lib/manifest/validation.d.mts +116 -0
- package/lib/manifest/validation.d.mts.map +1 -0
- package/lib/manifest/validation.d.ts +116 -0
- package/lib/manifest/validation.d.ts.map +1 -0
- package/lib/manifest/validation.js +83 -0
- package/lib/manifest/validation.js.map +1 -0
- package/lib/manifest/validation.mjs +79 -0
- package/lib/manifest/validation.mjs.map +1 -0
- 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 +11 -1
- package/resources/draft-hires.d.mts +26 -0
- package/resources/draft-hires.d.mts.map +1 -1
- package/resources/draft-hires.d.ts +26 -0
- package/resources/draft-hires.d.ts.map +1 -1
- package/resources/earnings-inputs.d.mts +99 -1
- package/resources/earnings-inputs.d.mts.map +1 -1
- package/resources/earnings-inputs.d.ts +99 -1
- package/resources/earnings-inputs.d.ts.map +1 -1
- package/resources/earnings-inputs.js +6 -0
- package/resources/earnings-inputs.js.map +1 -1
- package/resources/earnings-inputs.mjs +6 -0
- package/resources/earnings-inputs.mjs.map +1 -1
- package/resources/files.d.mts +164 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +164 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +25 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +21 -0
- package/resources/files.mjs.map +1 -0
- 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/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.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/client.ts +29 -0
- package/src/internal/types.ts +6 -8
- package/src/lib/manifest/_helpers.ts +164 -0
- package/src/lib/manifest/app.ts +163 -0
- package/src/lib/manifest/category.ts +100 -0
- package/src/lib/manifest/custom-object-field-section.ts +93 -0
- package/src/lib/manifest/custom-object-page-layout.ts +427 -0
- package/src/lib/manifest/custom-object.ts +360 -0
- package/src/lib/manifest/field.ts +822 -0
- package/src/lib/manifest/index.ts +114 -0
- package/src/lib/manifest/list-view.ts +183 -0
- package/src/lib/manifest/manifest-builder.ts +140 -0
- package/src/lib/manifest/manifest-function.ts +151 -0
- package/src/lib/manifest/rule.ts +191 -0
- package/src/lib/manifest/sdui-page.ts +118 -0
- package/src/lib/manifest/validation.ts +150 -0
- 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 +31 -0
- package/src/resources/earnings-inputs.ts +127 -0
- package/src/resources/files.ts +203 -0
- package/src/resources/headcount-positions.ts +2 -0
- package/src/resources/index.ts +3 -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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
import type { ManifestScope } from "./manifest-builder.mjs";
|
|
3
|
+
import { SduiPage } from "./sdui-page.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* A single page entry in an {@link App}.
|
|
6
|
+
*
|
|
7
|
+
* - Pass a {@link CustomObject} to create an object-page tab.
|
|
8
|
+
* - Pass an {@link SduiPage} to create a custom SDUI surface tab.
|
|
9
|
+
*/
|
|
10
|
+
export type AppPage = CustomObject | SduiPage;
|
|
11
|
+
/**
|
|
12
|
+
* S3 icon reference for an {@link App}.
|
|
13
|
+
*/
|
|
14
|
+
export interface AppIcon {
|
|
15
|
+
/** S3 bucket holding the icon asset. */
|
|
16
|
+
s3Bucket: string;
|
|
17
|
+
/** S3 key (path) within `s3Bucket`. */
|
|
18
|
+
s3Key: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Initialization properties for {@link App}.
|
|
22
|
+
*/
|
|
23
|
+
export interface AppProps {
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier for this app (e.g. `'gym_membership_management_app'`).
|
|
26
|
+
*
|
|
27
|
+
* Required.
|
|
28
|
+
*/
|
|
29
|
+
apiName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Display name shown as the app title in the Rippling UI.
|
|
32
|
+
*
|
|
33
|
+
* Required.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human-readable description of what this app does.
|
|
38
|
+
*
|
|
39
|
+
* Optional. @default null
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* App type discriminator.
|
|
44
|
+
*
|
|
45
|
+
* Optional. @default `'custom'`
|
|
46
|
+
*/
|
|
47
|
+
appType?: string;
|
|
48
|
+
/**
|
|
49
|
+
* S3 icon for this app.
|
|
50
|
+
*
|
|
51
|
+
* Optional. @default null
|
|
52
|
+
*/
|
|
53
|
+
icon?: AppIcon;
|
|
54
|
+
/**
|
|
55
|
+
* Pages shown as tabs in the app. Pass {@link CustomObject} instances for object-page
|
|
56
|
+
* tabs and {@link SduiPage} instances for custom SDUI surfaces. Tab order matches
|
|
57
|
+
* the array order.
|
|
58
|
+
*
|
|
59
|
+
* Optional. @default `[]`
|
|
60
|
+
*/
|
|
61
|
+
pages?: AppPage[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Defines a Rippling app and registers it with the manifest.
|
|
65
|
+
*
|
|
66
|
+
* An app is the top-level navigation container. It groups one or more pages —
|
|
67
|
+
* either custom-object record pages or SDUI surfaces — as tabs visible to users.
|
|
68
|
+
* You would normally define the app last in your manifest file, after all objects,
|
|
69
|
+
* functions, and SDUI pages have been declared.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* new App(manifest, {
|
|
74
|
+
* apiName: 'gym_membership_management_app',
|
|
75
|
+
* name: 'Gym Membership Management',
|
|
76
|
+
* description: 'Members, trainers, schedules, and check-in',
|
|
77
|
+
* appType: 'custom',
|
|
78
|
+
* pages: [memberObj, trainerObj, sessionObj, todaySchedulePage, checkInDeskPage],
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @see {@link CustomObject} — object-page tab source.
|
|
83
|
+
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
|
+
*/
|
|
85
|
+
export declare class App {
|
|
86
|
+
private readonly _apiName;
|
|
87
|
+
private readonly _name;
|
|
88
|
+
private readonly _description;
|
|
89
|
+
private readonly _appType;
|
|
90
|
+
private readonly _icon;
|
|
91
|
+
/** Wire-format pages, resolved eagerly at construction. */
|
|
92
|
+
private readonly _pages;
|
|
93
|
+
/**
|
|
94
|
+
* @param scope - The manifest to register this app with.
|
|
95
|
+
* @param props - Initialization properties.
|
|
96
|
+
*/
|
|
97
|
+
constructor(scope: ManifestScope, props: AppProps);
|
|
98
|
+
/**
|
|
99
|
+
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
|
+
*/
|
|
101
|
+
getApiName(): string;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the display name of this app.
|
|
104
|
+
*/
|
|
105
|
+
getName(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Serializes this app to the wire format consumed by the manifest install endpoint.
|
|
108
|
+
*
|
|
109
|
+
* @returns A plain object with `type: 'CUSTOM_APP'`. Optional fields are omitted when unset.
|
|
110
|
+
*/
|
|
111
|
+
toDict(): Record<string, any>;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=app.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;OACtB,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB;AAoBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAE/C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ;IAUjD;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { CustomObject } from "./custom-object.js";
|
|
2
|
+
import type { ManifestScope } from "./manifest-builder.js";
|
|
3
|
+
import { SduiPage } from "./sdui-page.js";
|
|
4
|
+
/**
|
|
5
|
+
* A single page entry in an {@link App}.
|
|
6
|
+
*
|
|
7
|
+
* - Pass a {@link CustomObject} to create an object-page tab.
|
|
8
|
+
* - Pass an {@link SduiPage} to create a custom SDUI surface tab.
|
|
9
|
+
*/
|
|
10
|
+
export type AppPage = CustomObject | SduiPage;
|
|
11
|
+
/**
|
|
12
|
+
* S3 icon reference for an {@link App}.
|
|
13
|
+
*/
|
|
14
|
+
export interface AppIcon {
|
|
15
|
+
/** S3 bucket holding the icon asset. */
|
|
16
|
+
s3Bucket: string;
|
|
17
|
+
/** S3 key (path) within `s3Bucket`. */
|
|
18
|
+
s3Key: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Initialization properties for {@link App}.
|
|
22
|
+
*/
|
|
23
|
+
export interface AppProps {
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier for this app (e.g. `'gym_membership_management_app'`).
|
|
26
|
+
*
|
|
27
|
+
* Required.
|
|
28
|
+
*/
|
|
29
|
+
apiName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Display name shown as the app title in the Rippling UI.
|
|
32
|
+
*
|
|
33
|
+
* Required.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human-readable description of what this app does.
|
|
38
|
+
*
|
|
39
|
+
* Optional. @default null
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* App type discriminator.
|
|
44
|
+
*
|
|
45
|
+
* Optional. @default `'custom'`
|
|
46
|
+
*/
|
|
47
|
+
appType?: string;
|
|
48
|
+
/**
|
|
49
|
+
* S3 icon for this app.
|
|
50
|
+
*
|
|
51
|
+
* Optional. @default null
|
|
52
|
+
*/
|
|
53
|
+
icon?: AppIcon;
|
|
54
|
+
/**
|
|
55
|
+
* Pages shown as tabs in the app. Pass {@link CustomObject} instances for object-page
|
|
56
|
+
* tabs and {@link SduiPage} instances for custom SDUI surfaces. Tab order matches
|
|
57
|
+
* the array order.
|
|
58
|
+
*
|
|
59
|
+
* Optional. @default `[]`
|
|
60
|
+
*/
|
|
61
|
+
pages?: AppPage[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Defines a Rippling app and registers it with the manifest.
|
|
65
|
+
*
|
|
66
|
+
* An app is the top-level navigation container. It groups one or more pages —
|
|
67
|
+
* either custom-object record pages or SDUI surfaces — as tabs visible to users.
|
|
68
|
+
* You would normally define the app last in your manifest file, after all objects,
|
|
69
|
+
* functions, and SDUI pages have been declared.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* new App(manifest, {
|
|
74
|
+
* apiName: 'gym_membership_management_app',
|
|
75
|
+
* name: 'Gym Membership Management',
|
|
76
|
+
* description: 'Members, trainers, schedules, and check-in',
|
|
77
|
+
* appType: 'custom',
|
|
78
|
+
* pages: [memberObj, trainerObj, sessionObj, todaySchedulePage, checkInDeskPage],
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @see {@link CustomObject} — object-page tab source.
|
|
83
|
+
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
|
+
*/
|
|
85
|
+
export declare class App {
|
|
86
|
+
private readonly _apiName;
|
|
87
|
+
private readonly _name;
|
|
88
|
+
private readonly _description;
|
|
89
|
+
private readonly _appType;
|
|
90
|
+
private readonly _icon;
|
|
91
|
+
/** Wire-format pages, resolved eagerly at construction. */
|
|
92
|
+
private readonly _pages;
|
|
93
|
+
/**
|
|
94
|
+
* @param scope - The manifest to register this app with.
|
|
95
|
+
* @param props - Initialization properties.
|
|
96
|
+
*/
|
|
97
|
+
constructor(scope: ManifestScope, props: AppProps);
|
|
98
|
+
/**
|
|
99
|
+
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
|
+
*/
|
|
101
|
+
getApiName(): string;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the display name of this app.
|
|
104
|
+
*/
|
|
105
|
+
getName(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Serializes this app to the wire format consumed by the manifest install endpoint.
|
|
108
|
+
*
|
|
109
|
+
* @returns A plain object with `type: 'CUSTOM_APP'`. Optional fields are omitted when unset.
|
|
110
|
+
*/
|
|
111
|
+
toDict(): Record<string, any>;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;OACtB,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB;AAoBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAE/C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ;IAUjD;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.App = void 0;
|
|
4
|
+
const custom_object_1 = require("./custom-object.js");
|
|
5
|
+
function resolvePage(entry) {
|
|
6
|
+
if (entry instanceof custom_object_1.CustomObject) {
|
|
7
|
+
const apiName = entry.getApiName();
|
|
8
|
+
return {
|
|
9
|
+
api_name: apiName,
|
|
10
|
+
page_type: 'object_page',
|
|
11
|
+
object_rql_name: apiName,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
const sduiPageId = entry.getSduiPageId();
|
|
16
|
+
return {
|
|
17
|
+
api_name: sduiPageId,
|
|
18
|
+
page_type: 'sdui_page',
|
|
19
|
+
sdui_page_id: sduiPageId,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Defines a Rippling app and registers it with the manifest.
|
|
25
|
+
*
|
|
26
|
+
* An app is the top-level navigation container. It groups one or more pages —
|
|
27
|
+
* either custom-object record pages or SDUI surfaces — as tabs visible to users.
|
|
28
|
+
* You would normally define the app last in your manifest file, after all objects,
|
|
29
|
+
* functions, and SDUI pages have been declared.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* new App(manifest, {
|
|
34
|
+
* apiName: 'gym_membership_management_app',
|
|
35
|
+
* name: 'Gym Membership Management',
|
|
36
|
+
* description: 'Members, trainers, schedules, and check-in',
|
|
37
|
+
* appType: 'custom',
|
|
38
|
+
* pages: [memberObj, trainerObj, sessionObj, todaySchedulePage, checkInDeskPage],
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link CustomObject} — object-page tab source.
|
|
43
|
+
* @see {@link SduiPage} — SDUI surface tab source.
|
|
44
|
+
*/
|
|
45
|
+
class App {
|
|
46
|
+
/**
|
|
47
|
+
* @param scope - The manifest to register this app with.
|
|
48
|
+
* @param props - Initialization properties.
|
|
49
|
+
*/
|
|
50
|
+
constructor(scope, props) {
|
|
51
|
+
this._apiName = props.apiName;
|
|
52
|
+
this._name = props.name;
|
|
53
|
+
this._description = props.description;
|
|
54
|
+
this._appType = props.appType;
|
|
55
|
+
this._icon = props.icon;
|
|
56
|
+
this._pages = (props.pages ?? []).map(resolvePage);
|
|
57
|
+
scope._register(this);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
61
|
+
*/
|
|
62
|
+
getApiName() {
|
|
63
|
+
return this._apiName;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Returns the display name of this app.
|
|
67
|
+
*/
|
|
68
|
+
getName() {
|
|
69
|
+
return this._name;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Serializes this app to the wire format consumed by the manifest install endpoint.
|
|
73
|
+
*
|
|
74
|
+
* @returns A plain object with `type: 'CUSTOM_APP'`. Optional fields are omitted when unset.
|
|
75
|
+
*/
|
|
76
|
+
toDict() {
|
|
77
|
+
const component = {
|
|
78
|
+
type: 'CUSTOM_APP',
|
|
79
|
+
api_name: this._apiName,
|
|
80
|
+
name: this._name,
|
|
81
|
+
};
|
|
82
|
+
if (this._description != null)
|
|
83
|
+
component['description'] = this._description;
|
|
84
|
+
if (this._icon != null) {
|
|
85
|
+
component['icon'] = { s3_bucket: this._icon.s3Bucket, s3_key: this._icon.s3Key };
|
|
86
|
+
}
|
|
87
|
+
if (this._appType != null)
|
|
88
|
+
component['app_type'] = this._appType;
|
|
89
|
+
if (this._pages.length > 0)
|
|
90
|
+
component['pages'] = this._pages.map((p) => ({ ...p }));
|
|
91
|
+
return component;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.App = App;
|
|
95
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":";;;AAAA,sDAA+C;AAkE/C,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,4BAAY,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,aAAa;YACxB,eAAe,EAAE,OAAO;SACzB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACzC,OAAO;YACL,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,WAAW;YACtB,YAAY,EAAE,UAAU;SACzB,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,GAAG;IASd;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAe;QAC/C,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,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACnD,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,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnF,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxDD,kBAwDC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
function resolvePage(entry) {
|
|
3
|
+
if (entry instanceof CustomObject) {
|
|
4
|
+
const apiName = entry.getApiName();
|
|
5
|
+
return {
|
|
6
|
+
api_name: apiName,
|
|
7
|
+
page_type: 'object_page',
|
|
8
|
+
object_rql_name: apiName,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
const sduiPageId = entry.getSduiPageId();
|
|
13
|
+
return {
|
|
14
|
+
api_name: sduiPageId,
|
|
15
|
+
page_type: 'sdui_page',
|
|
16
|
+
sdui_page_id: sduiPageId,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Defines a Rippling app and registers it with the manifest.
|
|
22
|
+
*
|
|
23
|
+
* An app is the top-level navigation container. It groups one or more pages —
|
|
24
|
+
* either custom-object record pages or SDUI surfaces — as tabs visible to users.
|
|
25
|
+
* You would normally define the app last in your manifest file, after all objects,
|
|
26
|
+
* functions, and SDUI pages have been declared.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* new App(manifest, {
|
|
31
|
+
* apiName: 'gym_membership_management_app',
|
|
32
|
+
* name: 'Gym Membership Management',
|
|
33
|
+
* description: 'Members, trainers, schedules, and check-in',
|
|
34
|
+
* appType: 'custom',
|
|
35
|
+
* pages: [memberObj, trainerObj, sessionObj, todaySchedulePage, checkInDeskPage],
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see {@link CustomObject} — object-page tab source.
|
|
40
|
+
* @see {@link SduiPage} — SDUI surface tab source.
|
|
41
|
+
*/
|
|
42
|
+
export class App {
|
|
43
|
+
/**
|
|
44
|
+
* @param scope - The manifest to register this app with.
|
|
45
|
+
* @param props - Initialization properties.
|
|
46
|
+
*/
|
|
47
|
+
constructor(scope, props) {
|
|
48
|
+
this._apiName = props.apiName;
|
|
49
|
+
this._name = props.name;
|
|
50
|
+
this._description = props.description;
|
|
51
|
+
this._appType = props.appType;
|
|
52
|
+
this._icon = props.icon;
|
|
53
|
+
this._pages = (props.pages ?? []).map(resolvePage);
|
|
54
|
+
scope._register(this);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
58
|
+
*/
|
|
59
|
+
getApiName() {
|
|
60
|
+
return this._apiName;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns the display name of this app.
|
|
64
|
+
*/
|
|
65
|
+
getName() {
|
|
66
|
+
return this._name;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Serializes this app to the wire format consumed by the manifest install endpoint.
|
|
70
|
+
*
|
|
71
|
+
* @returns A plain object with `type: 'CUSTOM_APP'`. Optional fields are omitted when unset.
|
|
72
|
+
*/
|
|
73
|
+
toDict() {
|
|
74
|
+
const component = {
|
|
75
|
+
type: 'CUSTOM_APP',
|
|
76
|
+
api_name: this._apiName,
|
|
77
|
+
name: this._name,
|
|
78
|
+
};
|
|
79
|
+
if (this._description != null)
|
|
80
|
+
component['description'] = this._description;
|
|
81
|
+
if (this._icon != null) {
|
|
82
|
+
component['icon'] = { s3_bucket: this._icon.s3Bucket, s3_key: this._icon.s3Key };
|
|
83
|
+
}
|
|
84
|
+
if (this._appType != null)
|
|
85
|
+
component['app_type'] = this._appType;
|
|
86
|
+
if (this._pages.length > 0)
|
|
87
|
+
component['pages'] = this._pages.map((p) => ({ ...p }));
|
|
88
|
+
return component;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=app.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.mjs","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;AAkEvB,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,aAAa;YACxB,eAAe,EAAE,OAAO;SACzB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACzC,OAAO;YACL,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,WAAW;YACtB,YAAY,EAAE,UAAU;SACzB,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,GAAG;IASd;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAe;QAC/C,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,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACnD,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,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnF,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ManifestScope } from "./manifest-builder.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Initialization properties for {@link Category}.
|
|
4
|
+
*/
|
|
5
|
+
export interface CategoryProps {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for this category (e.g. `'gym__c'`). Must end with `__c`.
|
|
8
|
+
*
|
|
9
|
+
* Required.
|
|
10
|
+
*/
|
|
11
|
+
apiName: string;
|
|
12
|
+
/**
|
|
13
|
+
* Display name shown in the Rippling UI (e.g. `'Gym'`).
|
|
14
|
+
*
|
|
15
|
+
* Required.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable description of what this category groups.
|
|
20
|
+
*
|
|
21
|
+
* Optional. @default null
|
|
22
|
+
*/
|
|
23
|
+
description?: string | null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Defines a category and registers it with the manifest.
|
|
27
|
+
*
|
|
28
|
+
* A category is the navigation grouping that organizes related custom objects
|
|
29
|
+
* in the Rippling sidebar. You would normally define one category per domain,
|
|
30
|
+
* then pass it (or its api_name string) to each {@link CustomObject} in that domain.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const manifest = new ManifestBuilder({
|
|
35
|
+
* key: 'gym_membership_management',
|
|
36
|
+
* name: 'Gym Membership Management',
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* const gymCategory = new Category(manifest, {
|
|
40
|
+
* apiName: 'gym__c',
|
|
41
|
+
* name: 'Gym',
|
|
42
|
+
* description: 'Memberships, staff, schedules, and attendance',
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Pass the instance to any CustomObject in this domain:
|
|
46
|
+
* const memberObj = new CustomObject(manifest, {
|
|
47
|
+
* apiName: 'gym_member__c',
|
|
48
|
+
* name: 'Member',
|
|
49
|
+
* category: gymCategory,
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
54
|
+
*/
|
|
55
|
+
export declare class Category {
|
|
56
|
+
private readonly _apiName;
|
|
57
|
+
private readonly _name;
|
|
58
|
+
private readonly _description;
|
|
59
|
+
/**
|
|
60
|
+
* @param scope - The manifest to register this category with.
|
|
61
|
+
* @param props - Initialization properties.
|
|
62
|
+
*/
|
|
63
|
+
constructor(scope: ManifestScope, props: CategoryProps);
|
|
64
|
+
/**
|
|
65
|
+
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
66
|
+
*/
|
|
67
|
+
getApiName(): string;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the display name of this category (e.g. `'Gym'`).
|
|
70
|
+
*/
|
|
71
|
+
getName(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Serializes this category to the wire format consumed by the manifest install endpoint.
|
|
74
|
+
*
|
|
75
|
+
* @returns A plain object with `type: 'CUSTOM_CATEGORY'` and all configured fields.
|
|
76
|
+
*/
|
|
77
|
+
toDict(): Record<string, any>;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=category.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,aAAa,EAAE;AAE7B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAE7C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAOtD;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ManifestScope } from "./manifest-builder.js";
|
|
2
|
+
/**
|
|
3
|
+
* Initialization properties for {@link Category}.
|
|
4
|
+
*/
|
|
5
|
+
export interface CategoryProps {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for this category (e.g. `'gym__c'`). Must end with `__c`.
|
|
8
|
+
*
|
|
9
|
+
* Required.
|
|
10
|
+
*/
|
|
11
|
+
apiName: string;
|
|
12
|
+
/**
|
|
13
|
+
* Display name shown in the Rippling UI (e.g. `'Gym'`).
|
|
14
|
+
*
|
|
15
|
+
* Required.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable description of what this category groups.
|
|
20
|
+
*
|
|
21
|
+
* Optional. @default null
|
|
22
|
+
*/
|
|
23
|
+
description?: string | null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Defines a category and registers it with the manifest.
|
|
27
|
+
*
|
|
28
|
+
* A category is the navigation grouping that organizes related custom objects
|
|
29
|
+
* in the Rippling sidebar. You would normally define one category per domain,
|
|
30
|
+
* then pass it (or its api_name string) to each {@link CustomObject} in that domain.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const manifest = new ManifestBuilder({
|
|
35
|
+
* key: 'gym_membership_management',
|
|
36
|
+
* name: 'Gym Membership Management',
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* const gymCategory = new Category(manifest, {
|
|
40
|
+
* apiName: 'gym__c',
|
|
41
|
+
* name: 'Gym',
|
|
42
|
+
* description: 'Memberships, staff, schedules, and attendance',
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Pass the instance to any CustomObject in this domain:
|
|
46
|
+
* const memberObj = new CustomObject(manifest, {
|
|
47
|
+
* apiName: 'gym_member__c',
|
|
48
|
+
* name: 'Member',
|
|
49
|
+
* category: gymCategory,
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
54
|
+
*/
|
|
55
|
+
export declare class Category {
|
|
56
|
+
private readonly _apiName;
|
|
57
|
+
private readonly _name;
|
|
58
|
+
private readonly _description;
|
|
59
|
+
/**
|
|
60
|
+
* @param scope - The manifest to register this category with.
|
|
61
|
+
* @param props - Initialization properties.
|
|
62
|
+
*/
|
|
63
|
+
constructor(scope: ManifestScope, props: CategoryProps);
|
|
64
|
+
/**
|
|
65
|
+
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
66
|
+
*/
|
|
67
|
+
getApiName(): string;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the display name of this category (e.g. `'Gym'`).
|
|
70
|
+
*/
|
|
71
|
+
getName(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Serializes this category to the wire format consumed by the manifest install endpoint.
|
|
74
|
+
*
|
|
75
|
+
* @returns A plain object with `type: 'CUSTOM_CATEGORY'` and all configured fields.
|
|
76
|
+
*/
|
|
77
|
+
toDict(): Record<string, any>;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,aAAa,EAAE;AAE7B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAE7C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAOtD;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
+
*/
|
|
34
|
+
class Category {
|
|
35
|
+
/**
|
|
36
|
+
* @param scope - The manifest to register this category with.
|
|
37
|
+
* @param props - Initialization properties.
|
|
38
|
+
*/
|
|
39
|
+
constructor(scope, props) {
|
|
40
|
+
this._apiName = props.apiName;
|
|
41
|
+
this._name = props.name;
|
|
42
|
+
this._description = props.description ?? null;
|
|
43
|
+
scope._register(this);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
47
|
+
*/
|
|
48
|
+
getApiName() {
|
|
49
|
+
return this._apiName;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns the display name of this category (e.g. `'Gym'`).
|
|
53
|
+
*/
|
|
54
|
+
getName() {
|
|
55
|
+
return this._name;
|
|
56
|
+
}
|
|
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
|
+
*/
|
|
62
|
+
toDict() {
|
|
63
|
+
return {
|
|
64
|
+
type: 'CUSTOM_CATEGORY',
|
|
65
|
+
api_name: this._apiName,
|
|
66
|
+
name: this._name,
|
|
67
|
+
description: this._description ?? null,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.Category = Category;
|
|
72
|
+
//# sourceMappingURL=category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|