@or-sdk/deployer 1.7.0 → 1.7.1-beta.4013.0

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.
@@ -3,15 +3,190 @@ import type { DeployerConfigWithDiscovery, DeployerConfigWithExplicitUrls, Fetch
3
3
  export declare class Deployer extends Base {
4
4
  constructor(params: DeployerConfigWithDiscovery);
5
5
  constructor(params: DeployerConfigWithExplicitUrls);
6
+ /**
7
+ * Remove role
8
+ *
9
+ * Does not support cross-account logic.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const result = await deployer.removeRole();
14
+ * ```
15
+ */
6
16
  removeRole(): Promise<void>;
17
+ /**
18
+ * Activate flow without polling.
19
+ *
20
+ * Supports cross-account logic (with super-admin token).
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const pollingParams = await deployer.activateFlow(flowSource, false);
25
+ * ```
26
+ */
7
27
  activateFlowNoPoll({ id, data: { deploy: { role } } }: Flow, interactiveDebug?: boolean): Promise<PollingParams>;
8
- activateFlow(flowSource: Flow, interactiveDebug?: boolean, progressCallback?: (progress: PollingResultPending) => void, pollingOptions?: PollingOptions): Promise<PollingResultActivateSuccess>;
28
+ /**
29
+ * Activates flow.
30
+ *
31
+ * Starts activation and polls progress. `progressCallback` is called on every polling
32
+ * while the activation is in 'pending' status.
33
+ *
34
+ * Supports cross-account logic (with super-admin token).
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const triggerList = await flows.activateFlow(flowSource, false, fnShowProgress);
39
+ * ```
40
+ */
41
+ activateFlow(
42
+ /** Flow data object. SDK uses `id` and `data.deploy.role` properties from it. */
43
+ flowSource: Flow,
44
+ /** Flag to turn the debug mode on/off. Default `false`. */
45
+ interactiveDebug?: boolean,
46
+ /** Callback function to call with interim activation progress results. */
47
+ progressCallback?: (progress: PollingResultPending) => void,
48
+ /** Activation polling options */
49
+ pollingOptions?: PollingOptions): Promise<PollingResultActivateSuccess>;
50
+ /**
51
+ * Deactivate flow without polling
52
+ *
53
+ * Supports cross-account logic (with super-admin token).
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * const pollingParams = await deployer.deactivateFlow(flowSource);
58
+ * ```
59
+ */
9
60
  deactivateFlowNoPoll({ id, data: { deploy: { role } } }: Flow): Promise<PollingParams>;
10
- deactivateFlow(flowSource: Flow, progressCallback?: (progress: PollingResultPending) => void, pollingOptions?: PollingOptions): Promise<PollingResultDeactivateSuccess>;
11
- pollResult<T>({ flowId, requestId }: PollingParams, progressCallback?: (progress: PollingResultPending) => void, options?: PollingOptions): Promise<T>;
61
+ /**
62
+ * Deactivates flow.
63
+ *
64
+ * Starts deactivation and polls progress. `progressCallback` is called on every polling
65
+ * while the deactivation is in 'pending' status.
66
+ *
67
+ * Supports cross-account logic (with super-admin token).
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * const deactivatedFlowList = await flows.deactivateFlow(flowSource, fnShowProgress);
72
+ * ```
73
+ */
74
+ deactivateFlow(
75
+ /** Flow data object. SDK uses `id` and `data.deploy.role` properties from it. */
76
+ flowSource: Flow,
77
+ /** Function to call with interim deactivation progress results. */
78
+ progressCallback?: (progress: PollingResultPending) => void,
79
+ /** Deactivation polling options */
80
+ pollingOptions?: PollingOptions): Promise<PollingResultDeactivateSuccess>;
81
+ /**
82
+ * Polls for activation or deactivation status, which can be 'pending' during the process
83
+ * and success or error when finished. Performs up to 100 calls with 1 second interval.
84
+ *
85
+ * Optional progressCallback is calls for every call while in pending status.
86
+ *
87
+ * Supports cross-account logic (with super-admin token).
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * const result = await deployer.pollResult(pollingParams, progressCallback);
92
+ * ```
93
+ */
94
+ pollResult<T>(
95
+ /** Flow and activation/deactivation ids. */
96
+ { flowId, requestId }: PollingParams,
97
+ /** Callback function getting the interim status of the flow activation/deactivation. */
98
+ progressCallback?: (progress: PollingResultPending) => void,
99
+ /** Polling options */
100
+ options?: PollingOptions): Promise<T>;
101
+ /**
102
+ * Only for SUPER_ADMIN.
103
+ *
104
+ * Starts the process to delete an account IAM role and disable all account flows.
105
+ *
106
+ * Additionally, it marks each deployment with a "suspended" flag to enable future resumption.
107
+ *
108
+ * @example
109
+ * ```typescript
110
+ * const deployer = new Deployer({
111
+ * token: '<super-admin-token>',
112
+ * accountId: '<account-id-to-suspend>',
113
+ * discoveryUrl: '<discovery-api-url>',
114
+ * });
115
+ * await deployer.suspendAccount();
116
+ * ```
117
+ */
12
118
  suspendAccount(): Promise<void>;
119
+ /**
120
+ * Only for SUPER_ADMIN.
121
+ *
122
+ * Restores suspended account and activates all suspended flows.
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * const deployer = new Deployer({
127
+ * token: '<super-admin-token>',
128
+ * accountId: '<account-id-to-restore>',
129
+ * discoveryUrl: '<discovery-api-url>',
130
+ * });
131
+ * await deployer.resumeAccount();
132
+ * ```
133
+ */
13
134
  resumeAccount(): Promise<void>;
135
+ /**
136
+ * Fetch single chunk of flow logs
137
+ *
138
+ * To fetch all log events for given time interval see {@link fetchAllFlowLogs}.
139
+ *
140
+ * Does not support cross-account fetching (with `accountId` in Deployer constructor).
141
+ *
142
+ * @example Fetch latest chunk of logs for the flow:
143
+ * ```typescript
144
+ * const deployer = new Deployer({token: '<token>', discoveryUrl: '<discovery-api-url>'});
145
+ * const logs = await deployer.fetchFlowLogsChunk({flowId: '<flow-id>'});
146
+ * ```
147
+ *
148
+ * @example Fetch two chunks of flow logs
149
+ * ```typescript
150
+ * const deployer = new Deployer({token: '<token>', discoveryUrl: '<discovery-api-url>'});
151
+ * const chunk1 = await deployer.fetchFlowLogsChunk({flowId: '<flow-id>'});
152
+ * const chunk2 = await deployer.fetchFlowLogsChunk({
153
+ * flowId: '<flow-id>',
154
+ * next: chunk1.nextToken,
155
+ * });
156
+ * ```
157
+ *
158
+ * @example Fetch chunk of logs starting from 1 hour ago till now:
159
+ * ```typescript
160
+ * const deployer = new Deployer({token: '<token>', discoveryUrl: '<discovery-api-url>'});
161
+ * const logs = await deployer.fetchFlowLogsChunk({
162
+ * flowId: '<flow-id>',
163
+ * start: Date.now() - 60 * 60 * 1000, // 60 minutes ago
164
+ * });
165
+ * ```
166
+ */
14
167
  fetchFlowLogsChunk(params: FetchFlowLogsChunkParams): Promise<FlowLogsChunkResponse>;
168
+ /**
169
+ * Fetch all flow log events for a time interval
170
+ *
171
+ * To fetch only single chunk of log events see {@link fetchFlowLogsChunk}.
172
+ *
173
+ * Does not support cross-account fetching (with `accountId` in Deployer constructor).
174
+ *
175
+ * @example Fetch latest logs for the flow:
176
+ * ```typescript
177
+ * const deployer = new Deployer({token: '<token>', discoveryUrl: '<discovery-api-url>'});
178
+ * const logs = await deployer.fetchAllFlowLogs({flowId: '<flow-id>'});
179
+ * ```
180
+ *
181
+ * @example Fetch all logs starting from 1 hour ago till now:
182
+ * ```typescript
183
+ * const deployer = new Deployer({token: '<token>', discoveryUrl: '<discovery-api-url>'});
184
+ * const logs = await deployer.fetchAllFlowLogs({
185
+ * flowId: '<flow-id>',
186
+ * start: Date.now() - 60 * 60 * 1000, // 60 minutes ago
187
+ * });
188
+ * ```
189
+ */
15
190
  fetchAllFlowLogs(params: FetchFlowLogsParams): Promise<FlowLogsResponse>;
16
191
  private getPrefixedRoute;
17
192
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Deployer.d.ts","sourceRoot":"","sources":["../../src/Deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,cAAc,CAAC;AAG7C,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,IAAI,EACJ,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,aAAa,EAEb,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,qBAAa,QAAS,SAAQ,IAAI;gBAEpB,MAAM,EAAE,2BAA2B;gBACnC,MAAM,EAAE,8BAA8B;IA0CrC,UAAU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mCAAmC;IACnC,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,8BAA8B,CAAC;IAM1C;;;;;;;;;;;;OAYG;IACU,UAAU,CAAC,CAAC;IACvB,4CAA4C;IAC5C,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,aAAa;IAEpC,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI;IAE3D,sBAAsB;IACtB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IA4Bb;;;;;;;;;;;;;;;;OAgBG;IACU,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5C;;;;;;;;;;;;;;OAcG;IACU,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACU,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA6BjG;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkBrF,OAAO,CAAC,gBAAgB;CAGzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/deployer",
3
- "version": "1.7.0",
3
+ "version": "1.7.1-beta.4013.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -18,8 +18,8 @@
18
18
  "dev": "pnpm build:watch:esm"
19
19
  },
20
20
  "dependencies": {
21
- "@or-sdk/base": "^0.43.0",
22
- "@or-sdk/step-templates": "^2.2.0"
21
+ "@or-sdk/base": "^0.44.0-beta.4013.0",
22
+ "@or-sdk/step-templates": "^2.2.1-beta.4013.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "concurrently": "9.0.1",
@@ -27,6 +27,5 @@
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
30
- },
31
- "gitHead": "480349cb6b36e66aea6b9b63b93ed61c95497f94"
30
+ }
32
31
  }