@rippling/rippling-sdk 0.2.0-alpha.111 → 0.2.0-alpha.113

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 (145) hide show
  1. package/client.d.mts +20 -2
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +20 -2
  4. package/client.d.ts.map +1 -1
  5. package/client.js +18 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +18 -0
  8. package/client.mjs.map +1 -1
  9. package/lib/manifest/definitions/canvas-instance.d.mts +114 -0
  10. package/lib/manifest/definitions/canvas-instance.d.mts.map +1 -0
  11. package/lib/manifest/definitions/canvas-instance.d.ts +114 -0
  12. package/lib/manifest/definitions/canvas-instance.d.ts.map +1 -0
  13. package/lib/manifest/definitions/canvas-instance.js +31 -0
  14. package/lib/manifest/definitions/canvas-instance.js.map +1 -0
  15. package/lib/manifest/definitions/canvas-instance.mjs +28 -0
  16. package/lib/manifest/definitions/canvas-instance.mjs.map +1 -0
  17. package/lib/manifest/definitions/index.d.mts +1 -0
  18. package/lib/manifest/definitions/index.d.mts.map +1 -1
  19. package/lib/manifest/definitions/index.d.ts +1 -0
  20. package/lib/manifest/definitions/index.d.ts.map +1 -1
  21. package/lib/manifest/definitions/index.js +3 -1
  22. package/lib/manifest/definitions/index.js.map +1 -1
  23. package/lib/manifest/definitions/index.mjs +1 -0
  24. package/lib/manifest/definitions/index.mjs.map +1 -1
  25. package/lib/manifest/manifest-builder.d.mts +1 -1
  26. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  27. package/lib/manifest/manifest-builder.d.ts +1 -1
  28. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  29. package/lib/manifest/manifest-builder.js.map +1 -1
  30. package/lib/manifest/manifest-builder.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/resources/custom-objects/custom-objects.d.mts +4 -0
  33. package/resources/custom-objects/custom-objects.d.mts.map +1 -1
  34. package/resources/custom-objects/custom-objects.d.ts +4 -0
  35. package/resources/custom-objects/custom-objects.d.ts.map +1 -1
  36. package/resources/custom-objects/custom-objects.js +4 -0
  37. package/resources/custom-objects/custom-objects.js.map +1 -1
  38. package/resources/custom-objects/custom-objects.mjs +4 -0
  39. package/resources/custom-objects/custom-objects.mjs.map +1 -1
  40. package/resources/custom-objects/index.d.mts +1 -0
  41. package/resources/custom-objects/index.d.mts.map +1 -1
  42. package/resources/custom-objects/index.d.ts +1 -0
  43. package/resources/custom-objects/index.d.ts.map +1 -1
  44. package/resources/custom-objects/index.js +3 -1
  45. package/resources/custom-objects/index.js.map +1 -1
  46. package/resources/custom-objects/index.mjs +1 -0
  47. package/resources/custom-objects/index.mjs.map +1 -1
  48. package/resources/custom-objects/record-actions.d.mts +98 -0
  49. package/resources/custom-objects/record-actions.d.mts.map +1 -0
  50. package/resources/custom-objects/record-actions.d.ts +98 -0
  51. package/resources/custom-objects/record-actions.d.ts.map +1 -0
  52. package/resources/custom-objects/record-actions.js +58 -0
  53. package/resources/custom-objects/record-actions.js.map +1 -0
  54. package/resources/custom-objects/record-actions.mjs +54 -0
  55. package/resources/custom-objects/record-actions.mjs.map +1 -0
  56. package/resources/earnings-inputs.d.mts +14 -2
  57. package/resources/earnings-inputs.d.mts.map +1 -1
  58. package/resources/earnings-inputs.d.ts +14 -2
  59. package/resources/earnings-inputs.d.ts.map +1 -1
  60. package/resources/earnings-inputs.js +14 -2
  61. package/resources/earnings-inputs.js.map +1 -1
  62. package/resources/earnings-inputs.mjs +14 -2
  63. package/resources/earnings-inputs.mjs.map +1 -1
  64. package/resources/index.d.mts +4 -1
  65. package/resources/index.d.mts.map +1 -1
  66. package/resources/index.d.ts +4 -1
  67. package/resources/index.d.ts.map +1 -1
  68. package/resources/index.js +8 -2
  69. package/resources/index.js.map +1 -1
  70. package/resources/index.mjs +3 -0
  71. package/resources/index.mjs.map +1 -1
  72. package/resources/record-detail-reference-options.d.mts +18 -19
  73. package/resources/record-detail-reference-options.d.mts.map +1 -1
  74. package/resources/record-detail-reference-options.d.ts +18 -19
  75. package/resources/record-detail-reference-options.d.ts.map +1 -1
  76. package/resources/record-detail-reference-options.js +13 -13
  77. package/resources/record-detail-reference-options.mjs +13 -13
  78. package/resources/record-detail-related-records.d.mts +293 -204
  79. package/resources/record-detail-related-records.d.mts.map +1 -1
  80. package/resources/record-detail-related-records.d.ts +293 -204
  81. package/resources/record-detail-related-records.d.ts.map +1 -1
  82. package/resources/record-detail-related-records.js +3 -3
  83. package/resources/record-detail-related-records.mjs +3 -3
  84. package/resources/record-details.d.mts +1676 -222
  85. package/resources/record-details.d.mts.map +1 -1
  86. package/resources/record-details.d.ts +1676 -222
  87. package/resources/record-details.d.ts.map +1 -1
  88. package/resources/record-details.js +76 -6
  89. package/resources/record-details.js.map +1 -1
  90. package/resources/record-details.mjs +76 -6
  91. package/resources/record-details.mjs.map +1 -1
  92. package/resources/scheduled-payout-labels.d.mts +267 -0
  93. package/resources/scheduled-payout-labels.d.mts.map +1 -0
  94. package/resources/scheduled-payout-labels.d.ts +267 -0
  95. package/resources/scheduled-payout-labels.d.ts.map +1 -0
  96. package/resources/scheduled-payout-labels.js +151 -0
  97. package/resources/scheduled-payout-labels.js.map +1 -0
  98. package/resources/scheduled-payout-labels.mjs +147 -0
  99. package/resources/scheduled-payout-labels.mjs.map +1 -0
  100. package/resources/scheduled-payout-types.d.mts +680 -0
  101. package/resources/scheduled-payout-types.d.mts.map +1 -0
  102. package/resources/scheduled-payout-types.d.ts +680 -0
  103. package/resources/scheduled-payout-types.d.ts.map +1 -0
  104. package/resources/scheduled-payout-types.js +546 -0
  105. package/resources/scheduled-payout-types.js.map +1 -0
  106. package/resources/scheduled-payout-types.mjs +542 -0
  107. package/resources/scheduled-payout-types.mjs.map +1 -0
  108. package/resources/scheduled-payouts.d.mts +1590 -0
  109. package/resources/scheduled-payouts.d.mts.map +1 -0
  110. package/resources/scheduled-payouts.d.ts +1590 -0
  111. package/resources/scheduled-payouts.d.ts.map +1 -0
  112. package/resources/scheduled-payouts.js +584 -0
  113. package/resources/scheduled-payouts.js.map +1 -0
  114. package/resources/scheduled-payouts.mjs +580 -0
  115. package/resources/scheduled-payouts.mjs.map +1 -0
  116. package/resources/worker-changes.d.mts +65 -10
  117. package/resources/worker-changes.d.mts.map +1 -1
  118. package/resources/worker-changes.d.ts +65 -10
  119. package/resources/worker-changes.d.ts.map +1 -1
  120. package/resources/worker-changes.js +3 -0
  121. package/resources/worker-changes.js.map +1 -1
  122. package/resources/worker-changes.mjs +3 -0
  123. package/resources/worker-changes.mjs.map +1 -1
  124. package/src/client.ts +88 -0
  125. package/src/lib/manifest/definitions/README.md +3 -1
  126. package/src/lib/manifest/definitions/canvas-instance.ts +143 -0
  127. package/src/lib/manifest/definitions/index.ts +17 -0
  128. package/src/lib/manifest/manifest-builder.ts +1 -0
  129. package/src/resources/custom-objects/custom-objects.ts +16 -0
  130. package/src/resources/custom-objects/index.ts +6 -0
  131. package/src/resources/custom-objects/record-actions.ts +125 -0
  132. package/src/resources/earnings-inputs.ts +14 -2
  133. package/src/resources/index.ts +35 -0
  134. package/src/resources/record-detail-reference-options.ts +18 -19
  135. package/src/resources/record-detail-related-records.ts +298 -191
  136. package/src/resources/record-details.ts +2031 -209
  137. package/src/resources/scheduled-payout-labels.ts +373 -0
  138. package/src/resources/scheduled-payout-types.ts +755 -0
  139. package/src/resources/scheduled-payouts.ts +1949 -0
  140. package/src/resources/worker-changes.ts +71 -10
  141. package/src/version.ts +1 -1
  142. package/version.d.mts +1 -1
  143. package/version.d.ts +1 -1
  144. package/version.js +1 -1
  145. package/version.mjs +1 -1
@@ -18,6 +18,23 @@ export {
18
18
  type AgentClient,
19
19
  } from './agent';
20
20
  export { defineApp } from './app';
21
+ export {
22
+ defineCanvasInstance,
23
+ type CanvasAction,
24
+ type CanvasActionProperties,
25
+ type CanvasComponent,
26
+ type CanvasEventHandler,
27
+ type CanvasGridPosition,
28
+ type CanvasGridProperties,
29
+ type CanvasMedia,
30
+ type CanvasProperties,
31
+ type CanvasPropertyMeta,
32
+ type CanvasPropertyValues,
33
+ type CanvasVariable,
34
+ type CanvasVersion,
35
+ type DefineCanvasInstanceProps,
36
+ type DefinedCanvasInstance,
37
+ } from './canvas-instance';
21
38
  export { defineCategory, defineCustomObjectCategory, type DefineCustomObjectCategoryProps } from './category';
22
39
  export { defineCustomField, type DefineCustomFieldProps } from './custom-field';
23
40
  export {
@@ -16,6 +16,7 @@ export interface ManifestComponent {
16
16
  export type ManifestComponentType =
17
17
  | 'ACP_AGENT'
18
18
  | 'AGENT'
19
+ | 'CANVAS_INSTANCE'
19
20
  | 'CUSTOM_APP'
20
21
  | 'CUSTOM_CATEGORY'
21
22
  | 'CUSTOM_FIELD_SECTION'
@@ -10,6 +10,13 @@ import {
10
10
  FieldUpdateParams,
11
11
  Fields,
12
12
  } from './fields';
13
+ import * as RecordActionsAPI from './record-actions';
14
+ import {
15
+ RecordActionListParams,
16
+ RecordActionListResponse,
17
+ RecordActionListResponsesPageCursorURL,
18
+ RecordActions,
19
+ } from './record-actions';
13
20
  import * as ListViewsAPI from './list-views/list-views';
14
21
  import {
15
22
  ListViewCreateParams,
@@ -54,6 +61,7 @@ export class CustomObjects extends APIResource {
54
61
  fields: FieldsAPI.Fields = new FieldsAPI.Fields(this._client);
55
62
  records: RecordsAPI.Records = new RecordsAPI.Records(this._client);
56
63
  listViews: ListViewsAPI.ListViews = new ListViewsAPI.ListViews(this._client);
64
+ recordActions: RecordActionsAPI.RecordActions = new RecordActionsAPI.RecordActions(this._client);
57
65
 
58
66
  /**
59
67
  * A list of custom objects.
@@ -395,6 +403,7 @@ export interface CustomObjectUpdateParams {
395
403
  CustomObjects.Fields = Fields;
396
404
  CustomObjects.Records = Records;
397
405
  CustomObjects.ListViews = ListViews;
406
+ CustomObjects.RecordActions = RecordActions;
398
407
 
399
408
  export declare namespace CustomObjects {
400
409
  export {
@@ -444,4 +453,11 @@ export declare namespace CustomObjects {
444
453
  type ListViewCreateParams as ListViewCreateParams,
445
454
  type ListViewUpdateParams as ListViewUpdateParams,
446
455
  };
456
+
457
+ export {
458
+ RecordActions as RecordActions,
459
+ type RecordActionListResponse as RecordActionListResponse,
460
+ type RecordActionListResponsesPageCursorURL as RecordActionListResponsesPageCursorURL,
461
+ type RecordActionListParams as RecordActionListParams,
462
+ };
447
463
  }
@@ -27,6 +27,12 @@ export {
27
27
  type ListViewUpdateParams,
28
28
  type ListViewListResponsesPageCursorURL,
29
29
  } from './list-views/index';
30
+ export {
31
+ RecordActions,
32
+ type RecordActionListResponse,
33
+ type RecordActionListParams,
34
+ type RecordActionListResponsesPageCursorURL,
35
+ } from './record-actions';
30
36
  export {
31
37
  Records,
32
38
  type CustomObjectDataRow,
@@ -0,0 +1,125 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { PageCursorURL, PagePromise } from '../../core/pagination';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ /**
9
+ * Custom object datarows defined by the company
10
+ */
11
+ export class RecordActions extends APIResource {
12
+ /**
13
+ * Lists callable native actions for this Custom Object. Execution remains
14
+ * separately authorized.
15
+ *
16
+ * @example SDK usage
17
+ * ```ts
18
+ * // Automatically fetches more pages as needed.
19
+ * for await (const recordActionListResponse of client.customObjects.recordActions.list(
20
+ * 'custom_object_api_name',
21
+ * )) {
22
+ * // ...
23
+ * }
24
+ * ```
25
+ *
26
+ * @example HTTP
27
+ * Representative request and response shapes.
28
+ * ```
29
+ * GET /custom-objects/{custom_object_api_name}/record-actions/?limit=100&cursor=cursor&visibility_preference=LIST_VIEW HTTP/1.1
30
+ * Host: rest.ripplingapis.com
31
+ * Accept: application/json
32
+ * Rippling-Api-Version: 2024-08-01
33
+ *
34
+ * HTTP/1.1 200 OK
35
+ * Content-Type: application/json
36
+ *
37
+ * {
38
+ * "results": [
39
+ * {
40
+ * "id": "string",
41
+ * "api_name": "string",
42
+ * "name": "string",
43
+ * "function_api_name": "string",
44
+ * "visibility_preferences": [
45
+ * "LIST_VIEW"
46
+ * ]
47
+ * }
48
+ * ],
49
+ * "next_link": "string"
50
+ * }
51
+ * ```
52
+ */
53
+ list(
54
+ customObjectAPIName: string,
55
+ query: RecordActionListParams | null | undefined = {},
56
+ options?: RequestOptions,
57
+ ): PagePromise<RecordActionListResponsesPageCursorURL, RecordActionListResponse> {
58
+ return this._client.getAPIList(
59
+ path`/custom-objects/${customObjectAPIName}/record-actions/`,
60
+ PageCursorURL<RecordActionListResponse>,
61
+ { query, ...options },
62
+ );
63
+ }
64
+ }
65
+
66
+ export type RecordActionListResponsesPageCursorURL = PageCursorURL<RecordActionListResponse>;
67
+
68
+ /**
69
+ * A configured action the caller can attempt through the existing Function
70
+ * execution API.
71
+ */
72
+ export interface RecordActionListResponse {
73
+ /**
74
+ * Stable native ObjectAction identifier.
75
+ */
76
+ id: string;
77
+
78
+ /**
79
+ * Action API name; null for legacy actions.
80
+ */
81
+ api_name: string | null;
82
+
83
+ /**
84
+ * Associated Function API name for the unchanged Function execution endpoints.
85
+ * Discovery does not grant execution or execution-read permission.
86
+ */
87
+ function_api_name: string;
88
+
89
+ /**
90
+ * Action display label.
91
+ */
92
+ name: string;
93
+
94
+ /**
95
+ * Configured action placements: LIST_VIEW appears in an object grid; DETAIL_VIEW
96
+ * appears on a record page.
97
+ */
98
+ visibility_preferences: Array<'LIST_VIEW' | 'DETAIL_VIEW'>;
99
+ }
100
+
101
+ export interface RecordActionListParams {
102
+ /**
103
+ * Opaque cursor from the previous response next_link.
104
+ */
105
+ cursor?: string;
106
+
107
+ /**
108
+ * Maximum number of authorized actions to return. Defaults to 100.
109
+ */
110
+ limit?: number;
111
+
112
+ /**
113
+ * Match a configured placement: LIST_VIEW appears in an object grid; DETAIL_VIEW
114
+ * appears on a record page. Omit to return all authorized actions for this object.
115
+ */
116
+ visibility_preference?: 'LIST_VIEW' | 'DETAIL_VIEW';
117
+ }
118
+
119
+ export declare namespace RecordActions {
120
+ export {
121
+ type RecordActionListResponse as RecordActionListResponse,
122
+ type RecordActionListResponsesPageCursorURL as RecordActionListResponsesPageCursorURL,
123
+ type RecordActionListParams as RecordActionListParams,
124
+ };
125
+ }
@@ -72,7 +72,13 @@ export class EarningsInputs extends APIResource {
72
72
  }
73
73
 
74
74
  /**
75
- * Create a new earnings-input
75
+ * Create or update earnings-inputs for one worker. Requires Global Payroll admin
76
+ * write permission for the company and for the target worker. Each earnings line
77
+ * requires an `external_id`, which identifies the line across requests: resending
78
+ * a line with the same `external_id` and identical values writes nothing, and
79
+ * resending it with different values records a new version that replaces the
80
+ * previous one (last write wins). Retrying a request is therefore safe. There is
81
+ * no separate idempotency key.
76
82
  *
77
83
  * @example HTTP
78
84
  * Representative request and response shapes.
@@ -117,7 +123,13 @@ export class EarningsInputs extends APIResource {
117
123
  }
118
124
 
119
125
  /**
120
- * Delete a earnings-input
126
+ * Delete an earnings-input. Requires Global Payroll admin write permission for the
127
+ * company and for the earnings-input's worker. Deletion is a soft delete: the
128
+ * earnings-input is removed from payroll and is still returned by
129
+ * `GET /earnings-inputs/` with `filter=include_deleted eq true`. Deleting it again
130
+ * returns 404 `PAYROLL_EARNING_INPUT_ALREADY_DELETED`, so a retried delete is safe
131
+ * to treat as done. An earnings-input on an approved or paid payroll run cannot be
132
+ * deleted and returns 409 `PAYROLL_EARNING_ALREADY_ASSIGNED`.
121
133
  *
122
134
  * @example HTTP
123
135
  * Representative request and response shapes.
@@ -596,7 +596,9 @@ export {
596
596
  export {
597
597
  RecordDetails,
598
598
  type RecordDetailRetrieveResponse,
599
+ type RecordDetailRetrieveCreateResponse,
599
600
  type RecordDetailRetrieveParams,
601
+ type RecordDetailRetrieveCreateParams,
600
602
  } from './record-details';
601
603
  export {
602
604
  Reimbursements,
@@ -633,6 +635,39 @@ export {
633
635
  type ScheduledJobAssignmentListParams,
634
636
  type ScheduledJobAssignmentListResponsesPageCursorURL,
635
637
  } from './scheduled-job-assignments';
638
+ export {
639
+ ScheduledPayoutLabels,
640
+ type ScheduledPayoutLabelListResponse,
641
+ type ScheduledPayoutLabelCreateResponse,
642
+ type ScheduledPayoutLabelRetrieveResponse,
643
+ type ScheduledPayoutLabelUpdateResponse,
644
+ type ScheduledPayoutLabelListParams,
645
+ type ScheduledPayoutLabelCreateParams,
646
+ type ScheduledPayoutLabelUpdateParams,
647
+ type ScheduledPayoutLabelListResponsesPageCursorURL,
648
+ } from './scheduled-payout-labels';
649
+ export {
650
+ ScheduledPayoutTypes,
651
+ type ScheduledPayoutTypeListResponse,
652
+ type ScheduledPayoutTypeCreateResponse,
653
+ type ScheduledPayoutTypeRetrieveResponse,
654
+ type ScheduledPayoutTypeUpdateResponse,
655
+ type ScheduledPayoutTypeListParams,
656
+ type ScheduledPayoutTypeCreateParams,
657
+ type ScheduledPayoutTypeUpdateParams,
658
+ type ScheduledPayoutTypeListResponsesPageCursorURL,
659
+ } from './scheduled-payout-types';
660
+ export {
661
+ ScheduledPayouts,
662
+ type ScheduledPayoutListResponse,
663
+ type ScheduledPayoutCreateResponse,
664
+ type ScheduledPayoutRetrieveResponse,
665
+ type ScheduledPayoutCancelResponse,
666
+ type ScheduledPayoutListParams,
667
+ type ScheduledPayoutCreateParams,
668
+ type ScheduledPayoutCancelParams,
669
+ type ScheduledPayoutListResponsesPageCursorURL,
670
+ } from './scheduled-payouts';
636
671
  export {
637
672
  Schedules,
638
673
  type ScheduleListResponse,
@@ -9,20 +9,20 @@ import { RequestOptions } from '../internal/request-options';
9
9
  */
10
10
  export class RecordDetailReferenceOptions extends APIResource {
11
11
  /**
12
- * Lists eligible choices for editing a reference field on an existing Custom
13
- * Object record.
12
+ * Lists eligible choices for a Create or Edit reference field.
14
13
  *
15
- * Requires custom-object-records.read-write or custom-objects.read-write.owner,
16
- * source-object update authorization, and an editable field on an editable,
17
- * unlocked record. Read-only source consent returns 403. Employee and
18
- * RoleWithCompany targets additionally require workers.read or workers.read-write;
19
- * Custom Object targets require record read access and inclusion in the token's
20
- * object restrictions. Configured lookup filters and target permissions apply even
21
- * to exact-ID searches. Only Employee, RoleWithCompany, and Custom Object targets
22
- * are supported. Each result contains a selected record identifier and optional
23
- * permitted presentation. Retrieve full resources through the target collection's
24
- * GET endpoint, subject to its own scopes and access checks. Continue through
25
- * next_link even if a page contains no eligible results.
14
+ * Omit record_id, or pass an empty value, for Create. Pass a nonempty saved record
15
+ * ID for Edit. Requires custom-object-records.read-write or
16
+ * custom-objects.read-write.owner and source-object create/update authorization.
17
+ * Edit also requires an editable field on an editable, unlocked record. Read-only
18
+ * source consent returns 403. Employee references additionally require
19
+ * workers.read or workers.read-write; Custom Object targets require record read
20
+ * access and inclusion in the token's object restrictions. Configured lookup
21
+ * filters and target permissions apply even to exact-ID searches. Only Employee
22
+ * and Custom Object targets are supported. Each result contains a selected record
23
+ * identifier and optional permitted presentation. Retrieve full resources through
24
+ * the target collection's GET endpoint, subject to its own scopes and access
25
+ * checks. Continue through next_link even if a page contains no eligible results.
26
26
  *
27
27
  * @example HTTP
28
28
  * Representative request and response shapes.
@@ -116,16 +116,15 @@ export interface RecordDetailReferenceOptionListParams {
116
116
  object_api_name: string;
117
117
 
118
118
  /**
119
- * Parent record identifier returned by the Custom Object record list or query
120
- * endpoint. It addresses the same record as the canonical record GET and PATCH
121
- * endpoints.
119
+ * Opaque search cursor. Keep the same field and search term.
122
120
  */
123
- record_id: string;
121
+ cursor?: string;
124
122
 
125
123
  /**
126
- * Opaque search cursor. Keep the same field and search term.
124
+ * Omit or pass an empty value for Create. For Edit, pass the saved record
125
+ * identifier returned by the Custom Object record list or query endpoint.
127
126
  */
128
- cursor?: string;
127
+ record_id?: string;
129
128
 
130
129
  /**
131
130
  * Reference search term. An omitted or blank term uses the native lookup defaults.