@rippling/rippling-sdk 0.2.0-alpha.74 → 0.2.0-alpha.76

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.
Files changed (60) hide show
  1. package/examples/manifest/dental-practice-management/dental-practice-management.ts +9 -3
  2. package/examples/manifest/dental-practice-management/functions/complete-visit.ts +5 -16
  3. package/examples/manifest/simple-todo-app/functions/mark-done.ts +48 -0
  4. package/examples/manifest/simple-todo-app/simple-todo-app.ts +17 -0
  5. package/functions.d.mts +12 -0
  6. package/functions.d.mts.map +1 -1
  7. package/functions.d.ts +12 -0
  8. package/functions.d.ts.map +1 -1
  9. package/functions.js.map +1 -1
  10. package/functions.mjs.map +1 -1
  11. package/lib/manifest/custom-object-action.d.mts +39 -0
  12. package/lib/manifest/custom-object-action.d.mts.map +1 -0
  13. package/lib/manifest/custom-object-action.d.ts +39 -0
  14. package/lib/manifest/custom-object-action.d.ts.map +1 -0
  15. package/lib/manifest/custom-object-action.js +55 -0
  16. package/lib/manifest/custom-object-action.js.map +1 -0
  17. package/lib/manifest/custom-object-action.mjs +51 -0
  18. package/lib/manifest/custom-object-action.mjs.map +1 -0
  19. package/lib/manifest/custom-object-page-layout.d.mts +1 -4
  20. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  21. package/lib/manifest/custom-object-page-layout.d.ts +1 -4
  22. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  23. package/lib/manifest/custom-object-page-layout.js +1 -5
  24. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  25. package/lib/manifest/custom-object-page-layout.mjs +1 -5
  26. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  27. package/lib/manifest/existing-manifest-context.d.mts +3 -0
  28. package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
  29. package/lib/manifest/existing-manifest-context.d.ts +3 -0
  30. package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
  31. package/lib/manifest/existing-manifest-context.js +16 -0
  32. package/lib/manifest/existing-manifest-context.js.map +1 -1
  33. package/lib/manifest/existing-manifest-context.mjs +16 -0
  34. package/lib/manifest/existing-manifest-context.mjs.map +1 -1
  35. package/lib/manifest/index.d.mts +1 -0
  36. package/lib/manifest/index.d.mts.map +1 -1
  37. package/lib/manifest/index.d.ts +1 -0
  38. package/lib/manifest/index.d.ts.map +1 -1
  39. package/lib/manifest/index.js +3 -1
  40. package/lib/manifest/index.js.map +1 -1
  41. package/lib/manifest/index.mjs +1 -0
  42. package/lib/manifest/index.mjs.map +1 -1
  43. package/lib/manifest/manifest-builder.d.mts +1 -1
  44. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  45. package/lib/manifest/manifest-builder.d.ts +1 -1
  46. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  47. package/lib/manifest/manifest-builder.js.map +1 -1
  48. package/lib/manifest/manifest-builder.mjs.map +1 -1
  49. package/package.json +1 -1
  50. package/src/functions.ts +23 -0
  51. package/src/lib/manifest/custom-object-action.ts +100 -0
  52. package/src/lib/manifest/custom-object-page-layout.ts +3 -11
  53. package/src/lib/manifest/existing-manifest-context.ts +31 -0
  54. package/src/lib/manifest/index.ts +8 -0
  55. package/src/lib/manifest/manifest-builder.ts +1 -0
  56. package/src/version.ts +1 -1
  57. package/version.d.mts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-builder.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAA+B,wCAAoC;AA2FnG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,eAAe;IAO1B;;;OAGG;IACH,YAAY,KAA2B;QAPtB,gBAAW,GAAwB,EAAE,CAAC;QACtC,wBAAmB,GAAgC,EAAE,CAAC;QAOrE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,I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AE,UAAU,EAAE,CAAC;QACzD,IAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,QAAQ,CAAC,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/rippling-sdk",
3
- "version": "0.2.0-alpha.74",
3
+ "version": "0.2.0-alpha.76",
4
4
  "description": "The official TypeScript library for the Rippling SDK API",
5
5
  "author": "Rippling SDK <no-reply@rippling.com>",
6
6
  "types": "./index.d.ts",
package/src/functions.ts CHANGED
@@ -76,6 +76,23 @@ export interface DetailViewActionFunctionEvent<
76
76
  url: string;
77
77
  }
78
78
 
79
+ export interface ListViewActionFunctionEvent<
80
+ TParameters extends FunctionEventParameterShape<TParameters> = FunctionEventParameters,
81
+ TObjectApiName extends string = string,
82
+ TButton extends string = string,
83
+ TPageId extends string = string,
84
+ > {
85
+ app_id: string;
86
+ button: TButton;
87
+ current_user: string;
88
+ object_api_name: TObjectApiName;
89
+ page_id: TPageId;
90
+ parameters: TParameters;
91
+ record_ids: string[];
92
+ trigger_type: 'list view';
93
+ url: string;
94
+ }
95
+
79
96
  export type FunctionEvent = FunctionEventParameters;
80
97
  export type FunctionHandler<TEvent = FunctionEvent, TContext extends FunctionContext = FunctionContext> = (
81
98
  event: TEvent,
@@ -93,6 +110,12 @@ export type DetailViewActionFunctionHandler<
93
110
  TButton extends string = string,
94
111
  TLayoutId extends string = string,
95
112
  > = FunctionHandler<DetailViewActionFunctionEvent<TParameters, TObjectApiName, TButton, TLayoutId>>;
113
+ export type ListViewActionFunctionHandler<
114
+ TParameters extends FunctionEventParameterShape<TParameters> = FunctionEventParameters,
115
+ TObjectApiName extends string = string,
116
+ TButton extends string = string,
117
+ TPageId extends string = string,
118
+ > = FunctionHandler<ListViewActionFunctionEvent<TParameters, TObjectApiName, TButton, TPageId>>;
96
119
  export type DurableDuration = number | string;
97
120
  export type DurableTimestamp = number | Date | string;
98
121
  export interface DurableWaitForEventOptions {
@@ -0,0 +1,100 @@
1
+ import { generateId } from './_helpers';
2
+ import type { CustomObject } from './custom-object';
3
+ import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
4
+ import type { ManifestComponentDeletion } from './manifest-builder';
5
+ import type { ManifestFunction } from './manifest-function';
6
+ import { requireArrayComponentField, requireStringComponentField } from './_existing-component-fields';
7
+
8
+ export type CustomObjectActionVisibilityPreference = 'LIST_VIEW' | 'DETAIL_VIEW';
9
+
10
+ export interface CustomObjectActionDeletionIdentifier {
11
+ actionId: string;
12
+ objectRqlName: string;
13
+ }
14
+
15
+ export interface CustomObjectActionProps {
16
+ /** Stable identifier for this action. Auto-generated when omitted. */
17
+ actionId?: string;
18
+ /** Display name shown in the list or detail view. */
19
+ name: string;
20
+ /** Function invoked by the action. */
21
+ function: ManifestFunction;
22
+ /** Views where the action is shown. */
23
+ visibilityPreferences: CustomObjectActionVisibilityPreference[];
24
+ }
25
+
26
+ export interface CustomObjectActionLoadFromExistingOptions extends ExistingManifestContextOptions {
27
+ customObjectApiName?: string;
28
+ }
29
+
30
+ /** Defines an action shown on a custom object's list or detail view. */
31
+ export class CustomObjectAction {
32
+ static readonly componentType = 'CUSTOM_OBJECT_ACTION' as const;
33
+
34
+ static toDeletionIdentifier(identifier: CustomObjectActionDeletionIdentifier): ManifestComponentDeletion {
35
+ return {
36
+ type: CustomObjectAction.componentType,
37
+ action_id: identifier.actionId,
38
+ object_rql_name: identifier.objectRqlName,
39
+ };
40
+ }
41
+
42
+ private readonly _actionId: string;
43
+ private readonly _objectRqlName: string;
44
+ private readonly _name: string;
45
+ private readonly _functionApiName: string;
46
+ private readonly _visibilityPreferences: CustomObjectActionVisibilityPreference[];
47
+
48
+ constructor(customObject: CustomObject, props: CustomObjectActionProps) {
49
+ if (!props.name.trim()) throw new Error('CustomObjectAction: name cannot be empty');
50
+ this._actionId = props.actionId ?? generateId('action');
51
+ this._objectRqlName = customObject.getApiName();
52
+ this._name = props.name;
53
+ this._functionApiName = props.function.getApiName();
54
+ this._visibilityPreferences = [...props.visibilityPreferences];
55
+ customObject._register(this);
56
+ }
57
+
58
+ static loadFromExisting(
59
+ actionId: string,
60
+ options: CustomObjectActionLoadFromExistingOptions = {},
61
+ ): CustomObjectAction {
62
+ return getExistingManifestContext(options).loadCustomObjectAction(actionId, options);
63
+ }
64
+
65
+ /** @internal Hydrates an action from existing manifest wire JSON. */
66
+ static _fromExistingComponent(
67
+ customObject: CustomObject,
68
+ component: Record<string, any>,
69
+ resolveFunction: (apiName: string) => ManifestFunction,
70
+ ): CustomObjectAction {
71
+ return new CustomObjectAction(customObject, {
72
+ actionId: requireStringComponentField(component, 'action_id', CustomObjectAction.componentType),
73
+ name: requireStringComponentField(component, 'name', CustomObjectAction.componentType),
74
+ function: resolveFunction(
75
+ requireStringComponentField(component, 'function_api_name', CustomObjectAction.componentType),
76
+ ),
77
+ visibilityPreferences: requireArrayComponentField<CustomObjectActionVisibilityPreference>(
78
+ component,
79
+ 'visibility_preferences',
80
+ CustomObjectAction.componentType,
81
+ ),
82
+ });
83
+ }
84
+
85
+ getActionId(): string {
86
+ return this._actionId;
87
+ }
88
+
89
+ toDict(): Record<string, any> {
90
+ return {
91
+ type: CustomObjectAction.componentType,
92
+ action_id: this._actionId,
93
+ object_rql_name: this._objectRqlName,
94
+ name: this._name,
95
+ function_api_name: this._functionApiName,
96
+ object_type: 'CUSTOM',
97
+ visibility_preferences: this._visibilityPreferences,
98
+ };
99
+ }
100
+ }
@@ -8,7 +8,6 @@ import type {
8
8
  import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
9
9
  import type { Field } from './field';
10
10
  import type { ManifestComponentDeletion } from './manifest-builder';
11
- import type { ManifestFunction } from './manifest-function';
12
11
  import { requireStringComponentField } from './_existing-component-fields';
13
12
 
14
13
  export interface PageLayoutDeletionIdentifier {
@@ -25,7 +24,6 @@ export type HeaderFieldKey = string;
25
24
  export type FieldRqlName = string;
26
25
  export type RelatedObjectRqlName = string;
27
26
  export type CanvasCompositionId = string;
28
- type HeaderButtonKey = string;
29
27
 
30
28
  export type JsonPrimitive = string | number | boolean | null;
31
29
  export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
@@ -88,8 +86,6 @@ export interface HeaderEdits {
88
86
  newFields?: NewHeaderField[];
89
87
  /** Ordered list of header field RQL names. Custom header keys are accepted and converted. Optional. */
90
88
  headerFieldsOrder?: FieldRqlName[];
91
- /** Action functions to show in the header. Optional. */
92
- buttons?: ManifestFunction[];
93
89
  }
94
90
 
95
91
  interface SerializedSystemHeaderFieldEdit extends Omit<SystemHeaderFieldEdit, 'newRqlField'> {
@@ -97,11 +93,10 @@ interface SerializedSystemHeaderFieldEdit extends Omit<SystemHeaderFieldEdit, 'n
97
93
  }
98
94
 
99
95
  interface SerializedHeaderEdits
100
- extends Omit<HeaderEdits, 'newTitleField' | 'newDescriptionField' | 'systemFieldEdits' | 'buttons'> {
96
+ extends Omit<HeaderEdits, 'newTitleField' | 'newDescriptionField' | 'systemFieldEdits'> {
101
97
  newTitleField?: FieldRqlName | null;
102
98
  newDescriptionField?: FieldRqlName | null;
103
99
  systemFieldEdits?: Record<HeaderFieldKey, SerializedSystemHeaderFieldEdit>;
104
- buttons?: HeaderButtonKey[];
105
100
  }
106
101
 
107
102
  // ---------------------------------------------------------------------------
@@ -562,7 +557,7 @@ export interface CustomObjectPageLayoutProps {
562
557
  */
563
558
  tabEdits?: TabEdits;
564
559
  /**
565
- * Header configuration — title field, description field, and action buttons.
560
+ * Header configuration — title and description fields.
566
561
  *
567
562
  * Optional. @default `{}`
568
563
  */
@@ -905,7 +900,6 @@ const HEADER_EDIT_KEYS = new Set([
905
900
  'systemFieldEdits',
906
901
  'newFields',
907
902
  'headerFieldsOrder',
908
- 'buttons',
909
903
  ]);
910
904
 
911
905
  const SYSTEM_HEADER_FIELD_EDIT_KEYS = new Set(['newRqlField', 'deleted']);
@@ -972,9 +966,7 @@ function normalizeHeaderEdits(headerEdits: HeaderEdits): SerializedHeaderEdits {
972
966
  );
973
967
  }
974
968
 
975
- const { buttons, ...rest } = headerEdits;
976
- const normalized: SerializedHeaderEdits = { ...rest };
977
- if (buttons != null) normalized.buttons = buttons.map((button) => button.getApiName());
969
+ const normalized: SerializedHeaderEdits = { ...headerEdits };
978
970
 
979
971
  if (headerEdits.headerFieldsOrder == null) return normalized;
980
972
  return {
@@ -1,6 +1,7 @@
1
1
  import { App } from './app';
2
2
  import { Category } from './category';
3
3
  import { CustomObject } from './custom-object';
4
+ import { CustomObjectAction } from './custom-object-action';
4
5
  import { CustomObjectFieldSection } from './custom-object-field-section';
5
6
  import { CustomObjectPageLayout } from './custom-object-page-layout';
6
7
  import { Field } from './field';
@@ -78,6 +79,7 @@ function componentLabel(component: Record<string, any>): string {
78
79
  component['api_name'] ??
79
80
  component['layout_id'] ??
80
81
  component['view_id'] ??
82
+ component['action_id'] ??
81
83
  component['rule_id'] ??
82
84
  component['flow_id'] ??
83
85
  component['sdui_page_id'] ??
@@ -223,6 +225,18 @@ export class ExistingManifestContext {
223
225
  return this.loadListViewComponent(component);
224
226
  }
225
227
 
228
+ loadCustomObjectAction(actionId: string, options: ExistingManifestObjectOptions = {}): CustomObjectAction {
229
+ const objectApiName = options.customObjectApiName;
230
+ const component = this.findUnique(
231
+ 'CUSTOM_OBJECT_ACTION',
232
+ (candidate) =>
233
+ candidate['action_id'] === actionId &&
234
+ (objectApiName == null || candidate['object_rql_name'] === objectApiName),
235
+ `CUSTOM_OBJECT_ACTION ${objectApiName != null ? `${objectApiName}.` : ''}${actionId}`,
236
+ );
237
+ return this.loadCustomObjectActionComponent(component);
238
+ }
239
+
226
240
  loadPageLayout(
227
241
  layoutIdOrApiName: string,
228
242
  options: ExistingManifestObjectOptions = {},
@@ -295,6 +309,8 @@ export class ExistingManifestContext {
295
309
  return this.loadCategoryComponent(component);
296
310
  case 'CUSTOM_OBJECT':
297
311
  return this.loadCustomObjectComponent(component);
312
+ case 'CUSTOM_OBJECT_ACTION':
313
+ return this.loadCustomObjectActionComponent(component);
298
314
  case 'CUSTOM_OBJECT_FIELD_SECTION':
299
315
  return this.loadFieldSectionComponent(component);
300
316
  case 'CUSTOM_OBJECT_FIELD':
@@ -408,6 +424,21 @@ export class ExistingManifestContext {
408
424
  });
409
425
  }
410
426
 
427
+ private loadCustomObjectActionComponent(component: Record<string, any>): CustomObjectAction {
428
+ const objectApiName = requireStringComponentField(
429
+ component,
430
+ 'object_rql_name',
431
+ CustomObjectAction.componentType,
432
+ );
433
+ const actionId = requireStringComponentField(component, 'action_id', CustomObjectAction.componentType);
434
+ const cacheKey = this.cacheKey('CUSTOM_OBJECT_ACTION', `${objectApiName}.${actionId}`);
435
+ return this.getOrLoad(cacheKey, () =>
436
+ CustomObjectAction._fromExistingComponent(this.loadCustomObject(objectApiName), component, (apiName) =>
437
+ this.loadFunction(apiName),
438
+ ),
439
+ );
440
+ }
441
+
411
442
  private loadPageLayoutComponent(component: Record<string, any>): CustomObjectPageLayout {
412
443
  const layoutId = requireStringComponentField(
413
444
  component,
@@ -144,6 +144,14 @@ export {
144
144
  type SummaryFieldProps,
145
145
  } from './field';
146
146
 
147
+ export {
148
+ CustomObjectAction,
149
+ type CustomObjectActionDeletionIdentifier,
150
+ type CustomObjectActionLoadFromExistingOptions,
151
+ type CustomObjectActionProps,
152
+ type CustomObjectActionVisibilityPreference,
153
+ } from './custom-object-action';
154
+
147
155
  export {
148
156
  ExistingManifestContext,
149
157
  type ExistingManifest,
@@ -17,6 +17,7 @@ export type ManifestComponentType =
17
17
  | 'CUSTOM_APP'
18
18
  | 'CUSTOM_CATEGORY'
19
19
  | 'CUSTOM_OBJECT'
20
+ | 'CUSTOM_OBJECT_ACTION'
20
21
  | 'CUSTOM_OBJECT_FIELD'
21
22
  | 'CUSTOM_OBJECT_FIELD_SECTION'
22
23
  | 'CUSTOM_OBJECT_LIST_VIEW'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.74'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.76'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.74";
1
+ export declare const VERSION = "0.2.0-alpha.76";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.74";
1
+ export declare const VERSION = "0.2.0-alpha.76";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.2.0-alpha.74'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.76'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.2.0-alpha.74'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.76'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map