@rippling/rippling-sdk 0.2.0-alpha.92 → 0.2.0-alpha.94

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/acp-agent/acp-agent.ts +2 -4
  2. package/internal/tslib.js +4 -0
  3. package/lib/manifest/acp-agent-source-files.d.mts +10 -0
  4. package/lib/manifest/acp-agent-source-files.d.mts.map +1 -0
  5. package/lib/manifest/acp-agent-source-files.d.ts +10 -0
  6. package/lib/manifest/acp-agent-source-files.d.ts.map +1 -0
  7. package/lib/manifest/acp-agent-source-files.js +49 -0
  8. package/lib/manifest/acp-agent-source-files.js.map +1 -0
  9. package/lib/manifest/acp-agent-source-files.mjs +45 -0
  10. package/lib/manifest/acp-agent-source-files.mjs.map +1 -0
  11. package/lib/manifest/acp-agent.d.mts +13 -6
  12. package/lib/manifest/acp-agent.d.mts.map +1 -1
  13. package/lib/manifest/acp-agent.d.ts +13 -6
  14. package/lib/manifest/acp-agent.d.ts.map +1 -1
  15. package/lib/manifest/acp-agent.js +10 -14
  16. package/lib/manifest/acp-agent.js.map +1 -1
  17. package/lib/manifest/acp-agent.mjs +10 -14
  18. package/lib/manifest/acp-agent.mjs.map +1 -1
  19. package/lib/manifest/business-event.d.mts +64 -0
  20. package/lib/manifest/business-event.d.mts.map +1 -0
  21. package/lib/manifest/business-event.d.ts +64 -0
  22. package/lib/manifest/business-event.d.ts.map +1 -0
  23. package/lib/manifest/business-event.js +64 -0
  24. package/lib/manifest/business-event.js.map +1 -0
  25. package/lib/manifest/business-event.mjs +60 -0
  26. package/lib/manifest/business-event.mjs.map +1 -0
  27. package/lib/manifest/index.d.mts +3 -2
  28. package/lib/manifest/index.d.mts.map +1 -1
  29. package/lib/manifest/index.d.ts +3 -2
  30. package/lib/manifest/index.d.ts.map +1 -1
  31. package/lib/manifest/index.js +4 -1
  32. package/lib/manifest/index.js.map +1 -1
  33. package/lib/manifest/index.mjs +1 -0
  34. package/lib/manifest/index.mjs.map +1 -1
  35. package/lib/manifest/node.d.mts +4 -0
  36. package/lib/manifest/node.d.mts.map +1 -0
  37. package/lib/manifest/node.d.ts +4 -0
  38. package/lib/manifest/node.d.ts.map +1 -0
  39. package/lib/manifest/node.js +9 -0
  40. package/lib/manifest/node.js.map +1 -0
  41. package/lib/manifest/node.mjs +4 -0
  42. package/lib/manifest/node.mjs.map +1 -0
  43. package/lib/manifest/workflow.d.mts +4 -1
  44. package/lib/manifest/workflow.d.mts.map +1 -1
  45. package/lib/manifest/workflow.d.ts +4 -1
  46. package/lib/manifest/workflow.d.ts.map +1 -1
  47. package/lib/manifest/workflow.js.map +1 -1
  48. package/lib/manifest/workflow.mjs.map +1 -1
  49. package/package.json +1 -1
  50. package/src/lib/manifest/acp-agent-source-files.ts +52 -0
  51. package/src/lib/manifest/acp-agent.ts +30 -22
  52. package/src/lib/manifest/business-event.ts +72 -0
  53. package/src/lib/manifest/index.ts +11 -0
  54. package/src/lib/manifest/node.ts +4 -0
  55. package/src/lib/manifest/workflow.ts +5 -1
  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
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Static business events that can trigger workflows and ACP agents.
3
+ *
4
+ * Availability still depends on the target company and execution role. The
5
+ * manifest installation API is the authority for those checks.
6
+ */
7
+ export const BusinessEvent = {
8
+ EMPLOYEE_HIRING_INITIATED: 'EMPLOYEE_HIRING_INITIATED',
9
+ EMPLOYEE_HIRING_OFFER_SENT: 'EMPLOYEE_HIRING_OFFER_SENT',
10
+ EMPLOYEE_HIRING_OFFER_ACCEPTED: 'EMPLOYEE_HIRING_OFFER_ACCEPTED',
11
+ EMPLOYEE_IS_TRANSITIONED: 'EMPLOYEE_IS_TRANSITIONED',
12
+ EMPLOYEE_TERMINATION_INITIATED: 'EMPLOYEE_TERMINATION_INITIATED',
13
+ EMPLOYEE_TERMINATION_FINALIZED: 'EMPLOYEE_TERMINATION_FINALIZED',
14
+ EMPLOYEE_TERMINATION_APPLIED: 'EMPLOYEE_TERMINATION_APPLIED',
15
+ EMPLOYEE_PROFILE_CHANGE_APPROVED: 'EMPLOYEE_PROFILE_CHANGE_APPROVED',
16
+ EMPLOYEE_PROFILE_CHANGE_INITIATED: 'EMPLOYEE_PROFILE_CHANGE_INITIATED',
17
+ LEAVE_REQUEST_CREATED: 'LEAVE_REQUEST_CREATED',
18
+ LEAVE_REQUEST_APPROVED: 'LEAVE_REQUEST_APPROVED',
19
+ LEAVE_REQUEST_REJECTED: 'LEAVE_REQUEST_REJECTED',
20
+ LEAVE_REQUEST_STARTED: 'LEAVE_REQUEST_STARTED',
21
+ LEAVE_REQUEST_FINISHED: 'LEAVE_REQUEST_FINISHED',
22
+ LEAVE_REQUEST_CANCELED: 'LEAVE_REQUEST_CANCELED',
23
+ DOCUMENT_DELETED: 'DOCUMENT_DELETED',
24
+ DOCUMENT_EXPIRED: 'DOCUMENT_EXPIRED',
25
+ DOCUMENT_SENT: 'DOCUMENT_SENT',
26
+ DOCUMENT_SIGNED: 'DOCUMENT_SIGNED',
27
+ DOCUMENT_UPLOADED: 'DOCUMENT_UPLOADED',
28
+ DOCUMENT_VIEWED: 'DOCUMENT_VIEWED',
29
+ OFFER_STATE_REACHED: 'OFFER_STATE_REACHED',
30
+ REJECTED: 'REJECTED',
31
+ MILESTONE_GREATER_THAN_OR_EQUAL_TO_SCREEN_STATE: 'MILESTONE_GREATER_THAN_OR_EQUAL_TO_SCREEN_STATE',
32
+ STAGE_CHANGED: 'STAGE_CHANGED',
33
+ APPLICANT_CREATED: 'APPLICANT_CREATED',
34
+ INTERNAL_CANDIDATE_APPLIED: 'INTERNAL_CANDIDATE_APPLIED',
35
+ REJECTION_REASON_CHANGED: 'REJECTION_REASON_CHANGED',
36
+ JOB_REQ_CREATED: 'JOB_REQ_CREATED',
37
+ APPLICATION_INTERVIEW_IS_CANCELLED: 'APPLICATION_INTERVIEW_IS_CANCELLED',
38
+ ATS_OFFER_LETTER_SIGNED: 'ATS_OFFER_LETTER_SIGNED',
39
+ ENROLMENT_COMPLETED: 'ENROLMENT_COMPLETED',
40
+ ENROLMENT_STARTED: 'ENROLMENT_STARTED',
41
+ LEARNING_PATH_COMPLETED: 'LEARNING_PATH_COMPLETED',
42
+ EMPLOYEE_SURVEY_RESPONSE_SUBMITTED: 'EMPLOYEE_SURVEY_RESPONSE_SUBMITTED',
43
+ APPLICANT_SURVEY_RESPONSE_SUBMITTED: 'APPLICANT_SURVEY_RESPONSE_SUBMITTED',
44
+ FUNCTION_RUN_COMPLETED: 'FUNCTION_RUN_COMPLETED',
45
+ CARD_AUTHORIZATION_CREATED: 'CARD_AUTHORIZATION_CREATED',
46
+ CARD_TRANSACTION_DISPUTED: 'CARD_TRANSACTION_DISPUTED',
47
+ CARD_TRANSACTION_ANOMALY_DETECTED: 'CARD_TRANSACTION_ANOMALY_DETECTED',
48
+ CARD_REPAYMENT_REQUEST_CANCELLED: 'CARD_REPAYMENT_REQUEST_CANCELLED',
49
+ INVOICE_STATEMENT_GENERATED: 'INVOICE_STATEMENT_GENERATED',
50
+ SPEND_PROGRAM_BALANCE_UPDATED: 'SPEND_PROGRAM_BALANCE_UPDATED',
51
+ VENDOR_ADDED: 'VENDOR_ADDED',
52
+ VENDOR_BANK_ACCOUNT_ADDED: 'VENDOR_BANK_ACCOUNT_ADDED',
53
+ PAYROLL_JOURNAL_ENTRY_POSTED: 'PAYROLL_JOURNAL_ENTRY_POSTED',
54
+ FLIGHT_BOOKED: 'FLIGHT_BOOKED',
55
+ } as const;
56
+
57
+ export type StaticBusinessEventKey = (typeof BusinessEvent)[keyof typeof BusinessEvent];
58
+
59
+ /** Approval events are generated from the approval action type at runtime. */
60
+ export type ApprovalBusinessEventOutcome = 'approved' | 'rejected';
61
+ export type ApprovalBusinessEventKey = `approvals_${string}_request_is_${ApprovalBusinessEventOutcome}`;
62
+
63
+ /** A public business-event key accepted in a manifest. */
64
+ export type BusinessEventKey = StaticBusinessEventKey | ApprovalBusinessEventKey;
65
+
66
+ /** Builds the event key for an approval action type such as `leave_request_approval`. */
67
+ export function approvalBusinessEventKey(
68
+ actionType: string,
69
+ outcome: ApprovalBusinessEventOutcome,
70
+ ): ApprovalBusinessEventKey {
71
+ return `approvals_${actionType.toLowerCase()}_request_is_${outcome}`;
72
+ }
@@ -4,12 +4,22 @@ export { Agent, type AgentIdentityMode, type AgentProps, type AgentSourceFile }
4
4
 
5
5
  export {
6
6
  ACPAgent,
7
+ type ACPAgentEventKey,
7
8
  type ACPAgentEventTrigger,
8
9
  type ACPAgentIdentityMode,
9
10
  type ACPAgentProps,
10
11
  type ACPAgentSourceFile,
11
12
  } from './acp-agent';
12
13
 
14
+ export {
15
+ approvalBusinessEventKey,
16
+ BusinessEvent,
17
+ type ApprovalBusinessEventKey,
18
+ type ApprovalBusinessEventOutcome,
19
+ type BusinessEventKey,
20
+ type StaticBusinessEventKey,
21
+ } from './business-event';
22
+
13
23
  export {
14
24
  generateId,
15
25
  type EdgeType,
@@ -249,6 +259,7 @@ export {
249
259
  Workflow,
250
260
  type WorkflowAutomationEventType,
251
261
  type WorkflowAnnualSchedule,
262
+ type WorkflowBusinessEventKey,
252
263
  type WorkflowBusinessTrigger,
253
264
  type WorkflowCronSchedule,
254
265
  type WorkflowCustomSchedule,
@@ -0,0 +1,4 @@
1
+ /** Node.js-only helpers for Metadata SDK manifests. */
2
+
3
+ export * from './index';
4
+ export { discoverACPAgentSourceFiles } from './acp-agent-source-files';
@@ -1,4 +1,5 @@
1
1
  import { generateId } from './_helpers';
2
+ import type { BusinessEventKey } from './business-event';
2
3
  import type { ManifestFunction } from './manifest-function';
3
4
  import type { ManifestComponentDeletion, ManifestScope } from './manifest-builder';
4
5
 
@@ -103,12 +104,15 @@ export interface WorkflowTriggerBase {
103
104
 
104
105
  export interface WorkflowBusinessTrigger extends WorkflowTriggerBase {
105
106
  automation_event_type: 'AUTOMATION_EVENT_TYPE_BUSINESS';
106
- event_name: string;
107
+ /** Business event to subscribe to. Availability is validated during installation. */
108
+ event_name: BusinessEventKey;
107
109
  business_event_trigger?: {
108
110
  navigation_path?: string;
109
111
  };
110
112
  }
111
113
 
114
+ export type WorkflowBusinessEventKey = BusinessEventKey;
115
+
112
116
  export interface WorkflowRecordChangeTrigger extends WorkflowTriggerBase {
113
117
  automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE';
114
118
  record_change_operation_type: WorkflowRecordChangeOperationType;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.92'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.94'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.92";
1
+ export declare const VERSION = "0.2.0-alpha.94";
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.92";
1
+ export declare const VERSION = "0.2.0-alpha.94";
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.92'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.94'; // 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.92'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.94'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map